oraios/serena · error · SolidLSPException

Unknown platform: {system=}, {machine=}, {bitness=}

Error message

Unknown platform: {system=}, {machine=}, {bitness=}

What it means

Raised by PlatformUtils.get_platform_id when the current system/machine/bitness combination is not covered by the platform mapping tables (system_map, machine_map) or a required machine type cannot be determined. The library has no prepackaged language-server platform identifier for this OS/architecture.

Source

Thrown at src/solidlsp/ls_utils.py:708

        machine_map = {
            "AMD64": "x64",
            "x86_64": "x64",
            "i386": "x86",
            "i686": "x86",
            "aarch64": "arm64",
            "arm64": "arm64",
            "ARM64": "arm64",
        }
        if system in system_map and machine in machine_map:
            platform_id = system_map[system] + "-" + machine_map[machine]
            if system == "Linux" and bitness == "64bit":
                libc = platform.libc_ver()[0]
                if libc != "glibc":
                    # Format: linux-musl-arch (e.g., linux-musl-arm64)
                    platform_id = f"{system_map[system]}-{libc}-{machine_map[machine]}"
            return PlatformId(platform_id)
        else:
            raise SolidLSPException(f"Unknown platform: {system=}, {machine=}, {bitness=}")

    @staticmethod
    def _determine_windows_machine_type() -> str:
        import ctypes
        from ctypes import wintypes

        class SYSTEM_INFO(ctypes.Structure):
            class _U(ctypes.Union):
                class _S(ctypes.Structure):
                    _fields_ = [("wProcessorArchitecture", wintypes.WORD), ("wReserved", wintypes.WORD)]

                _fields_ = [("dwOemId", wintypes.DWORD), ("s", _S)]
                _anonymous_ = ("s",)

            _fields_ = [
                ("u", _U),
                ("dwPageSize", wintypes.DWORD),
                ("lpMinimumApplicationAddress", wintypes.LPVOID),

View on GitHub (pinned to 7fcbca7e62)

Solutions

  1. Check the logged system/machine/bitness values against the library's supported platform list
  2. Run on a supported platform (linux x64/arm64, macOS, Windows x64/arm64) or use a container with one
  3. If close (e.g. musl on arm64), verify your environment maps to a supported id like linux-musl-arm64; otherwise contribute a mapping for your platform
Defensive patterns

Strategy: validation

Validate before calling

import platform
supported = {("linux","x86_64"),("linux","aarch64"),("darwin","x86_64"),("darwin","arm64"),("windows","x86_64"),("windows","arm64")}
sys_, mach = platform.system().lower(), platform.machine().lower()
if (sys_, mach) not in supported:
    raise EnvironmentError(f"unsupported platform {sys_}/{mach} for language-server install")

Type guard

def platform_supported() -> bool:
    s, m = platform.system().lower(), platform.machine().lower()
    return s in {"linux","darwin","windows"} and m in {"x86_64","amd64","arm64","aarch64"}

Try / catch

try:
    pid = PlatformUtils.get_platform_id()
except SolidLSPException as e:
    if "Unknown platform" in str(e):
        logger.error("unsupported OS/arch: %s", e)
        raise UnsupportedPlatformError from e
    raise

Prevention

When it happens

Trigger: Running on an unmapped OS (e.g. BSD), an unmapped CPU architecture (e.g. riscv64, s390x), musl/mac/Windows variants missing from the maps, or a Windows machine type that _determine_windows_machine_type cannot classify.

Common situations: Developers on Alpine (musl) or ARM boards, FreeBSD workstations, or uncommon architectures trying to auto-install language servers; exotic CI runners.

Related errors


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