I have a problem with synced accounts on Joplin server (2.12.1 on a Synology server): one account A (Joplin desktop 3.0.15 on a Windows PC) shares a large notebook with another account B (Joplin desktop 3.0.15 on a Mac). Deleting or modifying existing notes syncs from A to B or B to A. However, creating a new note or a new notebook does not sync in either direction. Sync displays the regular distant object created, no error in the Sync state log on either desktop apps. In the logs and items on the server interface, the created notes just don't appear, whereas the deletions and modifications appear.
What could be the issue here? How do I debug and try to solve this situation?
Today I used account C (Joplin 3.0.15 desktop on another Mac) to which account A was also sharing the notebook, and uploaded the shared notebook (5600 notes, 12.8 GB) back to the server, presumably wiping what everything that was there (using the advanced sync option).
When this was finished, I created an entirely new account on the Windows PC, entered the credentials for account A, and launched the sync (this should just download the whole notebook from the server, that was previously uploaded by account C).
I now have two identical shared notebooks on the Windows PC (account A, master of the share) and Mac (account C, recipient of the share).
I create a note in the shared notebook using account C. It tells me it syncs to the server (distant object created, sync log without errors). Account A on the Windows PC does not see the new note, nothing happens when syncing. In the items and logs of the Joplin Server, the note is nowhere to be found.
What can I do next? I could wipe everything, set up a new server with a snapshot from three days ago, and resync 10 computers from scratch, but I already did it exactly one year ago for a similar problem and it is a major PITA. Suggestions are welcome on a better way diagnose and treat the issue!
So the bug is precisely the syncing of note creation between users of shared notebooks, both in the master>user and user>master directions (master being the account that shares the notebook). I suspect this won't work in a user1>user2 situation too.
At this point, should I make a Github issue post? It seems that support for Joplin Server is minimal (the server option is even hard to find on Joplin's website). Should I switch our use to Joplin Cloud and pay? I'd be happy to if that means better reliability, but the 50GB limit of the Team subscription might be a bit limiting. Happy if @laurent can weigh in on the best strategy.
We will try to upgrade Joplin server to 3.0.1 and see if this solves the issue. We will use the latest Docker image at https://hub.docker.com/r/joplin/server (it says 3.0.1-beta as ARG VERSION but I guess this is what we want)
Going on with the soliloquy - at least it serves as documentation for my future struggles.
Updating server to 3.01 did not help, same issue with sync (even with freshly created users and notebooks).
Creating a brand new 3.01 instance of server works. Now on to transfer all users and notes from the old instance to the new one (server-side) and see if the sync bug propagates…
Additionally, for debugging, you can check the table share_users to see what has actually been shared and whether the share has been correctly accepted or not. If things are correct server-side, it means it's something wrong with the client so it could make sense to clear its profile and try again. Or just check for errors in the client log.
Here is my share_users table. Should have a single big notebook shared with all users, but the encoding makes it difficult to understand what is going on:
Were you really able to replicate this bug with two new users and two new profiles? I cannot replicate this on my side, as I was half-expecting, since it's such a simple case that if it didn't work we would have known by now.
What was the type of the users (Basic, Pro, etc.) and did they both have the "Can share notebook" option enabled?
Do you see any error or warning in the Joplin Server log while the issue is happening? (i.e. do you see any error while one of the user is synchronising?)
I was able to replicate with two new users and two new profiles, on the original 2.12.1 Joplin server instance and after upgrading the instance to 3.0.1. On a clean 3.0.1 instance, the minimal example above does not show the problem. After migrating all the data and share setting from the old instance to the clean one, the problems reappears, so it seems to be a corruption in the data or sharing configuration rather than a bug with the Server code per se.