ios-legacy icon indicating copy to clipboard operation
ios-legacy copied to clipboard

Incorrect conflict error and file not uploaded

Open gbiggs opened this issue 9 years ago • 9 comments

Steps to reproduce

  1. Produce a file and upload it (any file will do, e.g. take a photo or a PDF sent from the web browser or select "New text file" in the menu for a folder)
  2. Go to the uploads tab
  3. Observe file conflict error

Expected behaviour

File should be uploaded to the server.

Actual behaviour

File upload fails with "Conflict error". The server reports that it could not locate the file with that name.

Selecting the failed upload and choosing "overwrite" results in a successful upload.

Uploading files works correctly from the desktop clients and the web interface.

Server configuration

Debian 8 on amd64 owncloud 9.1.0-1.1 (installed from package)

Web server: nginx 1.6.2-5+deb8u2

Database: postgresql 9.4+165+deb8u1

PHP version: php5 5.6.24+dfsg-0+deb8u1

Client

iOS version: 9.3.5 (13G36)

ownCloud app version: 3.5.0 (84af711)

Device model: iPad Air Wifi model A1474

Logs

Web server error log

[08/Sep/2016:08:51:10 +0900] "PROPFIND /remote.php/webdav/miscellaneous/a%20file.txt HTTP/1.1" 200 6405 "-" "Mozilla/5.0 (iOS) ownCloud-iOS/3.5.0"
[08/Sep/2016:08:51:24 +0900] "PROPFIND /remote.php/webdav/InstantUpload/Photo-2016-09-08-08-51-23_1293.JPG HTTP/1.1" 200 6405 "-" "Mozilla/5.0 (iOS) ownCloud-iOS/3.5.0"
[08/Sep/2016:08:51:26 +0900] "GET /status.php HTTP/1.1" 200 107 "-" "Mozilla/5.0 (iOS) ownCloud-iOS/3.5.0"
[08/Sep/2016:08:51:27 +0900] "PROPFIND /remote.php/webdav/miscellaneous/a%20file.txt HTTP/1.1" 200 6405 "-" "Mozilla/5.0 (iOS) ownCloud-iOS/3.5.0"

ownCloud log (data/owncloud.log)

{"reqId":"XbutuSmem43q7WhqO0nK","remoteAddr":"xxx.xxx.xxx.xxx","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 404 File with name InstantUpload\\\/Photo-2016-09-08-08-51-23_1293.JPG could not be located\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\NotFound\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(903): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->getNodeForPath('InstantUpload\\\/P...')\\n#1 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(334): Sabre\\\\DAV\\\\Server->getPropertiesForPath('InstantUpload\\\/P...', Array, 0)\\n#2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPropFind(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:PROPFIND', Array)\\n#5 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(56): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/var\\\/www\\\/owncloud\\\/remote.php(164): require_once('\\\/var\\\/www\\\/ownclo...')\\n#8 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/ObjectTree.php\",\"Line\":170,\"User\":\"geoff\"}","level":0,"time":"2016-09-08T08:51:24+09:00","method":"PROPFIND","url":"\/remote.php\/webdav\/InstantUpload\/Photo-2016-09-08-08-51-23_1293.JPG","user":"geoff"}
{"reqId":"c7uzeK9Z8NzXlFjQtPVX","remoteAddr":"xxx.xxx.xxx.xxx","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 404 File with name miscellaneous\\\/a file.txt could not be located\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\NotFound\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(903): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->getNodeForPath('miscellaneous\\\/a...')\\n#1 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(334): Sabre\\\\DAV\\\\Server->getPropertiesForPath('miscellaneous\\\/a...', Array, 0)\\n#2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPropFind(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:PROPFIND', Array)\\n#5 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(56): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/var\\\/www\\\/owncloud\\\/remote.php(164): require_once('\\\/var\\\/www\\\/ownclo...')\\n#8 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/ObjectTree.php\",\"Line\":170,\"User\":\"geoff\"}","level":0,"time":"2016-09-08T08:51:26+09:00","method":"PROPFIND","url":"\/remote.php\/webdav\/miscellaneous\/a%20file.txt","user":"geoff"}

gbiggs avatar Sep 08 '16 00:09 gbiggs

I can second that

andreasba avatar Sep 08 '16 19:09 andreasba

I'm not sure I understand what you are trying to upload. A file with the same name that exists already? A new file? Why would the server generate this in the log?

guruz avatar Sep 14 '16 15:09 guruz

@guruz: a normal photo should be uploaded which does not work because the stated error is thrown. When uploading it manually again (by retrying the upload) it works. This is all I can tell you about it :-)

andreasba avatar Sep 14 '16 17:09 andreasba

@guruz I am trying to upload a new file. For example, if I take a new photo with the camera, the next time I open the owncloud app it will try to upload it, then fail and produce this error. If I download a PDF in Safari, send it to the owncloud app and try to upload it, it fails and produces this error. If I send an attachment from e-mail to the owncloud app and try to upload it, it fails and produces this error. Any upload that I attempt will fail and produce this error. I don't know why the server produces that log.

Because uploads from the web browser and the desktop apps work fine, I do not think it is a server problem. I think it is a problem with the way the iOS app is interacting with the server.

I can produce a video of the problem if you think that would help.

gbiggs avatar Sep 15 '16 23:09 gbiggs

I reproduce the problem as well, mainly with instant uploads. The app try to upload again files that are already uploaded, causing the conflict (the file is already uploaded and exists) or uploading it again if the account was switched to another one.

The problem could be that the app searchs for the files to upload from a timestamp previous to the last uploaded files, and retry them.

With manual uploads and uploads from external apps (by sharing with) i do not reproduce the problem. More info about those cases will be helpful also. This problem is reported to be fixed in next version.

jesmrec avatar Sep 29 '16 10:09 jesmrec

I saw the update for the iOS client app this morning and installed it. The problem still exists. I tried uninstalling the app and reinstalling it, but this made no difference.

I have made a video of the problem occurring.

The video first shows changing from the client app (a fresh install, so no upload history or failed uploads) to the camera. A photo is taken, and when switching back to the client app, it appears as a failed upload due to a conflict error. Since the photo was just taken, there are no files on the server with the same name. Renaming the file to something else (also not on the server) results in another conflict error. Selecting "overwrite" allows the file to be uploaded correctly.

The video then shows switching to Safari and opening a PDF that I have never opened before. The PDF is sent to the client app to be uploaded. When I switch back to the client app, it appears as a failed upload, with a conflict error. As before, renaming the file doesn't allow it to be uploaded, but selecting "overwrite" does.

https://www.dropbox.com/s/llpiywrurn6t199/owncloud_ios_upload_bug.mp4?dl=0

gbiggs avatar Sep 30 '16 02:09 gbiggs

@gbiggs I could not reproduce the problem with the following scenarios:

  1. iOS 9.3 iPhone 6S app version 3.5.0

  2. iOS 8.4 iPadAir app version 3.5.0

Servers 9.1.0 and 9.1.1 PHP Version => 5.5.9-1ubuntu4.13

The server side could be involved. So, it would be helpful whether you provide us a testing account on your server. Yo can mail it to [email protected]. Thanks!!!

jesmrec avatar Oct 25 '16 13:10 jesmrec

@gbiggs is the problem reproducible yet with your device/server? if can provide us a test account, it could be helpful to us to reproduce the problem. Thanks.

jesmrec avatar Nov 23 '16 09:11 jesmrec

Sorry for the delay keeping up with this issue.

The server is private, so I'm going to do some testing of my own (e.g. with a new user, a new DB, etc.) before I provide a test account. Hopefully I'll be able to narrow the source of the problem down to either a configuration error or something easily reproducible.

gbiggs avatar Nov 25 '16 06:11 gbiggs