Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebDAV: "409 Parent node does not exist" when using remote.php/webdav/ to upload files #681

Closed
flobeier opened this issue Jul 31, 2016 · 15 comments

Comments

@flobeier
Copy link

flobeier commented Jul 31, 2016

Steps to reproduce

  1. Install Nextcloud 9.0.53
  2. 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

@fablue
Copy link

fablue commented Sep 12, 2016

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"}  

@Happyfeet01
Copy link

I have the same issue with Nextcloud 10.0.1, Mysql, PHP 7.0.

Any news about that?

@avanc
Copy link

avanc commented Nov 15, 2016

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.

@avanc
Copy link

avanc commented Nov 15, 2016

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.

@homer79
Copy link

homer79 commented Jan 18, 2017

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.

@f-vt
Copy link

f-vt commented Apr 13, 2017

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

nc-409

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)

@MorrisJobke
Copy link
Member

Could you try if this is fixed with 12.0.3 or the patch in #6588?

@homer79
Copy link

homer79 commented Sep 30, 2017 via email

@mxschmitt
Copy link

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.

@agru
Copy link

agru commented Dec 4, 2017

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.

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@0x7061
Copy link

0x7061 commented Aug 28, 2018

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.

@MorrisJobke
Copy link
Member

As there is no feedback since a while I will close this ticket. If this is still happening please feel free to reopen.

@AKKlostermann
Copy link

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.

@MorrisJobke MorrisJobke reopened this Nov 28, 2018
@skjnldsv
Copy link
Member

skjnldsv commented Jun 5, 2019

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.

@skjnldsv skjnldsv closed this as completed Jun 5, 2019
@tobihagemann
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests