Webdav synch issues

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.

Laurent, permissions are fine. From other computer joplin 1.8.5 win32 is syncing fine. Drive has 2.7TB free space.

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)

Thank you for your help

Looks like the key part is there:

[upl] cannot overwrite [/volume1/homes/upl/notes-from-joplin/locks/sync_desktop_a4cc1229fd1d4834a02e19c1a5e18c4b.json].

If that file can't be written to there's not much to do application side. I think you'd need to find out why the WebDAV server is denying permission.

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:

  1. I deleted the note in Joplin
  2. Syncing worked
  3. I created the note in Joplin again only with headline
  4. Syncing worked
  5. I put in a line of a table
  6. Syncing worked
  7. I put in the second line of that table
  8. Syncing was broken
    I repeated this steps a few times and it was always the same.

Syncing with plain text notes works

Thank you for support

Hi, I played a little around.
I can create a new note and as soon as i changed it, sync is broken.

Witch DSM version and WebDav server version do you use on Synology and what permissions have you set on the folder?

Hi,
NAS: DS418J
DMS: 6.2.4-25556
WebDAV Server: 2.4.1-0108

I did not upgraded to DMS 7 until now, because of end of support of ext3.

Permisions: User, Group: Read and Write

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)

Thank you all for suggestions and help
-richo-

1 Like

Thank you for the hint. I will chek it.

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.

1 Like

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