{"record":{"id":"f790c7b6f91475ef","repo":"nextcloud/server","slug":"node-with-name-name-was-not-found","errorCode":null,"errorMessage":"Node with name $name was not found","messagePattern":"Node with name \\$name was not found","errorType":"exception","errorClass":"Sabre\\DAV\\Exception\\NotFound","httpStatus":404,"severity":"error","filePath":"apps/dav/lib/CalDAV/Principal/User.php","lineNumber":53,"sourceCode":"\t\t\t'privilege' => '{DAV:}read',\n\t\t\t'principal' => '{DAV:}authenticated',\n\t\t\t'protected' => true,\n\t\t];\n\t\treturn $acl;\n\t}\n\n\t/**\n\t * Returns a specific child node, referenced by its name.\n\t *\n\t * @param string $name\n\t *\n\t * @return \\Sabre\\DAV\\INode\n\t */\n\t#[\\Override]\n\tpublic function getChild($name) {\n\t\t$principal = $this->principalBackend->getPrincipalByPath($this->getPrincipalURL() . '/' . $name);\n\t\tif (!$principal) {\n\t\t\tthrow new \\Sabre\\DAV\\Exception\\NotFound(\"Node with name $name was not found\");\n\t\t}\n\t\tif ($name === 'calendar-proxy-read') {\n\t\t\treturn new ProxyRead($this->principalBackend, $this->principalProperties);\n\t\t}\n\n\t\tif ($name === 'calendar-proxy-write') {\n\t\t\treturn new ProxyWrite($this->principalBackend, $this->principalProperties);\n\t\t}\n\n\t\tthrow new \\Sabre\\DAV\\Exception\\NotFound(\"Node with name $name was not found\");\n\t}\n\n\t/**\n\t * Returns an array with all the child nodes.\n\t *\n\t * @return \\Sabre\\DAV\\INode[]\n\t */\n\t#[\\Override]","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/dav/lib/CalDAV/Principal/User.php#L35-L71","documentation":"Sabre\\DAV\\Exception\\NotFound (HTTP 404) from CalDAV\\Principal\\User::getChild() when the principal backend cannot resolve <principalURL>/<name> — the requested child of a user principal does not exist as a sub-principal at all. The only valid children in this implementation are calendar-proxy-read and calendar-proxy-write.","triggerScenarios":"PROPFIND/GET on /remote.php/dav/principals/users/<uid>/<name> where the backend returns nothing for that sub-principal path — invented child names, misspelled proxy segments, or proxy principals not resolvable in the current configuration.","commonSituations":"Clients that guess principal child names instead of enumerating; scripts addressing principals/groups/... segments under a user principal; proxy feature disabled or proxy rows missing so even the two valid names fail to resolve.","solutions":["Address only principals/users/<uid>/calendar-proxy-read or principals/users/<uid>/calendar-proxy-write","Enumerate existing children with PROPFIND depth 1 on the user principal and use the returned URIs","If a proxy child unexpectedly 404s, verify proxy configuration and the principal backend data (ProxyMapper)"],"exampleFix":"// before: guessing child names under a user principal -> 404\nawait propfind(`/remote.php/dav/principals/users/${uid}/${name}/`);\n// after: address only the supported proxy children\nif (!['calendar-proxy-read', 'calendar-proxy-write'].includes(name)) {\n  throw new Error(`unsupported principal child: ${name}`);\n}\nawait propfind(`/remote.php/dav/principals/users/${uid}/${name}/`);","handlingStrategy":"validation","validationCode":"const PRINCIPAL_CHILDREN = ['calendar-proxy-read', 'calendar-proxy-write'];\nfunction isAddressablePrincipalChild(name) {\n  return PRINCIPAL_CHILDREN.includes(name);\n}","typeGuard":"// PHP: enumerate before addressing\n$names = array_map(static fn ($n) => $n->getName(), $principal->getChildren());\n// only names returned here are valid getChild() arguments","tryCatchPattern":"try {\n  $node = $principal->getChild($name);\n} catch (\\Sabre\\DAV\\Exception\\NotFound $e) {\n  // unknown principal child: fall back to enumerating getChildren()\n}","preventionTips":["Enumerate children with PROPFIND depth 1 instead of guessing names","Use exactly calendar-proxy-read / calendar-proxy-write"],"tags":["caldav","principal","not-found","calendar-proxy","dav"],"backgroundTag":"resource-not-found","analyzedSha":"ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3","analyzedAt":"2026-08-17T01:36:13.386Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}