SeleniumHQ/selenium · error · anyhow::Error
Unsupported architecture: {}
Error message
Unsupported architecture: {} What it means
Thrown by get_normalized_arch() when the configured/detected architecture matches none of x32, x64, arm64, or armv7. It logs a warning first, then returns Err. The placeholder is the unrecognized arch string.
Source
Thrown at rust/src/lib.rs:1401
fn get_arch(&self) -> &str {
self.get_config().arch.as_str()
}
fn get_normalized_arch(&self) -> Result<&str, Error> {
let arch = self.get_arch();
if X32.is(arch) {
Ok(ARCH_X86)
} else if X64.is(arch) {
Ok(ARCH_X64)
} else if ARM64.is(arch) {
Ok(ARCH_ARM64)
} else if ARMV7.is(arch) {
Ok(ARCH_ARM7L)
} else {
let err_msg = format!("Unsupported architecture: {}", arch);
self.get_logger().warn(err_msg.clone());
Err(anyhow!(err_msg))
}
}
fn set_arch(&mut self, arch: String) {
if !arch.is_empty() {
self.get_config_mut().arch = arch;
}
}
fn get_browser_version(&self) -> &str {
self.get_config().browser_version.as_str()
}
fn get_major_browser_version(&self) -> String {
if self.is_browser_version_stable() {
STABLE.to_string()
} else if self.is_browser_version_unstable() {
self.get_browser_version().to_string()View on GitHub (pinned to aa36b38e69)
Solutions
- Pass a supported --arch explicitly (x86, x86_64, aarch64/arm64, armv7).
- Confirm Selenium Manager is up to date; newer builds may add arch support.
- If on a genuinely unsupported platform, run under emulation or use a supported runner.
Example fix
# before selenium-manager --browser chrome --arch riscv64 # after selenium-manager --browser chrome --arch arm64
Defensive patterns
Strategy: type-guard
Type guard
fn supported_arch(a: &str) -> Option<&'static str> {
match a.to_ascii_lowercase().as_str() {
"x86" | "i386" | "i686" => Some("x86"),
"x86_64" | "x64" | "amd64" => Some("x86_64"),
"aarch64" | "arm64" => Some("aarch64"),
"armv7" | "armv7l" => Some("armv7"),
_ => None,
}
}
if supported_arch(detected).is_none() { return Err(anyhow!("unsupported arch")); } Prevention
- Pass --arch explicitly with a supported value when auto-detection may fail.
- Run on a supported architecture or under emulation.
- Keep Selenium Manager current for new-arch support.
When it happens
Trigger: get_arch() returns a value that matches none of X32/X64/ARM64/ARMV7 matchers (lib.rs:1388-1402), e.g. an exotic or malformed architecture string.
Common situations: Running on an unsupported CPU (e.g. RISC-V, s390x); --arch passed a wrong value; arch detection returned garbage.
Related errors
- Unsupported platform/architecture combination: {sys.platform
- Linux arm64 is not supported yet by Google Chrome. Please tr
- Linux arm64 is not supported yet by {}. Please try another b
- Invalid operating system: {os}
- Linux arm64 is not supported yet by Microsoft Edge. Please t
AI-assisted analysis of SeleniumHQ/selenium@aa36b38e69 (2026-08-14).
Data as JSON: /api/errors/0eac5367ac287184.
Report an issue: GitHub.