Skip to content
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

400 Badrequest - expected filesize xx got yy #28888

Closed
madchap opened this issue Sep 3, 2017 · 4 comments
Closed

400 Badrequest - expected filesize xx got yy #28888

madchap opened this issue Sep 3, 2017 · 4 comments

Comments

@madchap
Copy link

madchap commented Sep 3, 2017

Using the latest container version today, I encounter that error that seemed to make quite some noise for a few years now. I've tried some of the workarounds offered on the internet, to no avail.

It happens to me here whereas the server and client are in home networks (server is 192.168.10.xx and client at 192.168.20.xx). Network stability is ok. php is set to 2G filesize max upload.

Running sqlite in the backend (2 users, few files, yet usually bigger size files around 1Gb).

Steps to reproduce

  1. Take a file between 100Mb and 400Mb (but could be more I guess)
  2. Drag n drop the file to owncloud
  3. See the server trace - error 400

Expected behaviour

The file transfers successfully everytime.

Actual behaviour

The upload is interrupted with message in the UI about reloading the page in 5 seconds.

Server configuration

Operating system: Centos 7

Running latest docker owncloud-docker/server.
owncloud/server latest a4f1b7ecb761 9 days ago 745MB

No errors have been found.

Log

{"reqId":"visWv1oOtQJwdW6h66AU","level":4,"time":"2017-09-02T10:23:35+00:00","remoteAddr":"34.34.54.23","user":"xxxxx","app":"webdav","method":"PUT","url":"\/remote.php\/webdav\/xxxxxx.mp4","message":"Exception: {\"Message\":\"HTTP\\\/1.1 400 expected filesize 549163863 got 3653632\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\BadRequest\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Directory.php(158): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->put(Resource id #57)\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1095): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->createFile('All_HANDS_2016-...', Resource id #57)\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(525): Sabre\\\\DAV\\\\Server->createFile('KS\\\/All_HANDS_20...', Resource id #57, NULL)\\n#3 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#5 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#7 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(63): Sabre\\\\DAV\\\\Server->exec()\\n#8 \\\/var\\\/www\\\/owncloud\\\/remote.php(165): require_once('\\\/var\\\/www\\\/ownclo...')\\n#9 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php\",\"Line\":156,\"User\":\"xxxxx\"}"}
@madchap
Copy link
Author

madchap commented Sep 3, 2017

@ghost
Copy link

ghost commented Sep 3, 2017

The first steps are probably to:

Such issues are more or less caused by some components like webserver, PHP, database or network which is timing out or stripping data during the upload.

I guess the post is also better fitting into https://central.owncloud.org/ where a large FAQ about this is maintained at https://central.owncloud.org/t/expected-filesize-xxx-got-yyy-0/816

@ghost ghost added the needs info label Sep 3, 2017
@ghost
Copy link

ghost commented Oct 9, 2017

So closing here for now. There are also a few more new infos gathered about such issues at e.g. owncloud-archive/documentation#3437

@lock
Copy link

lock bot commented Aug 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 1, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants