SeleniumHQ/selenium · error · anyhow::Error
Downloaded archive did not contain expected Java runtime str
Error message
Downloaded archive did not contain expected Java runtime structure in {} or {} What it means
Error "Downloaded archive did not contain expected Java runtime structure in {} or {}" thrown in SeleniumHQ/selenium.
Source
Thrown at rust/src/jre.rs:159
}
}
if extracted_root.is_none() {
for entry in fs::read_dir(&install_parent)? {
let entry = entry?;
let path = entry.path();
if path.is_dir()
&& !entries_before_uncompress.contains(&path)
&& find_java_binary(&path).is_some()
{
extracted_root = Some(path);
break;
}
}
}
let extracted_root = extracted_root.ok_or_else(|| {
anyhow!(
"Downloaded archive did not contain expected Java runtime structure in {} or {}",
temp_extract.display(),
install_parent.display()
)
})?;
if extracted_root != install_root {
fs::rename(&extracted_root, &install_root)?;
}
// Clean up temporary extraction directory
if temp_extract.exists() && temp_extract != install_root {
fs::remove_dir_all(&temp_extract)?;
}
let runtime = detect_managed_jre_candidate(&install_root)?.ok_or_else(|| {
anyhow!(format!(
"Downloaded Java runtime but failed to resolve java binary in {}",View on GitHub (pinned to aa36b38e69)
Solutions
- Delete the JRE folder under the cache directory so Selenium Manager re-downloads the runtime
- Verify the Adoptium download completed (check network/proxy settings and retry)
- Install a JDK/JRE manually and ensure it is on PATH so Selenium Manager can use the system Java
When it happens
Trigger: Thrown at rust/src/jre.rs:159 when the library encounters an invalid state.
Common situations: Occurs when the downloaded Java runtime archive does not contain the expected directory structure, usually from a corrupted download or upstream packaging change. Clear the Selenium Manager cache and retry; if persistent, report the upstream layout change.
AI-assisted analysis of SeleniumHQ/selenium@aa36b38e69 (2026-08-14).
Data as JSON: /api/errors/5e1d2c75d374a2d8.
Report an issue: GitHub.