nextcloud / nextcloud/android

Editing encrypted files on client: hanging with "Fetching most recent version of the file"

Open
#13,570 2 comments 0 reactions 0 assignees View on GitHub
bug feature: files stable-3.29
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### ⚠️ Before posting ⚠️

- [X] This is a **bug**, not a question or an enhancement.
- [X] I've [searched for similar issues](https://github.com/nextcloud/android/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](https://nextcloud.com/contribute/code-of-conduct/).

### Steps to reproduce

1. Open Nextcloud Client on Android
2. Open *.kdbx files with KeePassDX (or KeePass2Android)
3. Unlock the file
4. Edit or not
5. Close file
6. 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.
![Screenshot_2024-09-15-16-56-12-63_06ea656a9ba653ff96746f477f32d0f9](https://github.com/user-attachments/assets/0c31bc11-efbc-41e8-9124-2bb5000db7db)

### 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.

[logcatOutput.txt](https://github.com/user-attachments/files/17006571/logcatOutput.txt)

### Server error logs

I can't see related info in the server log. Copy and paste here the last entries, but are from yesterday.

```text
{"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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.