{"record":{"id":"9ad14c6110cb7a9d","repo":"oraios/serena","slug":"shader-language-server-not-found-at-executable-pa","errorCode":null,"errorMessage":"shader-language-server not found at {executable_path}","messagePattern":"shader-language-server not found at (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/hlsl_language_server.py","lineNumber":160,"sourceCode":"                    \"shader-language-server is not installed and no auto-install is available for your platform.\\n\"\n                    \"Please install it using one of the following methods:\\n\"\n                    \"  cargo:   cargo install shader_language_server --locked\\n\"\n                    \"  GitHub:  Download from https://github.com/antaalt/shader-sense/releases\\n\"\n                    \"On macOS, install the Rust toolchain (https://rustup.rs) and Serena will build from source automatically.\\n\"\n                    \"See https://github.com/antaalt/shader-sense for more details.\"\n                )\n\n            # legacy unversioned dir reserved for INITIAL; every other version goes into a versioned subdir\n            ls_dirname = \"shader-language-server\" if version == _INITIAL_VERSION else f\"shader-language-server-{version}\"\n            install_dir = os.path.join(self._ls_resources_dir, ls_dirname)\n            executable_path = deps.binary_path(install_dir)\n\n            if not os.path.exists(executable_path):\n                log.info(f\"shader-language-server not found. Downloading from {dep.url}\")\n                _ = deps.install(install_dir)\n\n            if not os.path.exists(executable_path):\n                raise FileNotFoundError(f\"shader-language-server not found at {executable_path}\")\n\n            os.chmod(executable_path, 0o755)\n            return executable_path\n\n        def _create_launch_command(self, core_path: str) -> list[str]:\n            return [core_path, \"--stdio\"]\n\n    def _create_base_initialize_params(self) -> dict:\n        initialize_params = {\n            \"locale\": \"en\",\n            \"capabilities\": {\n                \"textDocument\": {\n                    \"synchronization\": {\"didSave\": True, \"dynamicRegistration\": True},\n                    \"completion\": {\n                        \"dynamicRegistration\": True,\n                        \"completionItem\": {\"snippetSupport\": True},\n                    },\n                    \"definition\": {\"dynamicRegistration\": True},","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/hlsl_language_server.py#L142-L178","documentation":"After attempting to install shader-language-server from a downloaded dep artifact, the expected executable still does not exist at executable_path, so _get_or_install_core_dependency raises FileNotFoundError. It means the install step (deps.install) completed but the binary did not land where expected.","triggerScenarios":"_get_or_install_core_dependency: first os.path.exists(executable_path) fails, deps.install(install_dir) runs (downloading from dep.url), but the second os.path.exists(executable_path) check still fails, raising the error before os.chmod.","commonSituations":"Download failed silently or URL changed (dep.url 404s / release renamed assets); archive extraction placed the binary under a different directory or with a versioned filename; the installed binary name differs from the expected `shader-language-server` (e.g. .exe suffix on Windows); disk full during install.","solutions":["Check install_dir for the binary — it may exist under a different name or nested path; move/symlink it to executable_path.","Manually download from dep.url / the shader-sense releases page and place the binary at the expected path.","Retry deps.install after clearing the install dir (partial/corrupt extraction).","Verify the expected executable name matches the platform (e.g. shader-language-server.exe on Windows) and update the path resolution if needed."],"exampleFix":"# before\nif not os.path.exists(executable_path):\n    raise FileNotFoundError(f\"shader-language-server not found at {executable_path}\")\n# after (manual fallback placement)\n# mv ~/.cache/serena/shader-sense/bin/shader-language-server <expected_path>\n# chmod +x <expected_path>","handlingStrategy":"validation","validationCode":"import os\ndef validate_shader_ls_path(expected_path: str) -> bool:\n    return os.path.isfile(expected_path) and os.access(expected_path, os.X_OK)\n# also inspect install_dir for binaries under alternate names before raising","typeGuard":null,"tryCatchPattern":"try:\n    ls_path = get_or_install_core_dependency()\nexcept FileNotFoundError as e:\n    if \"not found at\" in str(e):\n        candidate = find_binary(install_dir, \"shader-language-server\")\n        if candidate:\n            os.chmod(candidate, 0o755)\n            os.symlink(candidate, expected_path)\n        else:\n            manual_install_from_releases()\n    else:\n        raise","preventionTips":["After install failures, list install_dir contents to spot renamed/nested binaries.","Pin the dep.url to a stable release asset that will not 404.","Confirm the expected filename per platform (.exe on Windows).","Clear and reinstall the install dir when a download was interrupted."],"tags":["hlsl","missing-binary","installation","file-not-found"],"backgroundTag":"language-server-not-installed","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}