{"record":{"id":"da3fbfb3a5d8ad40","repo":"parcel-bundler/parcel","slug":"unsupported-architecture-on-android-arch","errorCode":null,"errorMessage":"Unsupported architecture on Android ${arch}","messagePattern":"Unsupported architecture on Android (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/core/rust/index.js","lineNumber":66,"sourceCode":"          loadError = e;\n        }\n        break;\n      case 'arm':\n        localFileExisted = existsSync(\n          join(__dirname, 'parcel-node-bindings.android-arm-eabi.node'),\n        );\n        try {\n          if (localFileExisted) {\n            nativeBinding = require('./parcel-node-bindings.android-arm-eabi.node');\n          } else {\n            nativeBinding = require('@parcel/rust-android-arm-eabi');\n          }\n        } catch (e) {\n          loadError = e;\n        }\n        break;\n      default:\n        throw new Error(`Unsupported architecture on Android ${arch}`);\n    }\n    break;\n  case 'win32':\n    switch (arch) {\n      case 'x64':\n        localFileExisted = existsSync(\n          join(__dirname, 'parcel-node-bindings.win32-x64-msvc.node'),\n        );\n        try {\n          if (localFileExisted) {\n            nativeBinding = require('./parcel-node-bindings.win32-x64-msvc.node');\n          } else {\n            nativeBinding = require('@parcel/rust-win32-x64-msvc');\n          }\n        } catch (e) {\n          loadError = e;\n        }\n        break;","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/rust/index.js#L48-L84","documentation":"Thrown by the native-binding loader in @parcel/rust when running on the Android platform with a CPU architecture that has no prebuilt .node binary. The loader enumerates platform/arch combinations and falls into the default branch only for unrecognized Android arches, so a supported list (android-arm-eabi, android-arm64, android-x64) is known but the current arch matched none.","triggerScenarios":"Executing Parcel's Rust bindings on Android under an architecture other than arm-eabi/arm64/x64 (e.g. android-x86, android-riscv64), or where os.arch() reports an unexpected identifier.","commonSituations":"Cross-compiling or running Parcel inside Termux/an Android container on uncommon hardware; running under an emulation layer that misreports the architecture string; using a Node build that returns a non-standard arch name.","solutions":["Run Parcel on a supported Android arch (arm64, arm-eabi, or x64) — check `node -p \"process.arch\"`.","Move the build to a desktop OS (linux/darwin/win32) where full prebuilt coverage exists.","Build the native binding from source for your arch via the @parcel/rust-<platform-arch> package if available.","If arch is misreported, set the environment so Node detects the correct architecture."],"exampleFix":"// before: process.arch === 'x86' on android\n// default -> throw `Unsupported architecture on Android x86`\n\n// after: run on a supported arch\nnode -p process.arch // 'arm64'","handlingStrategy":"validation","validationCode":"import { platform, arch } from 'process';\nconst ANDROID_SUPPORTED = new Set(['arm', 'arm64', 'x64']);\nif (platform === 'android' && !ANDROID_SUPPORTED.has(arch)) {\n  throw new Error(`Unsupported Android arch ${arch}; use arm64/arm/x64 or run on linux/darwin.`);\n}","typeGuard":"const SUPPORTED_ANDROID_ARCH = ['arm','arm64','x64'];\nfunction isSupportedAndroidArch(a: string): boolean {\n  return SUPPORTED_ANDROID_ARCH.includes(a);\n}","tryCatchPattern":null,"preventionTips":["Print process.platform/process.arch at startup in deployment scripts to catch mismatches early.","Pin Node and the OS image to a known-supported combination.","Install the matching @parcel/rust-<platform-arch> prebuilt as an optionalDependency."],"tags":["native-binding","android","architecture","parcel-rust"],"backgroundTag":null,"analyzedSha":"59484858a1a0bcbb71f74088956bb437a2db6505","analyzedAt":"2026-08-13T04:06:35.925Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}