Cannot reupload files using nextcloud client for android

Hi nextclouders,

i have a somewhat weird problem. I cannot reupload files. The behavior can be reproduced like this.

  1. Upload a file with the nextcloud client for android
  2. Delete the file on the server
  3. Try to reupload the file using the nextcloud client for android. The attempt result in an “Upload failed” error message. The file cannot be reuploaded.

The upload works using the Web UI.

Server: Nextcloud 10.0.1 (fresh install) on raspberry pi 3 using raspbian 8

Error message:

Exception: {"Message":"HTTP\/1.1 404 File with name Photos\/TestUpload\/20160317_092029.jpg could not be located","Exception":"Sabre\\DAV\\Exception\\NotFound","Code":0,"Trace":"#0 \/data\/www\/cloud\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(79): OCA\\DAV\\Connector\\Sabre\\ObjectTree->getNodeForPath('Photos\/TestUplo...', 0)\n#1 [internal function]: Sabre\\DAV\\CorePlugin->httpGet(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#2 \/data\/www\/cloud\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 \/data\/www\/cloud\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:GET', Array)\n#4 \/data\/www\/cloud\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(251): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response), false)\n#5 [internal function]: Sabre\\DAV\\CorePlugin->httpHead(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#6 \/data\/www\/cloud\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#7 \/data\/www\/cloud\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:HEAD', Array)\n#8 \/data\/www\/cloud\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#9 \/data\/www\/cloud\/nextcloud\/apps\/dav\/appinfo\/v1\/webdav.php(60): Sabre\\DAV\\Server->exec()\n#10 \/data\/www\/cloud\/nextcloud\/remote.php(165): require_once('\/data\/www\/cloud...')\n#11 {main}","File":"\/data\/www\/cloud\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/ObjectTree.php","Line":173,"User":"xxxxxx"}

Hi @TheHero,

looks like a bug to me. Can you do me a favor and check what happens if you refresh the folder in the Android app after you deleted the file? cc @tobiasKaminsky

Hi @Andy,

I recently upgraded PHP5 to PHP7 and now it seems to work.

I tried exactly the same and it even renames the file to xxxxxxx (2).jpg if I try to reupload the file.

Maybe this is more a server related issue than a issue of the android app.


1 Like

Hi @TheHero,

glad to hear the issue has been resolved in your case :slight_smile:



maybe this (Android app 1.4.0 RC2 (&RC3) fails to upload duplicates) is also related to this case?

It might be related yes and we need to further investigate this issue.

1 Like

It’s still failing to upload dupes for me on RC4 :slight_smile:

Will have to look into it and schedule it for 1.4.x (x > 0).

I guess I can’t call it a feature, eh :wink:

Up until this thread showing other scenarios where it fails it was debateable :slight_smile:

1 Like