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

Sabre-DAV-Exception: expected filesize 10240000 got 7217152 #4005

Closed
boldt opened this issue May 11, 2019 · 25 comments
Closed

Sabre-DAV-Exception: expected filesize 10240000 got 7217152 #4005

boldt opened this issue May 11, 2019 · 25 comments
Labels
bug needs info Waiting for info from user(s). Issues with this label will auto-stale. stale

Comments

@boldt
Copy link

boldt commented May 11, 2019

Actual behaviour

My nextcloud app uploads images and screenshots without any issues. For example, the screenshots in this report where uploaded automatically. Unfortunately, it does not upload a video of size > 100MB. The log of my nextcloud server contains the following exception:

Sabre\\\\DAV\\\\Exception\\\\Bad Request","Message":"expected filesize 10240000 got 7217152

My notification bar shows "uploading" and after some time "SSL initialization fails":

Screenshot_20190511-154714
Screenshot_20190511-154718

The message "SSL initialization fails" seems to be wrong, since the upload for images works.

The app itself shows "uploading" and then "connection error":

Screenshot_20190511-154646
Screenshot_20190511-154709

It seems to be related to:

Expected behaviour

The file should be uploaded

Steps to reproduce

  1. Start a nextcloud server
  2. Connectthe nextcloud app
  3. Upload a huge file

Environment data

  • Android version: 7.1.1
  • Device model: Sony Z5
  • Stock or customized system: Stock
  • Nextcloud app version: 3.6.0
  • Nextcloud server version: 16.0.0 (docker, also happened with 15.x)
@boldt boldt added the bug label May 11, 2019
@tobiasKaminsky
Copy link
Member

If 1M is advertised, but only a part of it gets transferred it seems to me to be either a client (crash during upload/ no connection) or a server (connection get closed) problem.

Can you create us a test account, test if the problem occurs also there and if so send the credentials to tobias at nextcloud dot com with a reference to this issue?

@hex-m
Copy link

hex-m commented May 23, 2019

It's understandable that this can happen. It happened to me and my guess is that the phone lost the network connection. But as the client (hopefully) recognizes this and fixes this the next time it syncs, I don't think this should be shown as an error in the user interface and as a "fatal" entry in the server log. Maybe only log/show that error when it happens multiple times in a row?

@boldt
Copy link
Author

boldt commented May 23, 2019

Actually, my phone tries and tries it again and it fails all the time.

@tobiasKaminsky I'll create an account.

@Powerbless
Copy link

Powerbless commented Jun 2, 2019

i have the same problem! My Handy is an Huawei Mate 20pro and smaller video files uploads no problem but files over 100MB uploading trough the app bad. the nextcloud app retry retry and append on every retry a "(2)" at the end of the file. upload the same file over the laptop website on my nextcloud works fine!
Unbenannt

@stale
Copy link

stale bot commented Jun 30, 2019

This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

@stale stale bot added the stale label Jun 30, 2019
@Powerbless
Copy link

problem still exists

@stale stale bot removed the stale label Jun 30, 2019
@kesselb
Copy link
Contributor

kesselb commented Jun 30, 2019

Are you able to reproduce this with https://demo.nextcloud.com?

@Powerbless
Copy link

I tested with the Demo Server and yes, i have the Same Error Like the author from These Bug Report Here. I tested zu Upload a 660MB Video File and got Same error

@AndyScherzinger
Copy link
Member

pinging @tobiasKaminsky ❗️ Your the expert when it comes to chunking 🥇

@tobiasKaminsky
Copy link
Member

Hm. I tested it with my local server and 500Mb and it worked.

What is strange is that it should not show the uploaded file at all, if upload fails.
So you would not create (2), (3)…

@detly
Copy link

detly commented Jul 11, 2019

I have exactly this problem. Server is 16.0.3. Android client is 3.7.0. Home internet connection is a bit flaky, but most other services manage to work around it (Google Drive, Dropbox, etc). I have this problem with any file over about 40MB(!).

On the server I see the same expected/got error (here for a 350MB video file):

[webdav] Fatal: Sabre\DAV\Exception\BadRequest: expected filesize 10240000 got 4165632 at <<closure>>

 0. /home/ncuser/public_html/apps/dav/lib/Connector/Sabre/Directory.php line 156
    OCA\DAV\Connector\Sabre\File->put(null)
 1. /home/ncuser/public_html/apps/dav/lib/Upload/UploadFolder.php line 45
    OCA\DAV\Connector\Sabre\Directory->createFile("0000000112640000-0000000122879999", null)
 2. /home/ncuser/public_html/3rdparty/sabre/dav/lib/DAV/Server.php line 1096
    OCA\DAV\Upload\UploadFolder->createFile("0000000112640000-0000000122879999", null)
 3. /home/ncuser/public_html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 525
    Sabre\DAV\Server->createFile("uploads/jason/a ... 9", null, null)
 4. <<closure>>
    Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
 5. /home/ncuser/public_html/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},"httpPut"], [Sabre\HTTP\Requ ... }])
 6. /home/ncuser/public_html/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    Sabre\Event\EventEmitter->emit("method:PUT", [Sabre\HTTP\Requ ... }])
 7. /home/ncuser/public_html/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
 8. /home/ncuser/public_html/apps/dav/lib/Server.php line 316
    Sabre\DAV\Server->exec()
 9. /home/ncuser/public_html/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
10. /home/ncuser/public_html/remote.php line 163
    undefinedundefinedrequire_once("/home/ncuser/ ... p")

PUT /remote.php/dav/uploads/jason/a5e32b6f27c2ede8b48459c8f185a469/0000000112640000-0000000122879999
from 61.69.174.213 by jason at 2019-07-11T05:43:40+00:00

On the client I see "SSL Initialization Failed."

I do not see multiple copies of the uploaded file as @Powerbless sees, for me the file never appears on the server.

This happens with:

  • Nextcloud app, auto upload from camera folder
  • Nextcloud app, manual upload
  • Upload via 3rd party DAV client eg. Solid Explorer (which reports "SSL communication error")

I'll note that on my work network, I almost never get the issue. My home internet is not as fast or reliable, but it's not terrible, and it would be nice if Nextcloud could handle that.

I would be happy to set up a test account on my server, just let me know if you think that would help.

@boldt
Copy link
Author

boldt commented Jul 13, 2019

I always forgot one important information (sorry): My nextcloud ran behing an Apache Reverse Proxy.
Now I switched to Traefik and the issue seems to be gone.

@kesselb
Copy link
Contributor

kesselb commented Jul 13, 2019

Thanks for your feedback. See nextcloud/server#15095 for more information. mod_reqtimeout does not work well with SabreDav.

@Powerbless
Copy link

No my nextcloud is only behind a Router.

But i can told You another Thing: If i Upload the movie File trough the Homepage Interface, then the Upload finished without Problems!

@kesselb
Copy link
Contributor

kesselb commented Jul 13, 2019

@Powerbless mind to open a new issue? It's easier to reproduce your issue with these information. You can reference this thread.

@stale
Copy link

stale bot commented Aug 10, 2019

This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

@srntm
Copy link

srntm commented Dec 2, 2019

hey, any update on this? I have exactly the same problem. :(

@stale stale bot removed the stale label Dec 2, 2019
@Powerbless
Copy link

hey, any update on this? I have exactly the same problem. :(

Yes, i switched to nextcloud-vm (Google) and all works fine after a hand full of customizations. Is this a solution for You? And dont worry. You have normaly to pay for bigger vm with more that 500gb HDD but there is a workaround to Bypass the Limit

@srntm
Copy link

srntm commented Dec 3, 2019

thanks for your reply! unfortunately that's not a good solution for me, I need the data in house.

The very strange thing is that sometimes uploads (even really big ones like ~5gb) works like a charm. But I do have a file (~1.9gb) where I get exactly the same error message in the apache logs when uploading. so strange. :(

@stale
Copy link

stale bot commented Dec 31, 2019

This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

@stale stale bot added the stale label Dec 31, 2019
@stale stale bot closed this as completed Jan 14, 2020
@bazio101
Copy link

bazio101 commented Feb 8, 2020

I was facing the same problem:
"SSL Initialisation Failed" on client side.
Every time I was trying to upload a file (no matter what, image, pdf, video, etc), that needed more than ~25-30 seconds to upload, the connection was lost with the above message. If the file was small enough, in combination with my internet speed, everything was fine. Same problem with android app on android version 5 and 8, same with firefox and chrome on PC.
The solution was to disable mod_reqtimeout module in httpd.conf file according to instructions here: https://help.nextcloud.com/t/sabre-dav-exception-badrequest-expected-filesize-10485760-got-2554891/51338/25. One can try to just change the values.
I' m not sure if things went bad after upgraded from apache 2.4.38 to 2.4.39 as mentioned in this site, but I remember files uploading just fine some months ago. Just couldn't find a starting point, cause I also upgraded PHP (from 5.x to 7.1) and nextcloud server from 13.x to 16.x.
I'm struggling with this the last 4-5 months. It's working fine now.
Hope that someone finds this useful.

@stale stale bot removed the stale label Feb 10, 2020
@stale
Copy link

stale bot commented Mar 9, 2020

This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

@stale stale bot added the stale label Mar 9, 2020
@tobiasKaminsky
Copy link
Member

Can other confirm the solution by @bazio101?

@tobiasKaminsky tobiasKaminsky added the needs info Waiting for info from user(s). Issues with this label will auto-stale. label Mar 25, 2020
@detly
Copy link

detly commented Apr 4, 2020

@tobiasKaminsky I am still getting this problem but it's shared hosting, so no.

@stale
Copy link

stale bot commented May 2, 2020

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

@stale stale bot added the stale label May 2, 2020
@stale stale bot closed this as completed May 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs info Waiting for info from user(s). Issues with this label will auto-stale. stale
Projects
None yet
Development

No branches or pull requests

9 participants