Unreliable sync Nextcloud-Android (Parent node does not exist)

Hi all,

I'm new to Joplin, love it so far. I host my db on my docker nextcloud server (2.6.0.2.1) with TOTP using a password specific password for each devices.

I have 3 profiles. All of them are syncing properly on the Windows app on 5 different computers on 2 different sites (3 lan, 2 wifi, 1x Windows 10, 4x Windows 11, 1 VM on server, 2 laptops).

On my Galaxy S22 (Joplin 2.10.8), it's a different story. When I had only 1 profile and set it up using the same procedure as the Windows apps, it was syncing without any issue.

I've added the 2 other profiles :

  • Most of the time, the 2nd and 3rd profiles don't sync (wifi or LTE) while the 1st one syncs without any issue
  • Sometimes, the 2nd one syncs properly. This is not related to when I switched the profile (it could be 1 hour ago, 5 seconds ago). When the 2nd does sync, the 1st one doesn't sync anymore.
  • The 3rd one never synced.

The "sync" error I get is always (whatever the profile):
"Last error: Error: MKCOL locks/: Parent node does not exist (Exception Sabre\DAV\Exception\Conflict) (409)!

When the profile doesn't sync, the "check sync conf" error is:
"WebDAV not found, please check URL, username, password". (but, again, it works sometimes)

As I got 2 of them working properly at a moment, I'm pretty sure my configuration is correct. As I got it to work on so many Windows machines, I'm confident my server is properly configured.

Let's start with the basics:

  • I have a very big log file on my Android. How do I share that? I can't find it in the files, can't copy-paste.
  • I've searched for similar issue on the forum, haven't found close threads. Am I the only one?
  • Should I report a bug?

Any help is greatly appreciated.

Thank you very much!

Best regards,
Gab

I got the 3rd profile syncing. This sync appeared to have taken ~10 s, but the completion message said ~2700 s (~ 45 min). I then obtained a similar long sync with the 1st one (992 s, ~17 min).

This may then be simply a very long sync time.

Update : this is a bug.

After a profile switch on the Android App, a synchronize request ends with the error:

Last error: Error: MKCOL locks/: Parent node does not exist (Exception Sabre\DAV\Exception\Conflict) (409)!

If I wait 15 minutes, the synchronization completes quickly without any issue.

I can't update my first post and thread title accordingly, I guess this was available for a limited amount of time.

I am not very competent, but I see your error message seem to relate to a 'lock' conflict. Maybe you have an old 'lock' file somewhere on your server, that prevents syncing
(temporary lock files are created, in a 'lock' folder, whenever one of your devices is running a sync operation, then the lock file is removed, which allows the next device to sync too, etc. -Real-time monitoring of the Locks folder should show you how the lock files appear and disappear while your devices are syncing...)
Can you check, on your Nextcloud server, if you have such a 'Locks' (or maybe 'Lock') folder, and whether it is empty as it should be? (it definitely should be empty if you stop ALL your devices; just quitting Joplin on them)
If all instances of Joplin are off and you still have a Lock file you should delete it (or just remove it and check).
I can't do much more as I don't sync on a Nextcloud for now...

Hi Herve5, thanks for the input.

Following your comment, I've looked at this. Inside profile #2 nexcloud:
-/locks folder, there is a persistent .json file, about 2 days old.
-/.lock folder: always empty.

I've tried this:
1- Switch profile on Android from #1 to #2, try a sync: failure.
2- Use a Windows Joplin app, switch profile from #1 to #2, try a sync: success, no new file created in locks folder.
3- Try a sync again on Android app: failure.
4- Wait >45 minutes (this time more than 15 min was required before a successful sync), try a sync on Android: success.

I've logged a bug here: (Android) Can't synchronize after a profile change · Issue #8340 · laurent22/joplin · GitHub

The presence of a file in the locks folder means everyone will consider one instance is currently syncing, which prevents all others to sync. I presume if you then succeeded then that 2-days-ond file will have disappeared now : is it right?
My feeling is, such a locking file should never be 2 days old, unless you killed abruptly one of the Joplin instance while it was was sinc'ing, which left the locking file unerased. Could this be the case?

Good point, maybe...

This file was in only one of the 3 profiles, though I have issues with all of them. I've deleted it, it changed nothing to my issue.

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