{"record":{"id":"3458df795f275517","repo":"oraios/serena","slug":"unsupported-macos-architecture-machine","errorCode":null,"errorMessage":"Unsupported macOS architecture: {machine}","messagePattern":"Unsupported macOS architecture: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/lua_ls.py","lineNumber":140,"sourceCode":"        lua_ls_version = lua_settings.get(\"lua_language_server_version\", DEFAULT_LUA_LS_VERSION)\n        system = platform.system()\n        machine = platform.machine().lower()\n\n        # Map platform and architecture to download URL\n        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),","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/lua_ls.py#L122-L158","documentation":"Raised during lua-language-server download when running on macOS with a CPU architecture outside x86_64/amd64 and arm64/aarch64, i.e. there is no matching darwin release asset. Practically this means unsupported/legacy Mac hardware or unusual emulation.","triggerScenarios":"Calling _download_lua_ls on macOS where platform.machine() returns e.g. i386, powerpc, or an unexpected emulated value under Rosetta/QEMU with odd machine strings.","commonSituations":"Old Intel-32-bit Hackintosh/VM setups, CI runners with exotic virtualization reporting nonstandard machine values, cross-arch Docker-on-Mac containers leaking a nonstandard uname.","solutions":["Run on standard Apple Silicon (arm64) or Intel (x86_64) macOS hardware or VM","Inside Docker on Apple Silicon, use --platform=linux/arm64 so the Linux branch (not macOS branch) resolves an asset","Build lua-language-server from source and place it in the expected install_dir to bypass the download","Check `uname -m` output; if it is unexpected due to emulation, run natively"],"exampleFix":"// before\ndocker run --platform linux/amd64 ...  # mismatched emulation on Apple Silicon\n// after\ndocker run --platform linux/arm64 ...","handlingStrategy":"validation","validationCode":"import platform\nmachine = platform.machine().lower()\nif platform.system() == \"Darwin\" and machine not in (\"x86_64\", \"amd64\", \"arm64\", \"aarch64\"):\n    raise SystemExit(f\"lua-language-server has no prebuilt darwin binary for {machine}\")","typeGuard":null,"tryCatchPattern":"try:\n    server = create_lua_server()\nexcept RuntimeError as e:\n    if \"Unsupported macOS architecture\" in str(e):\n        use_source_built_or_homebrew_binary()\n    else:\n        raise","preventionTips":["Run on standard Apple Silicon or Intel Macs","Verify `uname -m` under Rosetta/emulation matches expectations","Prefer Homebrew's lua-language-server when available as a fallback","Avoid nested platform-emulated containers on macOS hosts"],"tags":["lua","macos","architecture","unsupported-platform"],"backgroundTag":"unsupported-architecture","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}