{"record":{"id":"6469a59b12f83c25","repo":"nikivdev/code","slug":"unsupported-architecture-6469a5","errorCode":null,"errorMessage":"Unsupported architecture","messagePattern":"Unsupported architecture","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/upgrade.rs","lineNumber":175,"sourceCode":"\n    bail!(\"Unsupported operating system for self-upgrade (only macOS/Linux supported)\");\n}\n\nfn detect_legacy_platform() -> Result<(&'static str, &'static str)> {\n    let os = if cfg!(target_os = \"macos\") {\n        \"darwin\"\n    } else if cfg!(target_os = \"linux\") {\n        \"linux\"\n    } else {\n        bail!(\"Unsupported operating system for self-upgrade (only macOS/Linux supported)\");\n    };\n\n    let arch = if cfg!(target_arch = \"aarch64\") {\n        \"arm64\"\n    } else if cfg!(target_arch = \"x86_64\") {\n        \"amd64\"\n    } else {\n        bail!(\"Unsupported architecture\");\n    };\n\n    Ok((os, arch))\n}\n\n/// Fetch the latest release info from GitHub.\nfn fetch_latest_release(client: &Client) -> Result<GitHubRelease> {\n    let (owner, repo) = upgrade_repo()?;\n    let url = format!(\n        \"https://api.github.com/repos/{}/{}/releases/latest\",\n        owner, repo\n    );\n\n    let mut request = client\n        .get(&url)\n        .header(\"User-Agent\", format!(\"flow/{}\", current_version()))\n        .header(\"Accept\", \"application/vnd.github.v3+json\")\n        .timeout(Duration::from_secs(30));","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/upgrade.rs#L157-L193","documentation":"Returned when the self-upgrade routine detects a CPU architecture for which no prebuilt release binary is published.","triggerScenarios":"Self-upgrade on macOS/Linux with a build compiled for a 32-bit or exotic architecture (armv7, i686, riscv, etc.).","commonSituations":"Running an i686 (32-bit) build on Linux, or an armv7 build on a Raspberry Pi 3 in 32-bit mode; legacy installs on non-64-bit systems.","solutions":["Check available release assets for supported architectures","Build from source for the unsupported architecture"],"exampleFix":"// before\n# 32-bit install on Raspberry Pi OS (armv7)\nflow upgrade\n// after\n# install arm64 build, then\nflow upgrade\n","handlingStrategy":"validation","validationCode":"fn is_64bit() -> bool {\n    matches!(std::env::consts::ARCH, \"x86_64\" | \"aarch64\")\n}\nif !is_64bit() {\n    eprintln!(\"only amd64/arm64 legacy assets exist; install the 64-bit build\");\n    return;\n}","typeGuard":null,"tryCatchPattern":"match detect_legacy_platform() {\n    Ok((os, arch)) => { /* use asset */ }\n    Err(e) if e.to_string().contains(\"Unsupported architecture\") => {\n        eprintln!(\"install a 64-bit (amd64/arm64) build of the tool first\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Verify 64-bit userspace (e.g. `getconf LONG_BIT`) before self-upgrade.","Install official 64-bit builds only; avoid i686/armv7 packages.","On 32-bit-only hardware, use manual downloads or upgrade the OS.","Check release assets exist for your arch before attempting upgrade."],"tags":["architecture","upgrade","legacy"],"backgroundTag":"unsupported-architecture","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}