SeleniumHQ/selenium · error · anyhow::Error

Unsupported architecture for JRE download: {}

Error message

Unsupported architecture for JRE download: {}

What it means

Error "Unsupported architecture for JRE download: {}" thrown in SeleniumHQ/selenium.

Source

Thrown at rust/src/jre.rs:301

        .unwrap_or_else(default_cache_folder);
    root.join("jre").join(JRE_MAJOR_VERSION)
}

fn map_os_to_adoptium(os: &str) -> Result<&'static str, Error> {
    match os {
        "macos" => Ok("mac"),
        "linux" => Ok("linux"),
        "windows" => Ok("windows"),
        _ => Err(anyhow!(format!("Unsupported OS for JRE download: {}", os))),
    }
}

fn map_arch_to_adoptium(arch: &str) -> Result<&'static str, Error> {
    match arch {
        "x86_64" => Ok("x64"),
        "aarch64" => Ok("aarch64"),
        "x86" => Ok("x32"),
        _ => Err(anyhow!(format!(
            "Unsupported architecture for JRE download: {}",
            arch
        ))),
    }
}

fn find_java_binary(root: &Path) -> Option<PathBuf> {
    let java_binary = if OS == "windows" { "java.exe" } else { "java" };
    for entry in WalkDir::new(root).into_iter().flatten() {
        let path = entry.path();
        if path.is_file()
            && path
                .file_name()
                .map(|name| name.eq_ignore_ascii_case(java_binary))
                .unwrap_or(false)
            && path
                .parent()
                .and_then(|parent| parent.file_name())

View on GitHub (pinned to aa36b38e69)

Solutions

  1. Run on a supported architecture (x64, x86, or aarch64) for managed JRE download
  2. Install Java manually and ensure it is on PATH so no download is needed

When it happens

Trigger: Thrown at rust/src/jre.rs:301 when the library encounters an invalid state.

Common situations: Occurs when requesting a JRE for a CPU architecture with no published build. Use a supported architecture (x64/aarch64) or install a JRE manually.


AI-assisted analysis of SeleniumHQ/selenium@aa36b38e69 (2026-08-14). Data as JSON: /api/errors/13cf45efd8cdf91f. Report an issue: GitHub.