{"record":{"id":"046856df5d07b2df","repo":"oraios/serena","slug":"failed-to-find-luau-lsp-executable-after-extractio","errorCode":null,"errorMessage":"Failed to find luau-lsp executable after extraction","messagePattern":"Failed to find luau-lsp executable after extraction","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/luau_lsp.py","lineNumber":144,"sourceCode":"            binary_path = self._find_existing_binary(install_dir)\n            if binary_path is not None:\n                return binary_path\n\n            asset_name = self._get_luau_lsp_asset_name()\n            download_url = f\"https://github.com/JohnnyMorganz/luau-lsp/releases/download/{luau_lsp_version}/{asset_name}\"\n\n            log.info(\"Downloading luau-lsp %s from %s\", luau_lsp_version, download_url)\n            FileUtils.download_and_extract_archive_verified(\n                download_url,\n                str(install_dir),\n                \"zip\",\n                expected_sha256=_luau_lsp_sha(luau_lsp_version, asset_name),\n                allowed_hosts=LUAU_LSP_ALLOWED_HOSTS,\n            )\n\n            binary_path = self._find_existing_binary(install_dir)\n            if binary_path is None:\n                raise RuntimeError(\"Failed to find luau-lsp executable after extraction\")\n\n            return binary_path\n\n        def _resolve_support_files(self) -> tuple[str | None, str | None]:\n            platform_type = LuauLanguageServer._get_platform_type(self._custom_settings)\n            if platform_type == \"standard\":\n                return None, self._download_standard_docs()\n\n            security_level = LuauLanguageServer._get_roblox_security_level(self._custom_settings)\n            return self._download_roblox_support_files(security_level)\n\n        def _download_standard_docs(self) -> str | None:\n            install_dir = Path(self._ls_resources_dir)\n            install_dir.mkdir(parents=True, exist_ok=True)\n\n            return self._download_auxiliary_file(\n                install_dir / \"luau-en-us.json\",\n                LUAU_DOCS_URL,","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/luau_lsp.py#L126-L162","documentation":"Raised after the luau-lsp archive has been downloaded and extracted when no luau-lsp executable can be found in the install directory (the _find_existing_binary scan returns None). It signals an unexpected archive layout or a failed/corrupt extraction.","triggerScenarios":"Calling _download_luau_lsp (via _get_or_install_core_dependency, or the test test_download_luau_lsp_extracts_binary_into_ls_resources_dir) when the upstream zip's internal layout changed, the sha256-verified download was truncated before extraction, or extraction tools failed silently.","commonSituations":"New luau-lsp release renaming the binary or adding a nested folder, corrupted cached install, CI disk-full during unzip, platform-specific archive containing extra wrapper scripts that confuse the binary search.","solutions":["Delete the luau-lsp install_dir under ls_resources_dir and re-run to trigger a clean download/extraction","Unzip the asset manually and check where luau-lsp(.exe) lives; place or symlink it where _find_existing_binary looks","Pin to a luau_lsp_version whose archive layout matches the library, or upgrade the library for newer layout support","Verify disk space and write permissions on the ls_resources_dir"],"exampleFix":"// before\n~/.multilspy/resources/luau/  # nested luau-lsp-0.x.x/luau-lsp\n// after\nmv ~/.multilspy/resources/luau/luau-lsp-0.x.x/luau-lsp ~/.multilspy/resources/luau/ && rerun","handlingStrategy":"validation","validationCode":"import pathlib\ninstall_dir = pathlib.Path(\"~/.multilspy/resources/luau\").expanduser()\nbinary = next(iter(install_dir.rglob(\"luau-lsp*\")), None)\nassert binary and binary.is_file(), f\"luau-lsp binary missing under {install_dir}; clear cache and re-download\"","typeGuard":null,"tryCatchPattern":"try:\n    binary = download_luau_lsp()\nexcept RuntimeError as e:\n    if \"Failed to find luau-lsp executable\" in str(e):\n        shutil.rmtree(install_dir, ignore_errors=True)\n        binary = download_luau_lsp()\n    else:\n        raise","preventionTips":["Re-download (wipe cache) after luau-lsp version bumps","Confirm unzip/tar extraction succeeded (exit codes) in CI","Watch upstream luau-lsp release notes for archive layout changes","Ensure ls_resources_dir is writable with free disk space"],"tags":["luau","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"}