oraios/serena · error · RuntimeError

Unsupported operating system: {system}

Error message

Unsupported operating system: {system}

What it means

Raised when selecting the luau-lsp release asset on an OS that is not Linux, Darwin, or Windows; luau-lsp upstream has no prebuilt binaries for other systems. The library throws RuntimeError instead of downloading a wrong asset.

Source

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

        def _get_luau_lsp_asset_name() -> str:
            system = platform.system()
            machine = platform.machine().lower()

            if system == "Linux":
                if machine in ["x86_64", "amd64"]:
                    return "luau-lsp-linux-x86_64.zip"
                if machine in ["aarch64", "arm64"]:
                    return "luau-lsp-linux-arm64.zip"
                raise RuntimeError(
                    f"Unsupported Linux architecture: {machine}. "
                    "luau-lsp only provides linux-x86_64 and linux-arm64 binaries. "
                    "Please build from source: https://github.com/JohnnyMorganz/luau-lsp"
                )
            if system == "Darwin":
                return "luau-lsp-macos.zip"
            if system == "Windows":
                return "luau-lsp-win64.zip"
            raise RuntimeError(f"Unsupported operating system: {system}")

    @staticmethod
    def _get_platform_type(custom_settings: SolidLSPSettings.CustomLSSettings) -> str:
        platform_type = custom_settings.get("platform", "roblox")
        if platform_type not in SUPPORTED_PLATFORMS:
            raise ValueError(f"Unsupported Luau platform: {platform_type}. Expected one of: {', '.join(sorted(SUPPORTED_PLATFORMS))}")
        return platform_type

    @staticmethod
    def _get_roblox_security_level(custom_settings: SolidLSPSettings.CustomLSSettings) -> str:
        security_level = custom_settings.get("roblox_security_level", "PluginSecurity")
        if security_level not in SUPPORTED_ROBLOX_SECURITY_LEVELS:
            raise ValueError(
                f"Unsupported Luau Roblox security level: {security_level}. "
                f"Expected one of: {', '.join(sorted(SUPPORTED_ROBLOX_SECURITY_LEVELS))}"
            )
        return security_level

View on GitHub (pinned to 7fcbca7e62)

Solutions

  1. Run the workload in a Linux container (Docker/podman) on the unsupported host
  2. Build luau-lsp from source for the target OS and pre-place the binary so the download path is not taken
  3. Use a supported OS CI runner (ubuntu/macos/windows) for anything using this library
  4. If a community build exists, patch _get_luau_lsp_asset_name to add the OS/asset mapping

Example fix

// before
# multilspy on FreeBSD host directly
// after
podman run --rm -v $(pwd):/work -w /work python:3.11  # linux environment
Defensive patterns

Strategy: validation

Validate before calling

import platform
if platform.system() not in ("Linux", "Darwin", "Windows"):
    raise SystemExit(f"luau-lsp has prebuilt binaries only for Linux/macOS/Windows; got {platform.system()}. Run in a Linux container.")

Try / catch

try:
    server = create_luau_server()
except RuntimeError as e:
    if "Unsupported operating system" in str(e):
        run_in_linux_container()
    else:
        raise

Prevention

When it happens

Trigger: _get_luau_lsp_asset_name (called from _download_luau_lsp) executing where platform.system() returns 'FreeBSD', 'OpenBSD', 'NetBSD', 'SunOS', 'AIX', or similar.

Common situations: FreeBSD/OpenBSD servers and CI, Solaris/illumos hosts, AIX mainframe environments, custom embedded OS builds.

Related errors


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