Error when trying to sync on Next Cloud using desktop app

I’ve been trying to sync using NextCloud, and on my Android it does fine, but on PC or Linux it returns me this error:

Last error: Error: PROPFIND .lock/: Unknown error 2 (406): Not Acceptable!

Not Acceptable!

An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.

I saw people with this error on the forum and the only suggestion was to disable mod_security, which i did, but i still got this error. Is there any solution? Or just “is not Joplin problem” like on the other posts?

Cause i think that if this was a problem with server than it would not connect even on Android.

It’s not Joplin’s problem in the sense that if you use some security module, it’s up to you to configure it correctly, Joplin certainly can’t SSH to your server and set it up for you. However if you disable it and you still get the error, then probably you need to restart the server, or maybe you didn’t really disable it.

I talked to my Host support for an hour. They found nothing wrong in the servers, ports, requisitions or anything.
So i tried the webdav with the Nextcloud desktop app, through my Linux file browser, through Joplin app on Android, i made a coworker install on their iPhone and it worked in all of these. Just on my JOPLIN Desktop PC or Linux that don’t work. Other applications with webdav works. The problem is on the server?

So it is actually a problem on my server? Even though my support says is not so? So i guess my only step would be, like, change my host provider?

That is actually nothing wrong with my server. I even went to the Nextcloud support forums.

This is an issue on how the Joplin desktop app is handling the WebDAVs.

I mean, like, it literally makes no sense that in the Android and iOS app it works fine. If there was an issue on the server that would not sync.

It’s still not clear what the issue is though. On one hand you got the Not Acceptable! error and on the other hand you said you’ve disabled mod_security, so where does this error comes from?

The Joplin code is the same on all platforms but of course each device has a different network stack so that could be where the issue is. You’ll need to check your logs and see where’s the difference is or post detailed logs here, otherwise we’re just talking about who’s wrong who’s right with zero evidence of anything.

I have the complete .log file, do you think that helps in something? I hope so…

nextcloud.log (214.9 KB)

There’s no error 406 in this log. Now that I remember there’s an issue with some servers that redirect urls to other urls - see here: Latest android Joplin began to fail WebDav synchronization

It’s unnecessary and inefficient for an API to do that but some servers do it anyway, so maybe that’s your issue. Unfortunately there’s no plan for a fix for now as this would bring a lot of additional complexity just to support servers that shouldn’t have this redirection in the first place.

I see. The strange thing is that on my android, the server apparently does not cause that, unlike in the user on this post, but yes in my desktop.

But i’ll check my host, maybe they see that and can do something. Thanks for the insight.

I had been using Dropbox sync between my Android Joplin on my phone and my joplin-desktop on Ubuntu (20.04).
Wanted to use my personal Nexcloud account (nextcloud 22.1.0) instead, but the sync fails on the the computer desktop jolin - using a dav url

I get this error

Error: PUT .resource/d299c496092347e4ac4db4af7a408abf: Node with name '.resource' could not be found...

I tried to manually create the missing .resource file, with no sucess.
After serveral tries, I reverted back my sync to Dropbox, with regret... as I like to rely on my different owncloud and nextcloud installations and not on these big companies...