{"record":{"id":"348c2365e4e38503","repo":"slint-ui/slint","slug":"could-not-locate-the-configured-slint-lsp-server-binary-at","errorCode":null,"errorMessage":"Could not locate the configured slint-lsp server binary at absolute path","messagePattern":"Could not locate the configured slint-lsp server binary at absolute path","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"editors/vscode/src/extension.ts","lineNumber":143,"sourceCode":"            path.join(context.extensionPath, \"bin\", lsp_platform.program_name),\n        ];\n\n        const serverModule = lspSearchPaths.find((path) => existsSync(path));\n\n        if (serverModule === undefined) {\n            console.warn(\n                \"Could not locate slint-lsp server binary, neither in bundled bin/ directory nor relative in ../target\",\n            );\n        }\n        return serverModule;\n    }\n\n    if (path.isAbsolute(lsp_binary_path)) {\n        // The slint-lsp override is a absolute path: Look in that path only\n        if (existsSync(lsp_binary_path)) {\n            return lsp_binary_path;\n        }\n        console.warn(\n            \"Could not locate the configured slint-lsp server binary at absolute path\",\n        );\n        return undefined;\n    }\n\n    // The slint-lsp override is a relative path: Look relative to PATH\n    const path_env = process.env.PATH?.split(path.delimiter).map((p) =>\n        path.join(p, lsp_binary_path),\n    );\n\n    const serverModule = path_env?.find((path) => existsSync(path));\n    if (serverModule === undefined) {\n        console.warn(\n            \"Could not locate the configured slint-lsp server binary in PATH\",\n        );\n    }\n    return serverModule;\n}","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/slint-ui/slint/blob/bb937076de3f7919766c1f25e2e969367cf77e9a/editors/vscode/src/extension.ts#L125-L161","documentation":"When the user configures an absolute path override for the slint-lsp server binary, find_lsp_binary checks only that exact path. If the file does not exist there, it warns 'Could not locate the configured slint-lsp server binary at absolute path' and returns undefined, leaving the extension without a language server. This is a configuration-validation warning, not a runtime crash.","triggerScenarios":"The slint.lsp binary override setting contains an absolute path whose file does not exist — e.g. typo in the path, binary deleted after a cargo clean, path pointing at the wrong machine/user directory, or pointing at a directory instead of the executable.","commonSituations":"Pointing at a target/debug directory wiped by 'cargo clean'; hardcoding a path from another OS or another developer's machine; the binary was renamed or a new version changed its location.","solutions":["Verify the configured absolute path exists and points to the slint-lsp executable (ls <path>)","Rebuild the binary with cargo build -p slint-lsp if it was removed","Correct the extension setting to the new/valid path","Remove the override so the extension falls back to bundled/PATH discovery"],"exampleFix":"// settings.json before (stale path)\n{ \"slint.lsp\": \"/home/me/old/target/debug/slint-lsp\" }\n// after (rebuilt path)\n{ \"slint.lsp\": \"/home/me/slint/target/debug/slint-lsp\" }","handlingStrategy":"validation","validationCode":"const p = vscode.workspace.getConfiguration('slint').get('lsp');\nif (typeof p === 'string' && path.isAbsolute(p) && !existsSync(p)) vscode.window.showWarningMessage(`slint-lsp override does not exist: ${p}`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use an absolute path only for binaries you know exist","Re-verify the override after cargo clean or machine changes","Point at the executable file, not its directory","Prefer PATH-based or bundled discovery over hardcoded paths"],"tags":["vscode","lsp","config","file-not-found"],"backgroundTag":"invalid-config-value","analyzedSha":"bb937076de3f7919766c1f25e2e969367cf77e9a","analyzedAt":"2026-09-16T01:37:20.251Z","contentChangedAt":"2026-09-16T01:37:20.251Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}