Sync problem with Joplin server - new notes don't sync but delete/modify are OK

Operating system

macOS

Joplin version

3.0.15

Sync target

Joplin Server

What issue do you have?

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?

Here's a bit more testing.

With all other Joplin instances closed:

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!

Further tests toward a minimal bug characterization

1- On the Joplin server web interface (reported version on the interface: "Joplin Server v2.12.1, copyright © 2021-2024 JOPLIN.") , create two new accounts: testmaster1 and testuser1.
2- On Windows PC (Joplin 3.0.15), create a new profile and sync it to testmaster1.
3- On a Mac (Joplin 3.0.15), create a new profile and sync it to testuser 1.
4- On the Windows PC (testmaster1 account), create a test notebook with a test note inside. Share the notebook with testuser1, sync.
5- On the Mac (testuser1 account), sync will bring up the sharing dialog - Accept the sharing. The test notebook will appear with the test note inside.
6- Modification to this existing note will be synced bidirectionally (both testmaster1>testuser1 and testuser1>testmaster1). This is normal behavior
7- Now create a new note either on testmaster1's or testuser1's side inside the shared notebook and sync it up to the server.
8- This note will not sync to the other user. This is the bug
9- Additional test: if you stop the notebook sharing from testmaster1, sync testmaster1, sync testuser1 to clear the shared notebook, then re-invite testuser1 and resync testuser1, the new note created at step 8 will appear on testuser1's side.
10- Additional test: if you sync two different machines on testmaster1, the created note will sync on both machines.

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.

Issue is there now:

Great, thanks!

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.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.