slint-ui/slint · warning
Could not locate the configured slint-lsp server binary at…
Error message
Could not locate the configured slint-lsp server binary at absolute path
What it means
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.
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
Example fix
// settings.json before (stale path)
{ "slint.lsp": "/home/me/old/target/debug/slint-lsp" }
// after (rebuilt path)
{ "slint.lsp": "/home/me/slint/target/debug/slint-lsp" } Defensive patterns
Strategy: validation
Validate before calling
const p = vscode.workspace.getConfiguration('slint').get('lsp');
if (typeof p === 'string' && path.isAbsolute(p) && !existsSync(p)) vscode.window.showWarningMessage(`slint-lsp override does not exist: ${p}`); Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Could not locate slint-lsp server binary, neither in…
- Could not locate the configured slint-lsp server binary in…
- Callbacks were set up earlier
- Child has no stdin
- Child has no stdout
AI-assisted analysis of slint-ui/slint@bb937076de (2026-09-16).
Data as JSON: /api/errors/348c2365e4e38503.
Report an issue: GitHub.
Appendix: source
Thrown at editors/vscode/src/extension.ts:143
path.join(context.extensionPath, "bin", lsp_platform.program_name),
];
const serverModule = lspSearchPaths.find((path) => existsSync(path));
if (serverModule === undefined) {
console.warn(
"Could not locate slint-lsp server binary, neither in bundled bin/ directory nor relative in ../target",
);
}
return serverModule;
}
if (path.isAbsolute(lsp_binary_path)) {
// The slint-lsp override is a absolute path: Look in that path only
if (existsSync(lsp_binary_path)) {
return lsp_binary_path;
}
console.warn(
"Could not locate the configured slint-lsp server binary at absolute path",
);
return undefined;
}
// The slint-lsp override is a relative path: Look relative to PATH
const path_env = process.env.PATH?.split(path.delimiter).map((p) =>
path.join(p, lsp_binary_path),
);
const serverModule = path_env?.find((path) => existsSync(path));
if (serverModule === undefined) {
console.warn(
"Could not locate the configured slint-lsp server binary in PATH",
);
}
return serverModule;
}View on GitHub (pinned to bb937076de)