{"record":{"id":"9ba3ee920c6066e3","repo":"oraios/serena","slug":"failed-to-find-lua-language-server-executable-afte","errorCode":null,"errorMessage":"Failed to find lua-language-server executable after extraction","messagePattern":"Failed to find lua-language-server executable after extraction","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/lua_ls.py","lineNumber":175,"sourceCode":"            download_url,\n            str(install_dir),\n            archive_type,\n            expected_sha256=_lua_ls_sha(lua_ls_version, download_name),\n            allowed_hosts=LUA_LS_ALLOWED_HOSTS,\n        )\n\n        # Make executable on Unix systems\n        if system != \"Windows\":\n            lua_ls_path = install_dir / \"bin\" / \"lua-language-server\"\n            if lua_ls_path.exists():\n                lua_ls_path.chmod(0o755)\n                return str(lua_ls_path)\n        else:\n            lua_ls_path = install_dir / \"bin\" / \"lua-language-server.exe\"\n            if lua_ls_path.exists():\n                return str(lua_ls_path)\n\n        raise RuntimeError(\"Failed to find lua-language-server executable after extraction\")\n\n    @staticmethod\n    def _setup_runtime_dependency(solidlsp_settings: SolidLSPSettings) -> str:\n        \"\"\"\n        Check if required Lua runtime dependencies are available.\n        Downloads lua-language-server if not present.\n        \"\"\"\n        lua_ls_path = LuaLanguageServer._get_lua_ls_path(solidlsp_settings)\n\n        if not lua_ls_path:\n            log.info(\"lua-language-server not found. Downloading...\")\n            lua_ls_path = LuaLanguageServer._download_lua_ls(solidlsp_settings)\n            log.info(\"lua-language-server installed at: %s\", lua_ls_path)\n\n        return lua_ls_path\n\n    def __init__(self, config: LanguageServerConfig, repository_root_path: str, solidlsp_settings: SolidLSPSettings):\n        lua_ls_path = self._setup_runtime_dependency(solidlsp_settings)","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/lua_ls.py#L157-L193","documentation":"Raised after lua-language-server has been downloaded and extracted when the expected executable cannot be located in the install directory (bin/lua-language-server or bin/lua-language-server.exe). It means the archive layout differed from what the library expects or extraction failed/produced nothing usable.","triggerScenarios":"Upstream release changed the archive's internal directory structure (e.g. nested top-level folder or renamed bin dir), the tar.gz/zip was corrupted or truncated mid-download, extraction skipped file permission bits so the file check fails, or the download URL returned an HTML error page.","commonSituations":"LuaLS published a new release version with a reshaped zip, flaky CI networks producing partial archives, antivirus quarantining the extracted exe on Windows, read-only or full disk causing silent extraction failure.","solutions":["Delete install_dir under the multilspy ls_resources_dir and retry to force a clean re-download/extraction","Check the extracted directory listing; if the binary sits in a nested folder, adjust or symlink it to install_dir/bin/lua-language-server","Verify the downloaded archive integrity (file/tar -tzf) and network path to the GitHub release","Pin/inspect the lua_ls_version used; downgrade to a version whose archive layout matches the library's expectation"],"exampleFix":"// before\nls install_dir  # shows nested lua-language-server-3.x/bin/...\n// after\nmv install_dir/lua-language-server-3.x/* install_dir/ && rerun  # or clear cache and reinstall","handlingStrategy":"validation","validationCode":"import pathlib\nfrom multilspy import SyncLanguageServer  # after install attempt\ninstall_dir = pathlib.Path(\"~/.multilspy/resources/lua\").expanduser()\nexe = install_dir / \"bin\" / \"lua-language-server\"\nif not exe.exists():\n    print(f\"missing {exe}; wipe {install_dir} and retry download\")","typeGuard":null,"tryCatchPattern":"try:\n    server = create_lua_server()\nexcept RuntimeError as e:\n    if \"Failed to find lua-language-server executable\" in str(e):\n        shutil.rmtree(install_dir, ignore_errors=True)\n        server = create_lua_server()  # one clean retry\n    else:\n        raise","preventionTips":["Clear cached LS resources after library or LuaLS version upgrades","Ensure adequate disk space and stable network in CI","Verify archive integrity when downloads are proxied","Check antivirus exclusions for the resources dir on Windows"],"tags":["lua","extraction","missing-file","language-server"],"backgroundTag":"language-server-binary-missing","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}