nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.18k stars 1.75k forks source link

Failure to upload large files ("Malformed server configuration") #13507

Open kopf opened 2 weeks ago

kopf commented 2 weeks ago

⚠️ Before posting ⚠️

Steps to reproduce

  1. On Android, download a 100MB file from https://ash-speed.hetzner.com/
  2. Share this file to the Nextcloud client app to upload it

Expected behaviour

The upload should complete successfully

Actual behaviour

The client reports "Malformed server configuration"

Android version

14

Device brand and model

Google Pixel 8

Stock or custom OS?

Stock

Nextcloud android app version

3.29.2

Nextcloud server version

Nextcloud Hub 8 (29.0.5)

Using a reverse proxy?

Yes

Android logs

No response

Server error logs

192.168.1.1 - kopf [02/Sep/2024:20:06:17 +0000] "GET /nextcloud/status.php HTTP/1.0" 200 938 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
192.168.1.1 - kopf [02/Sep/2024:20:06:18 +0000] "GET /nextcloud/ocs/v2.php/cloud/capabilities?format=json HTTP/1.0" 304 693 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
192.168.1.1 - kopf [02/Sep/2024:20:06:18 +0000] "GET /nextcloud/ocs/v2.php/apps/user_status/api/v1/predefined_statuses?format=json HTTP/1.0" 200 1958 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
192.168.1.1 - kopf [02/Sep/2024:20:06:18 +0000] "GET /nextcloud/ocs/v2.php/cloud/user?format=json HTTP/1.0" 200 2214 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
192.168.1.1 - kopf [02/Sep/2024:20:06:19 +0000] "PROPFIND /nextcloud/remote.php/dav/files/kopf/ HTTP/1.0" 207 2033 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
192.168.1.1 - kopf [02/Sep/2024:20:06:19 +0000] "GET /nextcloud/ocs/v2.php/apps/files_sharing/api/v1/shares?path=%2F&reshares=true&subfiles=true HTTP/1.0" 200 869 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
192.168.1.1 - kopf [02/Sep/2024:20:06:25 +0000] "HEAD /nextcloud/remote.php/dav/files/kopf/100MB.bin HTTP/1.0" 404 431 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
192.168.1.1 - kopf [02/Sep/2024:20:06:25 +0000] "MKCOL /nextcloud/remote.php/dav/uploads/kopf/1633b6b8358deb4a70514fb150fd4bbd HTTP/1.0" 405 789 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
192.168.1.1 - kopf [02/Sep/2024:20:06:26 +0000] "PROPFIND /nextcloud/remote.php/dav/uploads/kopf/1633b6b8358deb4a70514fb150fd4bbd HTTP/1.0" 207 1550 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.29.2"
192.168.1.1 - admin [02/Sep/2024:20:06:42 +0000] "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.0" 304 726 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"

Additional information

Important: this problem only occurs using the android client. I'm able to successfully upload files far larger than 100MB to the same server using the nextcloud client on macOS, or via the web interface. Therefore, this does not seem to be a problem with my reverse proxy, but rather with the chunking on the android client alone.

No /storage/emulated/0/data/ directory found to post android logs.

joshtrichards commented 1 week ago

I cannot reproduce this.

In the past when this has been reported it's basically always been traced to some server-side matter. I'd take a closer look at your config.

https://github.com/search?q=repo%3Anextcloud%2Fandroid+%22malformed+server%22&type=issues

You'll note that your web server log shows a 405 being returned, so something seems wrong:

192.168.1.1 - kopf [02/Sep/2024:20:06:25 +0000] "MKCOL /nextcloud/remote.php/dav/uploads/kopf/1633b6b8358deb4a70514fb150fd4bbd HTTP/1.0" 405

Check your Nextcloud log for possible clues as to what is causing that 405 (unless it's the proxy or web server itself; check their error logs).