oraios/serena · error · RuntimeError

Failed to find luau-lsp executable after extraction

Error message

Failed to find luau-lsp executable after extraction

What it means

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.

Source

Thrown at src/solidlsp/language_servers/luau_lsp.py:144

            binary_path = self._find_existing_binary(install_dir)
            if binary_path is not None:
                return binary_path

            asset_name = self._get_luau_lsp_asset_name()
            download_url = f"https://github.com/JohnnyMorganz/luau-lsp/releases/download/{luau_lsp_version}/{asset_name}"

            log.info("Downloading luau-lsp %s from %s", luau_lsp_version, download_url)
            FileUtils.download_and_extract_archive_verified(
                download_url,
                str(install_dir),
                "zip",
                expected_sha256=_luau_lsp_sha(luau_lsp_version, asset_name),
                allowed_hosts=LUAU_LSP_ALLOWED_HOSTS,
            )

            binary_path = self._find_existing_binary(install_dir)
            if binary_path is None:
                raise RuntimeError("Failed to find luau-lsp executable after extraction")

            return binary_path

        def _resolve_support_files(self) -> tuple[str | None, str | None]:
            platform_type = LuauLanguageServer._get_platform_type(self._custom_settings)
            if platform_type == "standard":
                return None, self._download_standard_docs()

            security_level = LuauLanguageServer._get_roblox_security_level(self._custom_settings)
            return self._download_roblox_support_files(security_level)

        def _download_standard_docs(self) -> str | None:
            install_dir = Path(self._ls_resources_dir)
            install_dir.mkdir(parents=True, exist_ok=True)

            return self._download_auxiliary_file(
                install_dir / "luau-en-us.json",
                LUAU_DOCS_URL,

View on GitHub (pinned to 7fcbca7e62)

Solutions

  1. Delete the luau-lsp install_dir under ls_resources_dir and re-run to trigger a clean download/extraction
  2. Unzip the asset manually and check where luau-lsp(.exe) lives; place or symlink it where _find_existing_binary looks
  3. Pin to a luau_lsp_version whose archive layout matches the library, or upgrade the library for newer layout support
  4. Verify disk space and write permissions on the ls_resources_dir

Example fix

// before
~/.multilspy/resources/luau/  # nested luau-lsp-0.x.x/luau-lsp
// after
mv ~/.multilspy/resources/luau/luau-lsp-0.x.x/luau-lsp ~/.multilspy/resources/luau/ && rerun
Defensive patterns

Strategy: validation

Validate before calling

import pathlib
install_dir = pathlib.Path("~/.multilspy/resources/luau").expanduser()
binary = next(iter(install_dir.rglob("luau-lsp*")), None)
assert binary and binary.is_file(), f"luau-lsp binary missing under {install_dir}; clear cache and re-download"

Try / catch

try:
    binary = download_luau_lsp()
except RuntimeError as e:
    if "Failed to find luau-lsp executable" in str(e):
        shutil.rmtree(install_dir, ignore_errors=True)
        binary = download_luau_lsp()
    else:
        raise

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29). Data as JSON: /api/errors/046856df5d07b2df. Report an issue: GitHub.