Hello,
as I have no idea if it is a bug I am posting here. I am using joplin for some time and recently I have updated to 2.0.11 on all my systems which are syncing to the same webdav on synology NAS. I didn't have an issue for quite some time and now I am getting this on almost all of my systems.
Not sure what is causing it, I have no errors in log at webdav server. I also find it very strange that during sync lock needs to be refreshed. But I have no idea how to sync mechanism works.
Hopefully you can help me or suggest a step I can do to find out the reason behind this. Thank you.
2021-06-21 11:18:54: "Sync: fetchingProcessed: Processing fetched item"
2021-06-21 11:18:54: "Sync: fetchingProcessed: Processing fetched item"
2021-06-21 11:18:54: "Sync: fetchingProcessed: Processing fetched item"
2021-06-21 11:18:54: "Could not refresh lock - cancelling sync. Error was:", "Error: PUT locks/sync_desktop_5d6caa27670d4d6293db814999ea1a35.json: Unknown error 2 (403): <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>[upl] cannot overwrite [/volume1/homes/upl/notes-from-joplin/locks/sync_desktop_5d6caa27670d4d6293db814999ea1a35.json].</p>
</body></html>
Code: 403
Error: PUT locks/sync_desktop_5d6caa27670d4d6293db814999ea1a35.json: Unknown error 2 (403): <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>[upl] cannot overwrite [/volume1/homes/upl/notes-from-joplin/locks/sync_desktop_5d6caa27670d4d6293db814999ea1a35.json].</p>
</body></html>
at newError (C:\Program Files\Joplin\resources\app.asar\node_modules\@joplin\lib\WebDavApi.js:414:11)
at WebDavApi.exec (C:\Program Files\Joplin\resources\app.asar\node_modules\@joplin\lib\WebDavApi.js:444:10)
at async FileApiDriverWebDav.put (C:\Program Files\Joplin\resources\app.asar\node_modules\@joplin\lib\file-api-driver-webdav.js:201:10)"
2021-06-21 11:18:54: "TaskQueue.stop: syncDownload: waiting for tasks to complete: 5"
2021-06-21 11:18:54: "Sync: cancelling"
2021-06-21 11:18:58: "TaskQueue.stop: syncDownload: Done, waited for 4023"
2021-06-21 11:18:58: "Synchronisation was cancelled."
2021-06-21 11:18:58: "Sync: finished: Synchronisation finished [1624267073140]"
2021-06-21 11:18:58: "Operations completed: "
2021-06-21 11:18:58: "fetchingTotal: 3100"
2021-06-21 11:18:58: "fetchingProcessed: 3090"
2021-06-21 11:18:58: "cancelling: 1"
2021-06-21 11:18:58: "Total folders: 0"
2021-06-21 11:18:58: "Total notes: 3407"
2021-06-21 11:18:58: "Total resources: 0"
2021-06-21 11:18:58: "Trying to reload note that has been deleted:", "null"
2021-06-21 11:18:59: "DecryptionWorker: cannot start because no master key is currently loaded."
It sounds like there's a permission issue, so maybe make sure that all permissions on directories are set properly, and that there's enough space on the drive.
I have removed 2.0.11 and cleaned config folder and reinstalled 1.8.5
Got same error but much more detail info, please take a look at the attached log file. log.txt (20.4 KB)
Hi richo67, I have the same problem with Joplin and Synologic NAS.
I checked the permissions on the NAS and they seem to be alright.
The first note i saw this error was a note with a table. And now it gets creepy. I did the following steps:
I deleted the note in Joplin
Syncing worked
I created the note in Joplin again only with headline
Syncing worked
I put in a line of a table
Syncing worked
I put in the second line of that table
Syncing was broken
I repeated this steps a few times and it was always the same.
The issue is caused by WebDav server from somewhere around version 2.4.0.
Based on my discussion with Synology support, for solving some issue with not able to overwrite file even when one have user write file permission:
our developer adjust the mechanism while uploading files, it will call the SYNOACLPermCheck to check the permission, but it will have problem if the shared folder is in Linux mode.
They suggest me to turn ACL permission on for the share, but my share was home directory and I didn't want it on it. So I have created new share, turn ACL permission on it.
I then turn off sync of notes in joplin on all my clients.
Copied files using shell from original location to this new location.
Change location of sync in one of the client to test
Now it is running the sync fine. I also see that lock is overwritten without issue every few minutes (and it was failing on it - on every overwrite).
I think I can say this solution is working.
Synology NAS on DSM 6; WebDav server 2.4.1.0108 client on windows and linux and android (even last two are not tested yet, but I assume there will no be issue as the problem was not joplin app/client related)
I have received another information from Synology support:
Our dev are working to release a new webdav server version (2.4.1-0109, currently not available yet) to fix this behavior. I just have this information and was not able to provide this anwser sooner I am sorry. So it should be fixed as soon as the package will be available.