# WebDAV error on "MKCOL locks/" with Joplin Android client after switching profiles

**URL:** <https://help.nextcloud.com/t/webdav-error-on-mkcol-locks-with-joplin-android-client-after-switching-profiles/224060>\
**Category:** ℹ️ Support\
**Tags:** desktop-client, snap, joplin, android, webdav\
**Created:** [May 2, 2025, 8:29pm UTC](https://help.nextcloud.com/t/webdav-error-on-mkcol-locks-with-joplin-android-client-after-switching-profiles/224060 "2025-05-02T20:29:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![changemewtf](https://help.nextcloud.com/letter_avatar/changemewtf/32/5_5575768a8748004e209b776fc1b2916d.png) [@changemewtf](https://help.nextcloud.com/u/changemewtf)\
**Post date:** [May 2, 2025, 8:29pm UTC](https://help.nextcloud.com/t/webdav-error-on-mkcol-locks-with-joplin-android-client-after-switching-profiles/224060/1 "2025-05-02T20:29:17Z")

</div>

## The Basics

- Nextcloud Server version: 31.04snap1
- Operating system and version: Ubuntu 24.04.2 LTS
- Web server and version: Snap internal (?)
- Is this the first time you’ve seen this error? Yes
- Installation method: Snap
- Are you using CloudfIare, mod\_security, or similar? No

## Summary

Hi all. I’m here because I struck out on the Joplin forums. This ONLY happens when switching profiles on the Joplin Android client, NOT the desktop client. So Joplin is definitely involved somehow, but I’m not sure if this could also be a Nextcloud bug, a SabreDAV bug, or even an Android bug.

If you’d like all the context, you can see my post on the Joplin forum here: [https://discourse.joplinapp.org/t/sync-error-on-new-profile-on-android-client-only-permission-denied-to-create-directory/44917/25](https://discourse.joplinapp.org/t/sync-error-on-new-profile-on-android-client-only-permission-denied-to-create-directory/44917/25)

In short, I’m getting errors when trying to sync my Joplin data via Nextcloud WebDAV after switching profiles in Joplin–each profile is assigned to a different Nextcloud user.

## Reproduction steps

To reproduce:

- Create two Nextcloud users
- Create two Joplin profiles and configure each of them to sync to one of the users
- Sync one profile
- Swap profiles
- Sync again

If I wait for a couple of hours, then I can sync the alternate profile, but as soon as I switch back again, I get errors. So I can only be actively syncing one profile every couple of hours, obviously not ideal.

## Logs and other stuff I’ve tried

Here’s what it looks like on the Nextcloud server when I run the reproduction steps on my Windows or Linux desktop Joplin clients:

changelog [18/Apr/2025:04:48:10 +0000] “GET /remote.php/dav/files/changelog/info.json HTTP/1.1” 200 2191 “-” “Joplin/1.0”

However, when I do the exact same thing on the Android client:

changelog [18/Apr/2025:04:48:28 +0000] “GET /remote.php/dav/files/changelog/info.json HTTP/1.1” 404 4621 “-” “Joplin/1.0”

I’ve also seen 403 errors as well.

There are plenty of examples of this issue scattered throughout the web, but no one seems to have a unified solution.

So far I’ve tried:

- Changing `dav` to `webdav` in my sync URL
- Uninstalling and reinstalling mobile client
- Migrating my entire Nextcloud to a completely brand new updated server
- Changing permissions on my Nextcloud filesystem to 777
- Manually creating or deleting the `locks/` directory

This is a super frustrating issue, and I hope someone can at least offer a clue for what to try next. I’ve been very happy with self-hosting Joplin and Nextcloud for almost five years now, and this is the first “showstopper” issue I’ve ever encountered. It’s quite inconvenient and I’m hoping to get to the root cause soon! Thanks for your time!

---

<div class="post-metadata">

**Author:** ![changemewtf](https://help.nextcloud.com/letter_avatar/changemewtf/32/5_5575768a8748004e209b776fc1b2916d.png) [@changemewtf](https://help.nextcloud.com/u/changemewtf)\
**Post date:** [May 5, 2025, 3:47pm UTC](https://help.nextcloud.com/t/webdav-error-on-mkcol-locks-with-joplin-android-client-after-switching-profiles/224060/2 "2025-05-05T15:47:58Z")

</div>

This was fixed with a change to Joplin Android client:

> <https://github.com/laurent22/joplin/pull/11674/files?diff=unified&w=1>
>
> \# Summary
> 
> This pull request fixes #11292 by setting preventing React Native f…rom storing cookies when syncing to Nextcloud (see the \[React Native issue\](https://github.com/facebook/react-native/issues/23185).
> 
> \# Testing plan
> 
> 1. Create two profiles, \`Nextcloud 1\` and \`Nextcloud 2\`.
> 2. Authenticate \`Nextcloud 2\` with a Nextcloud account.
> 3. Sync.
> 4. Switch to \`Nextcloud 1\` and set up sync with a Nextcloud account on the same domain as \`Nextcloud 2\`.
> 5. Sync.
> 6. Verify that sync completes successfully.
> 7. Switch back to \`Nextcloud 2\`.
> 8. Sync.
> 9. Verify that sync completes successfully.

Big wins, huzzah!

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [May 13, 2025, 3:48pm UTC](https://help.nextcloud.com/t/webdav-error-on-mkcol-locks-with-joplin-android-client-after-switching-profiles/224060/3 "2025-05-13T15:48:37Z")

</div>

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