{"record":{"id":"50c7b90ad5f3e37e","repo":"oraios/serena","slug":"unsupported-windows-architecture-machine","errorCode":null,"errorMessage":"Unsupported Windows architecture: {machine}","messagePattern":"Unsupported Windows architecture: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/lua_ls.py","lineNumber":145,"sourceCode":"        if system == \"Linux\":\n            if machine in [\"x86_64\", \"amd64\"]:\n                download_name = f\"lua-language-server-{lua_ls_version}-linux-x64.tar.gz\"\n            elif machine in [\"aarch64\", \"arm64\"]:\n                download_name = f\"lua-language-server-{lua_ls_version}-linux-arm64.tar.gz\"\n            else:\n                raise RuntimeError(f\"Unsupported Linux architecture: {machine}\")\n        elif system == \"Darwin\":\n            if machine in [\"x86_64\", \"amd64\"]:\n                download_name = f\"lua-language-server-{lua_ls_version}-darwin-x64.tar.gz\"\n            elif machine in [\"arm64\", \"aarch64\"]:\n                download_name = f\"lua-language-server-{lua_ls_version}-darwin-arm64.tar.gz\"\n            else:\n                raise RuntimeError(f\"Unsupported macOS architecture: {machine}\")\n        elif system == \"Windows\":\n            if machine in [\"amd64\", \"x86_64\"]:\n                download_name = f\"lua-language-server-{lua_ls_version}-win32-x64.zip\"\n            else:\n                raise RuntimeError(f\"Unsupported Windows architecture: {machine}\")\n        else:\n            raise RuntimeError(f\"Unsupported operating system: {system}\")\n\n        download_url = f\"https://github.com/LuaLS/lua-language-server/releases/download/{lua_ls_version}/{download_name}\"\n\n        install_dir = _lua_ls_install_dir(LuaLanguageServer.ls_resources_dir(solidlsp_settings), lua_ls_version)\n        install_dir.mkdir(parents=True, exist_ok=True)\n\n        log.info(\"Downloading lua-language-server from %s\", download_url)\n        archive_type = \"gztar\" if download_name.endswith(\".tar.gz\") else \"zip\"\n        FileUtils.download_and_extract_archive_verified(\n            download_url,\n            str(install_dir),\n            archive_type,\n            expected_sha256=_lua_ls_sha(lua_ls_version, download_name),\n            allowed_hosts=LUA_LS_ALLOWED_HOSTS,\n        )\n","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/lua_ls.py#L127-L163","documentation":"Raised during lua-language-server download when running on Windows with a CPU architecture other than amd64/x86_64; only a win32-x64 zip asset is provided. Windows ARM devices therefore cannot use the prebuilt download path.","triggerScenarios":"Calling _download_lua_ls on Windows ARM (platform.machine() == 'arm64' or 'arm'), e.g. Surface Pro X / Snapdragon laptops running Python natively.","commonSituations":"Windows-on-ARM laptops, ARM-based Azure VMs, running x86 Python under emulation where machine still reports ARM64 in some environments.","solutions":["Run Python under x86_64 emulation so platform.machine() reports AMD64 (use x64 Python installer)","Build lua-language-server from source for Windows ARM and place the exe at install_dir/bin/lua-language-server.exe to skip download","Use an x64 Windows machine or x64 VM/CI runner","Check `python -c \"import platform;print(platform.machine())\"` to confirm what the library sees"],"exampleFix":"// before\nwinget install Python.Python.3.11  # ARM64 build on Windows ARM\n// after\nwinget install Python.Python.3.11 --architecture x64  # emulated x64 -> amd64 detected","handlingStrategy":"validation","validationCode":"import platform\nmachine = platform.machine().lower()\nif platform.system() == \"Windows\" and machine not in (\"amd64\", \"x86_64\"):\n    raise SystemExit(f\"lua-language-server only ships win32-x64; machine={machine} (use x64 Python under emulation)\")","typeGuard":null,"tryCatchPattern":"try:\n    server = create_lua_server()\nexcept RuntimeError as e:\n    if \"Unsupported Windows architecture\" in str(e):\n        reexec_with_x64_python()\n    else:\n        raise","preventionTips":["Install x64 (not ARM64) Python on Windows-on-ARM devices","Check `python -c \"import platform;print(platform.machine())\"` in setup scripts","Keep a source-built exe fallback in install_dir/bin for ARM devices","Document arch requirements for Windows contributors"],"tags":["lua","windows","architecture","unsupported-platform"],"backgroundTag":"unsupported-architecture","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}