nextcloud / nextcloud/ios

App freezes and uploads failing

Open
#1,445 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
2.5k
Forks
1k
Avg merge
2d 18h
Merged PRs (30d)
13

Description

Expected behaviour

upload files without troubles
for Android Devices this works with bigger files (>200MB) without troubles

Actual behaviour

ios app freezes and upload fails

nextcloud.log for one file:

{"reqId":"EUIcJLZjB2T3D1cGRtgi","level":0,"time":"2020-10-14T18:50:56+00:00","remoteAddr":"5.180.xxx.xxx","user":"--","app":"files_external","method":"PUT","url":"/remote.php/webdav/Photos/2020/10/20-10-13%2017-02
-16%204149.mov","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.8","version":"20.0.0.
9"}                                                                                                                                                                                                                
{"reqId":"EUIcJLZjB2T3D1cGRtgi","level":0,"time":"2020-10-14T18:50:56+00:00","remoteAddr":"5.180.xxx.xxx","user":"--","app":"files_sharing","method":"PUT","url":"/remote.php/webdav/Photos/2020/10/20-10-13%2017-02-
16%204149.mov","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.8","version":"20.0.0.9
"}                                                                                                                                                                                                                 
{"reqId":"EUIcJLZjB2T3D1cGRtgi","level":1,"time":"2020-10-14T18:50:56+00:00","remoteAddr":"5.180.xxx.xxx","user":"xXxXx","app":"no app in context","method":"PUT","url":"/remote.php/webdav/Photos/2020/10/20-10-13
%2017-02-16%204149.mov","message":"Deprecated event type for {\"[object] (OCP\\SabrePluginEvent)\":{\"*statusCode\":200,\"*message\":\"\",\"*server\":{\"[object] (OCA\\DAV\\Connector\\Sabre\\Server)\":{\"tree\":
\"[object] (OCA\\DAV\\Connector\\Sabre\\ObjectTree)\",\"*baseUri\":\"/remote.php/webdav/\",\"httpResponse\":\"[object] (Sabre\\HTTP\\Response)\",\"httpRequest\":\"[object] (Sabre\\HTTP\\Request)\",\"sapi\":\"[ob
ject] (Sabre\\HTTP\\Sapi)\",\"*plugins\":[],\"transactionType\":null,\"protectedProperties\":{\"...\":\"Over 20 items, aborting normalization\"},\"debugExceptions\":false,\"resourceTypeMapping\":[],\"enablePropf
indDepthInfinity\":true,\"xml\":\"[object] (Sabre\\DAV\\Xml\\Service)\",\"*listeners\":{\"...\":\"Over 20 items, aborting normalization\"},\"*wildcardListeners\":[],\"*listenerIndex\":[],\"*logger\":null}},\"Sym
fony\\Contracts\\EventDispatcher\\EventpropagationStopped\":false}}: null","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.8","version":"20.0.0.9"}                                                               
{"reqId":"ZqrKkenDAWoVLh3Rbv5y","level":0,"time":"2020-10-14T18:55:19+00:00","remoteAddr":"5.180.xxx.xxx","user":"xXxXx","app":"files_external","method":"PUT","url":"/remote.php/webdav/Photos/2020/10/20-10-13%20
17-02-16%204149.mov","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.8","version":"20
.0.0.9"}                                                                                                                                                                                                           
{"reqId":"ZqrKkenDAWoVLh3Rbv5y","level":0,"time":"2020-10-14T18:55:19+00:00","remoteAddr":"5.180.xxx.xxx","user":"xXxXx","app":"files_sharing","method":"PUT","url":"/remote.php/webdav/Photos/2020/10/20-10-13%201
7-02-16%204149.mov","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.8","version":"20.
0.0.9"}                                                                                                                                                                                                            
{"reqId":"ZqrKkenDAWoVLh3Rbv5y","level":1,"time":"2020-10-14T18:55:19+00:00","remoteAddr":"5.180.xxx.xxx","user":"xXxXx","app":"no app in context","method":"PUT","url":"/remote.php/webdav/Photos/2020/10/20-10-13
%2017-02-16%204149.mov","message":"Deprecated event type for {\"[object] (OCP\\SabrePluginEvent)\":{\"*statusCode\":200,\"*message\":\"\",\"*server\":{\"[object] (OCA\\DAV\\Connector\\Sabre\\Server)\":{\"tree\":
\"[object] (OCA\\DAV\\Connector\\Sabre\\ObjectTree)\",\"*baseUri\":\"/remote.php/webdav/\",\"httpResponse\":\"[object] (Sabre\\HTTP\\Response)\",\"httpRequest\":\"[object] (Sabre\\HTTP\\Request)\",\"sapi\":\"[ob
ject] (Sabre\\HTTP\\Sapi)\",\"*plugins\":[],\"transactionType\":null,\"protectedProperties\":{\"...\":\"Over 20 items, aborting normalization\"},\"debugExceptions\":false,\"resourceTypeMapping\":[],\"enablePropf
indDepthInfinity\":true,\"xml\":\"[object] (Sabre\\DAV\\Xml\\Service)\",\"*listeners\":{\"...\":\"Over 20 items, aborting normalization\"},\"*wildcardListeners\":[],\"*listenerIndex\":[],\"*logger\":null}},\"Sym
fony\\Contracts\\EventDispatcher\\EventpropagationStopped\":false}}: null","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.8","version":"20.0.0.9"}                                                               
{"reqId":"ZqrKkenDAWoVLh3Rbv5y","level":3,"time":"2020-10-14T18:56:21+00:00","remoteAddr":"5.180.xxx.xxx","user":"xXxXx","app":"no app in context","method":"PUT","url":"/remote.php/webdav/Photos/2020/10/20-10-13
%2017-02-16%204149.mov","message":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 306268658 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 78905340 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/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1143,"funct
ion":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":515,"function":"updateFile","class":"Sabre\\DAV\\Server","type":"->","a
rgs":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/va
r/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invok
eMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/app
s/dav/appinfo/v1/webdav.php","line":84,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/remote.php","line":167,"args":["/var/www/html/apps/dav/appinfo/v1/webdav.php"],"function"
:"require_once"}],"File":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","Line":246,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.8","version":"20.0.0.9"}                          
{"reqId":"ZqrKkenDAWoVLh3Rbv5y","level":0,"time":"2020-10-14T18:56:21+00:00","remoteAddr":"5.180.xxx.xxx","user":"xXxXx","app":"webdav","method":"PUT","url":"/remote.php/webdav/Photos/2020/10/20-10-13%2017-02-16
%204149.mov","message":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 306268658 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 78905340 bytes. Could eit
her 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/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1143,"function":"put",
"class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":515,"function":"updateFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** 
sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/html/
3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","c
lass":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/apps/dav/appin
fo/v1/webdav.php","line":84,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/remote.php","line":167,"args":["/var/www/html/apps/dav/appinfo/v1/webdav.php"],"function":"require_o
nce"}],"File":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","Line":246,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.8","version":"20.0.0.9"}

apache2 log:

5.180.XXX.XXX - xXxXx [14/Oct/2020:18:50:56 +0000] "PUT /remote.php/webdav/Photos/2020/10/20-10-13%2017-02-16%204149.mov HTTP/1.1" 201 1495 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.8"
5.180.XXX.XXX - xXxXx [14/Oct/2020:18:55:19 +0000] "PUT /remote.php/webdav/Photos/2020/10/20-10-13%2017-02-16%204149.mov HTTP/1.1" 400 512 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.8"
Steps to reproduce
Reasoning or why should it be changed/implemented?

bug or something

iOS version

14

App version

3.0.8

Server configuration

Operating system:
Ubuntu 20.04.1 LTS (Focal Fossa)

Web server:
apache2/focal-updates,focal-security,now 2.4.41-4ubuntu3.1 amd64 [installed]

Database:
apache2/focal-updates,focal-security,now 2.4.41-4ubuntu3.1 amd64 [installed]

PHP version:
php7.4/focal-updates,focal-security,now 7.4.3-4ubuntu2.2 all [installed,automatic]

Nextcloud version: (see Nextcloud admin page)
20.0.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the reported PUT path in apps/dav/appinfo/v1/webdav.php and the failure at apps/dav/lib/Connector/Sabre/File.php:246, then compare it with the iOS 3.0.8 upload behavior described in the logs. Reproduce an upload over 200 MB and determine whether the client freezes or sends fewer bytes than expected; done means the upload completes successfully without the reported 400 error.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.