API error with Nextcloud 20

Joplin desktop: 1.5.12
Nextcloud: 20.0.4

Hello guys,

After 2 years, I give Joplin another try. I used it a bit on Nextcloud 15 and it was working fine with sync from desktop and iOs.

Now I reinstalled everything, and I get this sync error in the log

2020-12-29 19:18:20: "Operations completed: "
2020-12-29 19:18:20: "createRemote: 1"
2020-12-29 19:18:20: "Total folders: 1"
2020-12-29 19:18:20: "Total notes: 1"
2020-12-29 19:18:20: "Total resources: 3"
2020-12-29 19:18:20: "There was some errors:"
2020-12-29 19:18:20: "Error: PUT .resource/66293479748041eebd5a23b9d6b7baee: Unknown error 2 (405):
Code: 405
Error: PUT .resource/66293479748041eebd5a23b9d6b7baee: Unknown error 2 (405):
at newError (C:\Users\Didier\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\WebDavApi.js:406:11)
at WebDavApi.exec (C:\Users\Didier\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\WebDavApi.js:436:10)
at async FileApiDriverWebDav.put (C:\Users\Didier\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\file-api-driver-webdav.js:201:10)
at async tryAndRepeat (C:\Users\Didier\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\file-api.js:38:19)"
2020-12-29 19:18:22: "DecryptionWorker: cannot start because no master key is currently loaded."

Extra remarks:

  • Nextcloud is a fresh install (hell, I even installed it twice), and I can see some resources created in the files folder. The sync configuration is valid.
  • I tried with "WebDav" instead of "Nextcloud" protocol but not better
  • I tried with a basic user and with the admin user of NextCloud
  • I was able to upload one new notebook and one note. I can see and read the new MD files on my nextcloud server! So the upload seems to work fine.
  • I don't know what this file "66293479748041eebd5a23b9d6b7baee" is. I see these related lines in the log

"
2020-12-29 19:18:20: "Req 19:17:52: PROPFIND https://xx/remote.php/dav/files/lap_cloud/joplin/**66293479748041eebd5a23b9d6b7baee.md** {"headers":{"Depth":0,"Authorization":"","Content-Type":"text/xml","If-None-Match":"JoplinIgnore-16186","User-Agent":"Joplin/1.0","Content-Length":"190"},"body":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\t\t\t<d:propfind xmlns:d="DAV:">\n\t\t\t\t<d:prop xmlns:oc="http://owncloud.org/ns\">\n\t\t\t\t\t<d:getlastmodified/><d:resourcetype/>\n\t\t\t\t</d:prop>\n\t\t\t</d:propfind>","timeout":120000,"maxRetry":0}"
2020-12-29 19:18:20: "Res 19:17:52: <?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="sabre/dav">
<s:exception>Sabre\DAV\Exception\NotFound</s:exception>
<s:message>File with name /joplin/66293479748041eebd5a23b9d6b7baee.md could not be located</s:message>
</d:error>
"
2020-12-29 19:18:20: "Req 19:17:53: PUT https://xxs/remote.php/dav/files/lap_cloud/joplin/.resource/**66293479748041eebd5a23b9d6b7baee
{"headers":{"Authorization":"
**","Content-Type":"text/plain","If-None-Match":"JoplinIgnore-48989","User-Agent":"Joplin/1.0","Content-Length":"4704"},"path":"C:/Users/Didier/.config/joplin-desktop/resources/66293479748041eebd5a23b9d6b7baee.png"}"
2020-12-29 19:18:20: "Res 19:17:53: "

  • I get the same error with the mobile app, and the notes are not synced from the NC server.
  • I have no specific errors in the Nextcloud log

Is the latest Joplin working fin with Nextcloud 20 running on a shared Litespeed server?

Any idea how to fix this bug?

Thanks,

Didier.

I'm still on Nextcloud 19, so I can't answer your question. However, Nextcloud had several bugs in the past few months that screwed up WebDAV. Their QA for core functionality is pretty much useless and they release versions where file sharing and WebDAV is broken.

I suggest to open a topic in the Nextcloud forum.

I'm using the Nextcloud sync target with the following path:

https://xxx/remote.php/webdav/Joplin

aha.. I did some further digging. The weird file is coming from the Joplin desktop resources itself ! It is one of the images that you see when you install the application. I delete that stuff, but it seems that there is still a problem with it. I delete the 3 files of the "resources" folder on my PC. Maybe I should not have done that. Anyway, I don't have that PUT error anymore for the sync, but I have now a sync error in Joplin :frowning:

This is the sync log of Joplin:

Export debug report

Items that cannot be synchronised

These items will remain on the device but will not be uploaded to the sync target. In order to find these items, either search for the title or the ID (which is displayed in brackets above).

SubNotebooks.png (66293479748041eebd5a23b9d6b7baee) could not be uploaded: File not found: C:/Users/Didier/.config/joplin-desktop/resources/66293479748041eebd5a23b9d6b7baee.png

AllClients.png (74fcda26f64145f1a61862f9ee0e22a1) could not be uploaded: File not found: C:/Users/Didier/.config/joplin-desktop/resources/74fcda26f64145f1a61862f9ee0e22a1.png

WebClipper.png (0639ed22463844b6bbf2640ad1cf02dd) could not be uploaded: File not found: C:/Users/Didier/.config/joplin-desktop/resources/0639ed22463844b6bbf2640ad1cf02dd.png

Attachments

Not downloaded: 0

Downloading: 0

Downloaded and decrypted: 0

Downloaded and encrypted: 0

Error: 0

Sync status (synced items / total items)

Note: 1/1

Folder: 1/1

Resource: 3/3

Tag: 0/0

NoteTag: 0/0

MasterKey: 0/0

Revision: 6/6

Total: 11/11

Conflicted: 0

To delete: 0

Folders

test: 1 notes

If you delete files manually there will be issues, since you have created an inconsistency between the database which holdes states and file information and the data on disk.

If you want to delete notes and resources, please do it in Joplin. Otherwise we can't help with any issues that might arise.

ok..but I do not see those 3 images in Joplin. Is there a "trash" folder like in Evernote? I only have one test notebook and one test note. I deleted from Joplin the notebook with the help guidelines.

But I restored the 3 files from the resources folder, restarted Joplin and no sync errors anymore !

That is weird !

Didier.

Nope, there isn't.

As I said, records of these files were in the database, but you removed them, thus the errors.

ahhh..found it. These are 3 attachments to my test note. Don't know where these images are coming from. I can now delete them via the Joplin interface.

Thanks for the help Tessus!

Didier.

You are welcome. Glad everything works now!

Well, there is a SERIOUS problem with attachments, as these are not uploaded correctly to Nextcloud.

  1. So I installed the Joplin app on my Ipad, and bam, upload errors again PUT 405 error due to one resource. The app is empty: no notebooks, no notes, and there is still this upload error for one resource file. How to fix that on iPad?
  2. on my desktop app, I imported one Evernote folder with 17 notes and some attachments. Bam, again, one upload error that is linked to one image attachment of one of the 17 notes. I see the image as resource, but it gets not uploaded to Nextcloud.

What is going on here with the upload of attachments?

Didier.

I still can't reproduce your error. Usually in cases like this it's server issue. But I could be wrong. I can only tell you that I have never, ever received an error when syncing attachments. (That's not entirely true. I had an error once, since my Internet connection was dead.)

As you proposed, I will log a ticket for Nextcloud. Could be a problem on their side with version 20.

I have the same problem with the desktop and mobile app, so the common factor is my cloud server.

Thanks for the support!

Didier.

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