WebDAV: "409 Parent node does not exist" when using remote.php/webdav/ to upload files
Steps to reproduce
- Install Nextcloud 9.0.53
- Use WebDAV to sync files from Synology Diskstation to Nextcloud (URL: cloud.example.com/remote.php/webdav)
Expected behaviour
Files get uploaded.
Actual behaviour
Files don't get uploaded and log gets filled with the following error:
{"Message":"HTTP\/1.1 409 Parent node does not exist","Exception":"Sabre\DAV\Exception\Conflict","Code":0,"Trace":"#0 \/var\/www\/cloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(588): Sabre\DAV\Server->createCollection('Folder\/...', Object(Sabre\DAV\MkCol))\n#1 [internal function]: Sabre\DAV\CorePlugin->httpMkcol(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#2 \/var\/www\/cloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 \/var\/www\/cloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\Event\EventEmitter->emit('method:MKCOL', Array)\n#4 \/var\/www\/cloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#5 \/var\/www\/cloud\/apps\/dav\/appinfo\/v1\/webdav.php(55): Sabre\DAV\Server->exec()\n#6 \/var\/www\/cloud\/remote.php(138): require_once('\/var\/www\/cloud....')\n#7 {main}","File":"\/var\/www\/cloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","Line":1107,"User":"User"}","level":4,"time":"28.07.2016 13:03:39","method":"MKCOL","url":"/remote.php/webdav/Folder/Folder1/Folder2/Folder3","user":"User"}
plus the error I opened issue #680 for.
Server configuration
Operating system: Debian 8.5
Web server: nginx/1.6.2
Database: MySQL 10.0.25-MariaDB
PHP version: PHP 5.6.24
Nextcloud version: 9.0.53
Updated from an older Nextcloud/ownCloud or fresh install: Updated from ownCloud 9.0.2
Where did you install Nextcloud from: Tarball from official website
Same here i guess,
Exception: {"Message":"HTTP\/1.1 409 Parent node does not exist","Exception":"Sabre\\DAV\\Exception\\Conflict","Code":0,"Trace":"#0 \/var\/www\/html\/cloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(588): Sabre\\DAV\\Server->createCollection('com\/circle-tech...', Object(Sabre\\DAV\\MkCol))\n#1 [internal function]: Sabre\\DAV\\CorePlugin->httpMkcol(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#2 \/var\/www\/html\/cloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 \/var\/www\/html\/cloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:MKCOL', Array)\n#4 \/var\/www\/html\/cloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#5 \/var\/www\/html\/cloud\/apps\/dav\/appinfo\/v1\/webdav.php(55): Sabre\\DAV\\Server->exec()\n#6 \/var\/www\/html\/cloud\/remote.php(138): require_once('\/var\/www\/html\/c...')\n#7 {main}","File":"\/var\/www\/html\/cloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","Line":1107,"User":"circle"}
I have the same issue with Nextcloud 10.0.1, Mysql, PHP 7.0.
Any news about that?
I got the same error today. The nextcloud Linux client was complaining it could not add new files. It was written that a conflict exist. However, the folder does not exist on the server. And the server log shows the same as above.
Might this be related after moving folders? Within my cloud I had a folder structure like foo/old/bar Some time ago I moved everything from old directly into foo: foo/bar This was also synced to the server and visible at the web interface. Now, I added a new folder to foo/bar, but the client complains that there is a conflict with foo/old/bar/newfolder. Somehow it remembers the old folder structure although it is not available anymore.
I can confirm the issue at nextcloud 11.0.1 when renaming a parent folder of a folder, in which photos should be automatically uploaded by the app. After renaming the folder again to the old name, automatic upload works again. Trying a files:scan didn't solve the problem.
Hi,
I've same problem :
NextCloud 11.0.2 (stable)
PHP Version: 7.1.4 Memory Limit: 1.0 GB Max Execution Time: 3600 Upload max size: 1.0 TB
DB (mariadb) Type: mysql Version: 10.1.21 Size: 471.2 MB

Here, these errors seems to be triggered by the nextcloud iOS client with automatic photos upload. I've disabled this functionnality (that never worked for me) for the moment and 409 errors have gone.
(But the multiple logins attemps at each launch of iOS app are still here)
Could you try if this is fixed with 12.0.3 or the patch in #6588?
Hallo,
now I get "Undefined offset: 3 at /var/www/html/nextcloud/apps/activity/lib/FilesHooks.php#620".
Mit freundlichen Grüssen Andre Hohmann
Am 21.09.2017 20:55, schrieb Morris Jobke:
Could you try if this is fixed with 12.0.3 or the patch in #6588 [1]?
-- You are receiving this because you commented. Reply to this email directly, view it on GitHub [2], or mute the thread [3].
Links:
[1] https://github.com/nextcloud/server/pull/6588 [2] https://github.com/nextcloud/server/issues/681#issuecomment-331249202 [3] https://github.com/notifications/unsubscribe-auth/AG-ac8ObdmCuAnkQRded8gdwy_m_68Peks5skrEqgaJpZM4JZGQV
Same Issue here. PHP: 7.1-fpm Nextcloud: 12.0.3 Stacktrace:
Sabre\DAV\Exception\Conflict: Parent node does not exist
/var/www/cloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 590: Sabre\DAV\Server->createCollection('01-Arbeit/01-Be...', Object(Sabre\DAV\MkCol))
[internal function] Sabre\DAV\CorePlugin->httpMkcol(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/cloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
/var/www/cloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method MKCOL', Array)
/var/www/cloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/cloud/apps/dav/appinfo/v1/webdav.php - line 76: Sabre\DAV\Server->exec()
/var/www/cloud/remote.php - line 162: require_once('/var/www/cloud....')
{main}
The error occurs, after I reinstalled my nextcloud and a sync client tried to fetch the files via webdav.
I can confirm similar log messages. Nextcloud tries with MKCOL to create a folder and sees that the parent folder is not there. In my case, I could see in the real log file (text file) that is not abbreviated by …, that the problem is in the folder “_Mit_mir_geteilt”, which was created by the configuration ‘share_folder’ => ‘_Mit_mir_geteilt’.
The parent node (in this case this is probably a pseudo folder in the database) does not exist.
Same problem... can't seem to create directories... This is urgent, has anyone from Nextcloud looked into it yet?
EDIT: My bad. The node.js library I was using had a bug and appended the base path 2 times in a row. I was able to resolve the issue for creating directories. Going to test uploads soon.
As there is no feedback since a while I will close this ticket. If this is still happening please feel free to reopen.
I am seeing this same "Parent node does not exist" messages with folders that are uploaded by some clients every time after they have been deleted.
As I cannot reproduce the original issue anymore, I will close this ticket. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen.
Is it possible that Nextcloud doesn't respond with status code 409 anymore for missing parent collections during a PUT request? It seems to respond with status code 404 now, which does NOT follow RFC 4918.
A PUT that would result in the creation of a resource without an appropriately scoped parent collection MUST fail with a 409 (Conflict).
Sorry for being lazy and not opening a new issue because I can't get into the technical specifications that is required in a bug report but I just wanted to share my observations.