-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to upload files from Android (Error: Sabre\DAV\Exception\BadRequest: expected filesize XXX got 0) #14884
Comments
Hello, why did I missed triage? Missed any info? This is affecting lots of users - and appears to be related to Android Clients only |
Hi, I see a similar (but not exact) problem uploading anything over 2.4MB via any method (web, desktop client, dav:// - anything) with latest stable NC and the beta on freebsd-12 server/vm. I posted about it here: https://help.nextcloud.com/t/sabre-dav-exception-badrequest-expected-filesize-10485760-got-2554891/51338 but not here on github. I'll make another fresh VM and if the problem still happens, I'll post about it here, with fuller details than the initial report. Maybe part of the problem is that it's a generic error with multiple causes? I dunno. But it seems it's been posted about multiple times about multiple NC versions (and also OC) with no clear cause or fix. It might be a component that NC uses and not NC itself. |
Just as reference: #15095 (same error message caused by mod reqtimeout). |
My word. That seems to have sorted it. Thank you very much. So, it's an apache24 issue but not necessarily caused by apache itself. For the benefit of others: I installed FAMP like this - in among modules loaded, in /usr/local/etc/apache24/httpd.conf the following line was UNcommented. I don't know if it is uncommented by default or installation of the other packages uncommented it LoadModule reqtimeout_module libexec/apache24/mod_reqtimeout.so you'll need to comment it out and then restart apache |
@kesselb - Thanks for updating... |
@ivr588 - Glad it worked out for you.. and thanks for providing the help back. Hope it helps other users. |
Something in your nginx log? |
@kesselb Here's a log - Since user login until upload attempt of a file named 0d20180628155701p011976478776.m4a.
Any ideas? |
No error log? |
Here we go...
|
|
Have the same issue but with Nextcloud 16 and the Linux desktop client. Not sure what I can do now. Its not usable like that. :/ Should I open a new ticket since its a different version/client? |
@skjnldsv: thats true, I did a fresh install to test it and didnt changed the certificate back because it is pointless. SSL stampling is being ignored, but the comms are not shutdown. Even with SSL stampling off, I can use it from Windows and Apple devices. @r2p2, I think thats the best way. IMHO NC should NOT be used with Webdav actually. I removed it from 4 installs at this time because its totally unpredictable if it will work with all customer client devices. Its a great project if you like to use webinterface. Webdav? Just stay out. |
I'm not sure how to reproduce your issue 🤔 Mind to validate this error with |
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions. |
Still having this issue. |
@prodengineer mind to open a new issue? Without the issue template there is not much we can do. Please check https://help.nextcloud.com as well. To exclude a configuration issue with your server please use a test instance (https://try.nextcloud.com). |
Nextcloud version: 15.0.5.3
Operating system and version: Ubuntu 18.04.2 LTS
Apache or nginx version:
PHP version (eg, 7.1):
The issue you are facing: Cannot upload files from Android devices (using Browser or NextCloud App). Upload works fine using PC (Windows/Linux) and iOS devices
Using a Galaxy S8+, Android 9. Looks like WebDAV is missing some configuration/bug.
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
Install server, and just test it. Sometimes upload will just fail, others Android will complain about SSL initialization Failure.
Server is behind a NAT (port 443 is blocked by ISP, NAT is OK on both Router and Firewall - it works fine with other devices.
The output of your Nextcloud log in Admin > Logging:
{"reqId":"xHBTvUG5iHx1VVjmGy6F","level":3,"time":"2019-03-26T23:32:30+01:00","remoteAddr":"177.58.244.77","user":"sadminz","app":"no app in context","method":"PUT","url":"/remote.php/webdav/tc_claro_vowifi_29052017_0.pdf","message":{"Exception":"Sabre\DAV\Exception\BadRequest","Message":"expected filesize 253881 got 0","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":156,"function":"put","class":"OCA\DAV\Connector\Sabre\File","type":"->","args":[null]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1096,"function":"createFile","class":"OCA\DAV\Connector\Sabre\Directory","type":"->","args":["tc_claro_vowifi_29052017_0.pdf",null]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":525,"function":"createFile","class":"Sabre\DAV\Server","type":"->","args":["tc_claro_vowifi_29052017_0.pdf",null,null]},{"function":"httpPut","class":"Sabre\DAV\CorePlugin","type":"->","args":[{"absoluteUrl":"https://mydomain.com:17017/remote.php/webdav/tc_claro_vowifi_29052017_0.pdf","class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"class":"Sabre\DAV\CorePlugin"},"httpPut"],[{"absoluteUrl":"https://mydomain.com:17017/remote.php/webdav/tc_claro_vowifi_29052017_0.pdf","class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":479,"function":"emit","class":"Sabre\Event\EventEmitter","type":"->","args":["method:PUT",[{"absoluteUrl":"https://mydomain.com:17017/remote.php/webdav/tc_claro_vowifi_29052017_0.pdf","class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":254,"function":"invokeMethod","class":"Sabre\DAV\Server","type":"->","args":[{"absoluteUrl":"https://mydomain.com:17017/remote.php/webdav/tc_claro_vowifi_29052017_0.pdf","class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]},{"file":"/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php","line":80,"function":"exec","class":"Sabre\DAV\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/remote.php","line":163,"args":["/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":217,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Android) ownCloud-android/3.5.1","version":"15.0.5.3"}
{"reqId":"xHBTvUG5iHx1VVjmGy6F","level":4,"time":"2019-03-26T23:32:30+01:00","remoteAddr":"177.58.244.77","user":"sadminz","app":"webdav","method":"PUT","url":"/remote.php/webdav/tc_claro_vowifi_29052017_0.pdf","message":{"Exception":"Sabre\DAV\Exception\BadRequest","Message":"expected filesize 253881 got 0","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":156,"function":"put","class":"OCA\DAV\Connector\Sabre\File","type":"->","args":[null]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1096,"function":"createFile","class":"OCA\DAV\Connector\Sabre\Directory","type":"->","args":["tc_claro_vowifi_29052017_0.pdf",null]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":525,"function":"createFile","class":"Sabre\DAV\Server","type":"->","args":["tc_claro_vowifi_29052017_0.pdf",null,null]},{"function":"httpPut","class":"Sabre\DAV\CorePlugin","type":"->","args":[{"absoluteUrl":"https://mydomain.com:17017/remote.php/webdav/tc_claro_vowifi_29052017_0.pdf","class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"class":"Sabre\DAV\CorePlugin"},"httpPut"],[{"absoluteUrl":"https://mydomain.com:17017/remote.php/webdav/tc_claro_vowifi_29052017_0.pdf","class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":479,"function":"emit","class":"Sabre\Event\EventEmitter","type":"->","args":["method:PUT",[{"absoluteUrl":"https://mydomain.com:17017/remote.php/webdav/tc_claro_vowifi_29052017_0.pdf","class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":254,"function":"invokeMethod","class":"Sabre\DAV\Server","type":"->","args":[{"absoluteUrl":"https://mydomain.com:17017/remote.php/webdav/tc_claro_vowifi_29052017_0.pdf","class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]},{"file":"/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php","line":80,"function":"exec","class":"Sabre\DAV\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/remote.php","line":163,"args":["/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":217,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Android) ownCloud-android/3.5.1","version":"15.0.5.3"}
The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):
www-data@cloud:/var/www/nextcloud$ php occ config:list
{
"system": {
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"mydomain.com",
"192.168.2.221"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"dbtype": "mysql",
"version": "15.0.5.3",
"overwrite.cli.url": "https://mydomain.com:17017",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true,
"instanceid": "REMOVED SENSITIVE VALUE",
"activity_expire_days": 14,
"auth.bruteforce.protection.enabled": false,
"blacklisted_files": [
".htaccess",
"Thumbs.db",
"thumbs.db"
],
"cron_log": true,
"enable_previews": true,
"enabledPreviewProviders": [
"OC\Preview\PNG",
"OC\Preview\JPEG",
"OC\Preview\GIF",
"OC\Preview\BMP",
"OC\Preview\XBitmap",
"OC\Preview\Movie",
"OC\Preview\PDF",
"OC\Preview\MP3",
"OC\Preview\TXT",
"OC\Preview\MarkDown"
],
"filesystem_check_changes": 0,
"filelocking.enabled": "true",
"htaccess.RewriteBase": "/",
"integrity.check.disabled": false,
"knowledgebaseenabled": false,
"log_rotate_size": 104857600,
"logfile": "/var/nc_data/nextcloud.log",
"logtimezone": "Europe/Berlin",
"memcache.local": "\OC\Memcache\APCu",
"memcache.locking": "\OC\Memcache\Redis",
"preview_max_x": 1024,
"preview_max_y": 768,
"preview_max_scale_factor": 1,
"redis": {
"host": "REMOVED SENSITIVE VALUE",
"port": 0,
"timeout": 0
},
"quota_include_external_storage": false,
"share_folder": "/Shares",
"skeletondirectory": "",
"trashbin_retention_obligation": "auto, 7"
},
"apps": {
"accessibility": {
"enabled": "yes",
"installed_version": "1.1.0",
"types": ""
},
"activity": {
"enabled": "yes",
"installed_version": "2.8.2",
"types": "filesystem"
},
"admin_audit": {
"enabled": "yes",
"installed_version": "1.5.0",
"types": "logging"
},
"backgroundjob": {
"lastjob": "22"
},
"cloud_federation_api": {
"enabled": "yes",
"installed_version": "0.1.0",
"types": "filesystem"
},
"comments": {
"enabled": "yes",
"installed_version": "1.5.0",
"types": "logging"
},
"core": {
"backgroundjobs_mode": "cron",
"installedat": "1553607287.935",
"lastcron": "1553651101",
"lastupdateResult": "[]",
"lastupdatedat": "1553650180",
"public_files": "files_sharing/public.php",
"public_webdav": "dav/appinfo/v1/publicwebdav.php",
"scss.variables": "db81cddf52fdb3c8ca1e4c859e214124",
"shareapi_default_permission_cancreate": "no",
"shareapi_default_permission_canshare": "no",
"shareapi_default_permissions": "1",
"vendor": "nextcloud"
},
"dav": {
"enabled": "yes",
"installed_version": "1.8.1",
"types": "filesystem"
},
"federatedfilesharing": {
"enabled": "yes",
"installed_version": "1.5.0",
"types": ""
},
"federation": {
"enabled": "yes",
"installed_version": "1.5.0",
"types": "authentication"
},
"files": {
"cronjob_scan_files": "500",
"enabled": "yes",
"installed_version": "1.10.0",
"types": "filesystem"
},
"files_pdfviewer": {
"enabled": "yes",
"installed_version": "1.4.0",
"types": ""
},
"files_sharing": {
"enabled": "yes",
"incoming_server2server_share_enabled": "no",
"installed_version": "1.7.0",
"lookupServerUploadEnabled": "no",
"outgoing_server2server_share_enabled": "no",
"types": "filesystem"
},
"files_texteditor": {
"enabled": "yes",
"installed_version": "2.7.0",
"types": ""
},
"files_trashbin": {
"enabled": "yes",
"installed_version": "1.5.0",
"types": "filesystem,dav"
},
"files_versions": {
"enabled": "yes",
"installed_version": "1.8.0",
"types": "filesystem,dav"
},
"files_videoplayer": {
"enabled": "yes",
"installed_version": "1.4.0",
"types": ""
},
"firstrunwizard": {
"enabled": "yes",
"installed_version": "2.4.0",
"types": "logging"
},
"gallery": {
"enabled": "yes",
"installed_version": "18.2.0",
"types": ""
},
"logreader": {
"enabled": "yes",
"installed_version": "2.0.0",
"types": ""
},
"lookup_server_connector": {
"enabled": "yes",
"installed_version": "1.3.0",
"types": "authentication"
},
"nextcloud_announcements": {
"enabled": "yes",
"installed_version": "1.4.0",
"pub_date": "Sat, 10 Dec 2016 00:00:00 +0100",
"types": "logging"
},
"notifications": {
"enabled": "yes",
"installed_version": "2.3.0",
"types": "logging"
},
"oauth2": {
"enabled": "yes",
"installed_version": "1.3.0",
"types": "authentication"
},
"password_policy": {
"enabled": "yes",
"installed_version": "1.5.0",
"types": ""
},
"provisioning_api": {
"enabled": "yes",
"installed_version": "1.5.0",
"types": "prevent_group_restriction"
},
"serverinfo": {
"enabled": "yes",
"installed_version": "1.5.0",
"types": ""
},
"sharebymail": {
"enabled": "yes",
"installed_version": "1.5.0",
"types": "filesystem"
},
"support": {
"enabled": "yes",
"installed_version": "1.0.0",
"types": ""
},
"survey_client": {
"enabled": "yes",
"installed_version": "1.3.0",
"types": ""
},
"systemtags": {
"enabled": "yes",
"installed_version": "1.5.0",
"types": "logging"
},
"theming": {
"enabled": "yes",
"installed_version": "1.6.0",
"types": "logging"
},
"twofactor_backupcodes": {
"enabled": "yes",
"installed_version": "1.4.1",
"types": ""
},
"updatenotification": {
"enabled": "yes",
"installed_version": "1.5.0",
"types": ""
},
"workflowengine": {
"enabled": "yes",
"installed_version": "1.5.0",
"types": "filesystem"
}
}
}
The text was updated successfully, but these errors were encountered: