Syncing Issue with Nextcloud

Hi all,

I'm using Nextcloud in the latest version 24.0.5 on an Ubuntu server version 22.04.01 LTS.
While trying to sync, I get the following message, although Joplin (v 2.8.8 win32) tells me under Options->Syncronisation, that syncing is successful:

Error: Could not upgrade from version 0 to version 1: PUT .sync/version.txt: (Exception Sabre\DAV\Exception\Forbidden) (403): <?xml version="1.0" encoding="utf-8"?> <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> <s:exception>Sabre\DAV\Exception\Forbidden</s:exception> <s:message/> </d:error>

Nextcloud log:

Warnung	no app in context	Sabre\DAV\Exception\NotFound: File with name /.sync/version.txt could not be located

    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php - line 78:

    OCA\DAV\Connector\Sabre\Directory->getChild()

    /var/www/html/nextcloud/apps/dav/lib/DAV/ViewOnlyPlugin.php - line 75:

    Sabre\DAV\Tree->getNodeForPath()

    /var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:

    OCA\DAV\DAV\ViewOnlyPlugin->checkViewOnly()

    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 472:

    Sabre\DAV\Server->emit()

    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 253:

    Sabre\DAV\Server->invokeMethod()

    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 321:

    Sabre\DAV\Server->start()

    /var/www/html/nextcloud/apps/dav/lib/Server.php - line 358:

    Sabre\DAV\Server->exec()

    /var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:

    OCA\DAV\Server->exec()

    /var/www/html/nextcloud/remote.php - line 166:

    require_once("/var/www/ht ... p")

In general Webdav works with other programs.

I've read a lot and googled it, but didn't find a solution.

Any ideas, what this causes and how I could solve it?

The returncode 403 from your NextCloud says that uploading the file is forbidden, this indicates an authorization error. For example the user has no write permission.

To verify, I tried several Nextcloud users and always got the result
Success! Synchronization configuration appears to be correct.

Under Windows I mounted a drive like:

net use Z: https:///remote.php/dav/files/USERNAME/ /user:youruser yourpassword

and uploaded a file, which works as well.

Now I found out something strange:
All users are mounted on external storage in Nextcloud and all have the same error.
When I create a new user, which is not on an external storage, the sync works fine.

Do I have to change the WebDAV URL and if, into what?

Found the solution myself.

In the Nextcloud External Storage setting, you have to enable "show hidden files".
Then sync each Joplin instance.
After syncing each instance, you can disable "show hidden files" and it still syncs fine.

Strange behaviour, but as long there is a workaround all is fine.

3 Likes

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