PhilippC / keepass2android

Password manager app for Android
https://play.google.com/store/apps/details?id=keepass2android.keepass2android
GNU General Public License v3.0
4.7k stars 378 forks source link

Android 9: Upload to nextcloud fails #1608

Open crwarrior opened 3 years ago

crwarrior commented 3 years ago

My database is located on my own nextcloud server (v21.0.0). The DB downloads to android without any problems, but the upload after changing the DB does not work. There is no indication in KP2A (v1.0.9-pre1) that the save did not work. On another computer, syncing with the nextcloud client works just fine.

When examining the server logs, these are the two entries:

KP2FA
[13/Mar/2021:20:56:07 +0100] "GET /remote.php/webdav/DB.kdbx HTTP/2.0" 401 414 "-" "okhttp/4.10.0-RC1"
[13/Mar/2021:20:56:07 +0100] "GET /remote.php/webdav/DB.kdbx HTTP/2.0" 200 19522 "-" "okhttp/4.10.0-RC1"
[13/Mar/2021:20:56:09 +0100] "PUT /remote.php/webdav/DB.kdbx HTTP/2.0" 302 - "-" "okhttp/4.10.0-RC1"
[13/Mar/2021:20:56:09 +0100] "GET /login HTTP/2.0" 200 7713 "-" "okhttp/4.10.0-RC1"
Nextcloud client
[13/Mar/2021:20:51:13 +0100] "PUT /remote.php/dav/files/user/DB.kdbx HTTP/1.1" 204 - "-" "Mozilla/5.0 (Linux) mirall/3.1.3git (Nextcloud)"

The URL provided in Nextcloud for WebDAV access matches the one in the Nextcloud client request.

When I change the URL at the Recent database selection list to the /dav/files/user/-format, the DB upload works as expected.

PhilippC commented 3 years ago

I don't know why this is not working in your setup. Did you try to open /remote.php/dav/files/user/DB.kdbx as a WebDav URL from KP2A to have the same path in both clients?

mitohund commented 1 year ago

Just wanted to leave a quick comment that this has been happening to me as well. I actually have been thinking that everything is fine for a few months now, because KP2A didn't notify me of any errors. The only thing that was a bit weird was that once I saved my database it would always say that there had been external changes and whether I would like to merge them. I always said yes - and then later noticed that the changes made on mobile were not actually reflected in the database.

After switching to WebDav instead of Nextcloud, everything seems to be working fine.

Since nobody has commented on this in such a long time, I'm wondering if it's a configuration error somewhere or if it's just a very infrequently used feature.