Webdav file upload fails Exception Sabre\DAV\Exception\NotFound

Hi Community,

I’m using Nextcloud 10.0.1 (stable) on a shared host of all-inkl using PHP7. SSL encryption by let’s encrypt. WebUI works well so far.

Connecting a webdav client (Finder on OS X 10.11.6) works. Reading folders and downloading files work too. Just when I try to upload files there is an error message like “some data in “test.pdf” were not able to read or write. Error -36” (translated error message).

Uploads with CyberDuck work.

Error message in log file:
Exception: {“Message”:“HTTP/1.1 404 File with name test.pdf could not be located”,“Exception”:“Sabre\DAV\Exception\NotFound”,“Code”:0,“Trace”:"#0 /www/htdocs/wxxxxxx/ncloud/3rdparty/sabre/dav/lib/DAV/Server.php(903): OCA\DAV\Connector\Sabre\ObjectTree->getNodeForPath(‘test.pdf’)\n#1 /www/htdocs/wxxxxxx/ncloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(334): Sabre\DAV\Server->getPropertiesForPath(‘test.pdf’, Array, 0)\n#2 [internal function]: Sabre\DAV\CorePlugin->httpPropFind(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#3 /www/htdocs/wxxxxxx/ncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#4 /www/htdocs/wxxxxxx/ncloud/3rdparty/sabre/dav/lib/DAV/Server.php(459): Sabre\Event\EventEmitter->emit(‘method:PROPFIND’, Array)\n#5 /www/htdocs/wxxxxxx/ncloud/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#6 /www/htdocs/wxxxxxx/ncloud/apps/dav/appinfo/v1/webdav.php(60): Sabre\DAV\Server->exec()\n#7 /www/htdocs/wxxxxxx/ncloud/remote.php(165): require_once(’/www/htdocs/wxx…’)\n#8 {main}",“File”:"/www/htdocs/wxxxxxx/ncloud/apps/dav/lib/Connector/Sabre/ObjectTree.php",“Line”:173,“User”:“Michael”}

Many thanks in advance for your support!
Michael

PS: I tried also to setup a clean install of NC 10.0.1 - same behavior…

I’m currently troubleshooting a similar issue with image that wont upload from the Android app via the InstantUpload feature:

Exception: {
    "Message": "HTTP\/1.1 404 File with name InstantUpload\/IMG_20161204_163534.jpg could not be located",
    "Exception": "Sabre\\DAV\\Exception\\NotFound",
    "Code": 0,
    "Trace": "#0 \/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(79): OCA\\DAV\\Connector\\Sabre\\ObjectTree->getNodeForPath('InstantUpload\/I...', 0)\n#1 [internal function]: Sabre\\DAV\\CorePlugin->httpGet(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#2 \/var\/www\/html\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 \/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:GET', Array)\n#4 \/var\/www\/html\/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 \/var\/www\/html\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#7 \/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:HEAD', Array)\n#8 \/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#9 \/var\/www\/html\/nextcloud\/apps\/dav\/appinfo\/v1\/webdav.php(60): Sabre\\DAV\\Server->exec()\n#10 \/var\/www\/html\/nextcloud\/remote.php(165): require_once('\/var\/www\/html\/n...')\n#11 {main}",
    "File": "\/var\/www\/html\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/ObjectTree.php",
    "Line": 173,
    "User": "rb"
} 

The notification status says: “The operation couldn’t be completed, server is unav…” <- Unable to expand to see full message.

In my case my phone rebooted while I was taking pictures. No matter what I try, I’m unable to manually upload IMG_20161204_163534.jpg. I was able to upload a copy with a different name - “IMG_20161204_163534 - Copy.jpg”. I’m wondering if my phone rebooted while the app was uploading this file to the server and left some kind of ‘lock’ with the filename in the database.

Are you able to upload a copy of test.pdf with a different name?

No. The upload does not work for any file.

I saw that the hidden file from OS X (._test.pdf) is uploaded while the file “test.pdf” has just 0 kB:

I have a folder shared among 3 or 4 users. Often (apparently under some circumstances, when someone renames a folder) I got such Sabre\DAV\Exception\NotFound error. All clients turn RED complaining about CSYNC non able to find the folder. It persists till I remove the whole parent folder, wait for everyone to get synced and then put that folder in place again.

This is very annoying and I got the users asking if they can trust such system. This problem occurs at least once or twice a week. I am on 9.0.54 (PHP 5.6) with the last client version on Windows7.

This is the sequence:

{
“app”: “admin_audit”,
“level”: 1,
“message”: “File renamed: “/aaa/bbb” to “/aaa/ccc””,
“method”: “MOVE”,
“remoteAddr”: “removed”,
“reqId”: “vg74pcutcutcutS9tP+”,
“time”: “2016-12-20T09:06:19+00:00”,
“url”: “/remote.php/webdav/aaa/bbb”,
“user”: “user1”
}
{
“app”: “webdav”,
“level”: 0,
“message”: “Exception: {“Message”:“HTTP\/1.1 404 File with name aaa/bbb could not be located”,“Exception”:“Sabre\\DAV\\Exception\\NotFound”,“Code”:0,“Trace”:”#0 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(903): OCA\\DAV\\Connector\\Sabre\\ObjectTree->getNodeForPath(‘aaa\/bbb…’)\n#1 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(334): Sabre\\DAV\\Server->getPropertiesForPath(‘aaa\/bbb…’, Array, 1)\n#2 [internal function]: Sabre\\DAV\\CorePlugin->httpPropFind(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#3 \/var\/www\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#4 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit(‘method:PROPFIND’, Array)\n#5 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#6 \/var\/www\/nextcloud\/apps\/dav\/appinfo\/v1\/webdav.php(60): Sabre\\DAV\\Server->exec()\n#7 \/var\/www\/nextcloud\/remote.php(165): require_once(’\/var\/www\/nextcl…’)\n#8 {main}",“File”:"\/var\/www\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/ObjectTree.php",“Line”:173,“User”:“user2”}",
“method”: “PROPFIND”,
“remoteAddr”: “removed”,
“reqId”: “fjDmcutcutcutpmYpC”,
“time”: “2016-12-20T09:06:39+00:00”,
“url”: “/remote.php/webdav/aaa/bbb”,
“user”: “user2”
}

If I browse the aaa folder via web I can see both bbb and ccc, but if I try to enter the aaa I get redirected to the home folder.