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: https://github.com/laurent22/joplin/releases/tag/v1.0.245
Worked like magic! Thank you!
Glad it’s working now, and thanks for your feedback.
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 time.gov 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?
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.
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 mailbox.org.
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?
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.
Hi,
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.
Cheers,
Hi,
I have been struggling with sync issues in the android application with different devices.
(Windows and linux apps no problem).
There seems to be two reasons for this problem:
- Cloud services (in my case onedrive) might have a time restriction on the connection that results in an error that can be seen in the journal as: "could not refresh lock cancelling sync"
- Sync stops if the screen locks
Solution:
1. Copy the sync folder in the android device and use 'file system' sync in Joplin app
this can be done in different ways:
- download and extract directly from cloud service in the device or in desktop to then copy to device using USB cable
- in desktop app use file system sync to create such folder and then send it to device
be careful during this operation : you should go in advanced sync options and click "Re-upload local data to sync target"
- use a Peer to Peer solution for syncing like Resilio Sync
Once the sync folder is in the android device you just have to use file system sync to that folder. If you prefer to use a cloud service you can set it up after you have managed to successfully sync all your notes once. Next updates should not be as time consuming and cloud should work.
2. Avoid screen from locking
there are different ways to do this, I use Screen Alive app from the app store
Bonus
if you have heavy attachments in your notes, like videos, you could also try to first sync notes only and then the attachments by changing "Attachment behavior" to "Manual" and the to "always"