{"record":{"id":"723ec5f14692421c","repo":"oraios/serena","slug":"unknown-platform-system-machine-bitness","errorCode":null,"errorMessage":"Unknown platform: {system=}, {machine=}, {bitness=}","messagePattern":"Unknown platform: (.+?), (.+?), (.+?)","errorType":"exception","errorClass":"SolidLSPException","httpStatus":null,"severity":"error","filePath":"src/solidlsp/ls_utils.py","lineNumber":708,"sourceCode":"        machine_map = {\n            \"AMD64\": \"x64\",\n            \"x86_64\": \"x64\",\n            \"i386\": \"x86\",\n            \"i686\": \"x86\",\n            \"aarch64\": \"arm64\",\n            \"arm64\": \"arm64\",\n            \"ARM64\": \"arm64\",\n        }\n        if system in system_map and machine in machine_map:\n            platform_id = system_map[system] + \"-\" + machine_map[machine]\n            if system == \"Linux\" and bitness == \"64bit\":\n                libc = platform.libc_ver()[0]\n                if libc != \"glibc\":\n                    # Format: linux-musl-arch (e.g., linux-musl-arm64)\n                    platform_id = f\"{system_map[system]}-{libc}-{machine_map[machine]}\"\n            return PlatformId(platform_id)\n        else:\n            raise SolidLSPException(f\"Unknown platform: {system=}, {machine=}, {bitness=}\")\n\n    @staticmethod\n    def _determine_windows_machine_type() -> str:\n        import ctypes\n        from ctypes import wintypes\n\n        class SYSTEM_INFO(ctypes.Structure):\n            class _U(ctypes.Union):\n                class _S(ctypes.Structure):\n                    _fields_ = [(\"wProcessorArchitecture\", wintypes.WORD), (\"wReserved\", wintypes.WORD)]\n\n                _fields_ = [(\"dwOemId\", wintypes.DWORD), (\"s\", _S)]\n                _anonymous_ = (\"s\",)\n\n            _fields_ = [\n                (\"u\", _U),\n                (\"dwPageSize\", wintypes.DWORD),\n                (\"lpMinimumApplicationAddress\", wintypes.LPVOID),","sourceCodeStart":690,"sourceCodeEnd":726,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/ls_utils.py#L690-L726","documentation":"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.","triggerScenarios":"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.","commonSituations":"Developers on Alpine (musl) or ARM boards, FreeBSD workstations, or uncommon architectures trying to auto-install language servers; exotic CI runners.","solutions":["Check the logged system/machine/bitness values against the library's supported platform list","Run on a supported platform (linux x64/arm64, macOS, Windows x64/arm64) or use a container with one","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import platform\nsupported = {(\"linux\",\"x86_64\"),(\"linux\",\"aarch64\"),(\"darwin\",\"x86_64\"),(\"darwin\",\"arm64\"),(\"windows\",\"x86_64\"),(\"windows\",\"arm64\")}\nsys_, mach = platform.system().lower(), platform.machine().lower()\nif (sys_, mach) not in supported:\n    raise EnvironmentError(f\"unsupported platform {sys_}/{mach} for language-server install\")","typeGuard":"def platform_supported() -> bool:\n    s, m = platform.system().lower(), platform.machine().lower()\n    return s in {\"linux\",\"darwin\",\"windows\"} and m in {\"x86_64\",\"amd64\",\"arm64\",\"aarch64\"}","tryCatchPattern":"try:\n    pid = PlatformUtils.get_platform_id()\nexcept SolidLSPException as e:\n    if \"Unknown platform\" in str(e):\n        logger.error(\"unsupported OS/arch: %s\", e)\n        raise UnsupportedPlatformError from e\n    raise","preventionTips":["Check platform/system/machine values printed in the error against your OS","Run language-server setup inside supported containers (linux x64/arm64)","For musl (Alpine) users, confirm the library's musl platform ids before installing","Pin CI runners to supported architectures"],"tags":["platform","environment","architecture"],"backgroundTag":"unsupported-platform-architecture","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}