Editing encrypted files on client: hanging with "Fetching most recent version of the file"
⚠️ Before posting ⚠️
- [X] This is a bug, not a question or an enhancement.
- [X] I've searched for similar issues and didn't find a duplicate.
- [X] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [X] I agree to follow Nextcloud's Code of Conduct.
Steps to reproduce
- Open Nextcloud Client on Android
- Open *.kdbx files with KeePassDX (or KeePass2Android)
- Unlock the file
- Edit or not
- Close file
- Nextcloud client shows the modal "Fetching most recent version of the file."
Expected behaviour
The same workflow works with a *.md file. It should work with encrypted files too.
I use these files to store passwords and share the same file between my desktop (using KeePassXC) and my mobile (using KeePassDX).
Actual behaviour
The client hangs indefinitely. I have to close it.
Android version
ColorOS 14.0, Android 14
Device brand and model
Oppo Find X5, CPH2307
Stock or custom OS?
Stock
Nextcloud android app version
3.29.3
Nextcloud server version
27.0.0
Using a reverse proxy?
No.
Android logs
The encrypted file I've edited is deposito.kdbx. The file is mentioned in the Android log.
Server error logs
I can't see related info in the server log. Copy and paste here the last entries, but are from yesterday.
{"reqId":"oumVLk0l8Y2Zrox8ylzv","level":3,"time":"2024-09-13T19:18:04+00:00","remoteAddr":"158.195.247.254","user":"jgrocha","app":"no app in context","method":"PUT","url":"/nextcloud/remote.php/dav/files/jgrocha/InstantUpload/Camera/2024/09/IMG20240913174303.jpg","message":"Expected filesize of 4250244 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 81920 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.29.1","version":"27.0.0.8","exception":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 4250244 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 81920 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":149,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":364,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":297,"message":"Expected filesize of 4250244 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 81920 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","exception":{},"CustomMessage":"Expected filesize of 4250244 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 81920 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side."}}
Additional information
I can't synchronize these keepass encrypted databases. I think it should be as easy as any other file.
Same with Nextcloud Hub 8 (29.0.7).
In fact, soon as I click the *.kdbx file, this message appears, but I can open the file. When I close the file and get back, the message will be there forever.
The issue also occurs with PDF files (I guess every file opened in an external app).
Even unencrypted files (I did not enable E2E yet).
I do not remember having this issue with < 3.29.3 (from F-Droid).