{"record":{"id":"76ebebfc5bed8207","repo":"laurent22/joplin","slug":"webdav-directory-not-found-options-path","errorCode":null,"errorMessage":"WebDAV directory not found: ${options.path()}","messagePattern":"WebDAV directory not found: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/lib/SyncTargetWebDAV.ts","lineNumber":74,"sourceCode":"\t\tconst driver = new FileApiDriverWebDav(api);\n\t\tconst fileApi = new FileApi('', driver);\n\t\tfileApi.setSyncTargetId(syncTargetId);\n\t\treturn fileApi;\n\t}\n\n\tpublic static override async checkConfig(options: WebDavFileApiOptions): Promise<CheckConfigResult> {\n\t\tconst fileApi = await SyncTargetWebDAV.newFileApi_(SyncTargetWebDAV.id(), options);\n\t\tfileApi.requestRepeatCount_ = 0;\n\n\t\tconst output: CheckConfigResult = {\n\t\t\tok: false,\n\t\t\terrorMessage: '',\n\t\t};\n\n\t\ttry {\n\t\t\tcheckProviderIsSupported(options.path());\n\t\t\tconst result = await fileApi.stat('');\n\t\t\tif (!result) throw new Error(`WebDAV directory not found: ${options.path()}`);\n\t\t\toutput.ok = true;\n\t\t} catch (error) {\n\t\t\toutput.errorMessage = error.message;\n\t\t\tif (error.code) output.errorMessage += ` (Code ${error.code})`;\n\t\t}\n\n\t\treturn output;\n\t}\n\n\tpublic async initFileApi() {\n\t\tconst fileApi = await SyncTargetWebDAV.newFileApi_(SyncTargetWebDAV.id(), {\n\t\t\tpath: () => Setting.value('sync.6.path'),\n\t\t\tusername: () => Setting.value('sync.6.username'),\n\t\t\tpassword: () => Setting.value('sync.6.password'),\n\t\t\tignoreTlsErrors: () => Setting.value('net.ignoreTlsErrors'),\n\t\t});\n\n\t\tfileApi.setLogger(this.logger());","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/laurent22/joplin/blob/2654b33620775080d1d59c552259d41e33dad3d2/packages/lib/SyncTargetWebDAV.ts#L56-L92","documentation":"Thrown by SyncTargetWebDAV.checkConfig after fileApi.stat('') returns a falsy result. The stat with an empty path probes the WebDAV base directory; a falsy result means the directory does not exist or the server did not return a usable stat. checkProviderIsSupported runs first, so this fires only for supported providers when the path itself is wrong.","triggerScenarios":"checkConfig() runs checkProviderIsSupported(options.path()) then fileApi.stat('') — stat resolves to falsy. Indicates the configured WebDAV path does not point to an existing directory on the server.","commonSituations":"Path in sync settings has a typo or wrong segment; directory was never created on the server; using a relative path where an absolute path is required; trailing slash differences; server requires the directory to pre-exist.","solutions":["Verify the WebDAV URL and path segment against the server — open the URL in a browser to confirm the directory resolves.","Create the directory on the server first (many WebDAV servers do not auto-create the base path).","Match the trailing-slash convention the server expects (some need a trailing /, some reject it).","Confirm credentials have read+write on that directory."],"exampleFix":"# before\nsync.6.path: https://dav.example.com/misspelled-folder\n# after\nsync.6.path: https://dav.example.com/joplin   # directory exists on server","handlingStrategy":"validation","validationCode":"// Probe the WebDAV base path with a stat before offering sync.\nconst stat = await fileApi.stat('');\nif (!stat) throw new Error(`WebDAV path does not resolve: ${options.path()}`);","typeGuard":"const isResolvableWebDavPath = async (api, p) => !!(await api.stat(p));","tryCatchPattern":"try { await SyncTargetWebDAV.checkConfig(options); }\ncatch (e) { if (/WebDAV directory not found/.test(e.message)) { /* fix URL/path, create dir on server */ } else throw e; }","preventionTips":["Open the WebDAV URL in a browser before configuring Joplin to confirm the directory exists.","Prefer absolute paths and match the server's trailing-slash convention.","Ensure the directory is created server-side and credentials have read+write on it."],"tags":["sync","webdav","network","configuration"],"backgroundTag":null,"analyzedSha":"2654b33620775080d1d59c552259d41e33dad3d2","analyzedAt":"2026-08-12T14:26:46.263Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}