Cannot Aquire Sync Lock

Yes, that solved the issue. My clock was a few minutes in the future and I didn’t notice, that it’s not getting the time from the net automatically. Thanks

Ok good to know it’s working at least. Best is to have the computer clock automatically sync to an ntp server, but I’m also going to make the app get the time from the sync target for more accuracy.

For those still having this issue, please give a try to the latest release:

Worked like magic! Thank you!

Glad it’s working now, and thanks for your feedback.

1 Like

Unfortunately, I still have this issue with Joplin v1.2.6 @laurent

The sync PC <-> WebDAV <-> Android fails since about one week.

Sync on Windows 10 fails with:
Completed: 15/10/2020 00:02 Last error: Error: Cannot acquire sync lock: either the lock could be written but not read back. Or it was expired before it was read again.

Sync on Android fails with:
Completed: 15/10/2020 00:03 Last error: Error: GET info.json: Unknown error 2 (412):

My system clock has the correct time (difference to is 0.05s).
On my WebDAV in my joplin directory I have a folder called 'locks' which holds 1198 sync files as of yet:

  • sync_desktop_<32-char-string> (2).json
  • ...
  • sync_desktop_<32-char-string> (1199).json
  • and with each sync attempt, a new file of the same format is created
  • But besides that, there exists no file with another format/naming (exclusive...) in the 'locks' folder

Any ideas? :confused:

I don't understand why it's creating files with (1), (2), etc. Is that the server trying to be smart and creating a new copy instead of overwriting? The filename should be sync_desktop_STRING.json The app doesn't know how to generate any other name so it wouldn't append a number like this.

Which server is it? Perhaps there's some way we can force it to overwrite the file, but it seems a bit crazy anyway and I'm surprised sync could ever work with such a system.

1 Like

Thanks for your quick reply. I have no idea what is going wrong here and why...

The WebDAV space I use is the 'cloud storage' from

What seems a bit strange to me is, that the 'Cannot acquire sync lock' error on my side seemed to start with the new versions which should fix the very same error for others. But maybe this is pure coincidence.

Beforehand it worked like a charm for many months with exactly the same configuration. I haven't changed anything in my setup, besides installing the Joplin updates that popped up.

As a first quick shot: Can I savely delete the 'locks' folder and/or all of its content (all the sync_desktop_STRING.json files) on the WebDAV space or could this destroy something?

1 Like

You can delete the content of the locks folder, but not the folder itself as it will be used for syncing.

Unfortunately, the deleting of the sync_desktop_STRING.json files in the 'locks' folder doesn't help.

I deleted all the files (~2000) and started over with an empty 'locks' folder, but as soon as I start Joplin again and try to sync, it's just continuing to write one sync_desktop_STRING.json file after another to 'locks' (beginning with sync_desktop_STRING (2).json and counting up) while throwing the 'Cannot Aquire Sync Lock' error.

What can I do?

Short update here:

What seems to have solved the problem:

  • Deleting the 'locks' folder on the WebDAV space
  • Creating a new 'locks' folder on the WebDAV space
  • Clearing the cache of the Joplin Android app

After this procedure, Joplin seems to work on Windows as well as on Android again and sync between the two devices via WebDAV as before.



I had the same problem on a a cell phone (iPhone 11). I was able to solve it by playing with the number of max concurrent connections in the synchronization options:

-- Originally, it was set to 5, which more often than not resulted in cancelling the synchronisation process.
-- Setting it to 1 made a synchronization process possible, but it would take ages, and possibly abort.
-- Setting it to 10 sped up the entire process. No cancellation or error observed so far.