SeleniumHQ/selenium · error · anyhow::Error
Error getting parent of {:?}
Error message
Error getting parent of {:?} What it means
Error "Error getting parent of {:?}" thrown in SeleniumHQ/selenium.
Source
Thrown at rust/src/files.rs:447
);
log.trace(format!("Running command: {}", command.display()));
run_shell_command(command)?;
Ok(())
}
pub fn untargz(compressed_file: &str, target: &Path, log: &Logger) -> Result<(), Error> {
log.trace(format!(
"Untargz {} to {}",
compressed_file,
target.display()
));
let file = File::open(compressed_file)?;
let tar = GzDecoder::new(&file);
let mut archive = Archive::new(tar);
let parent_path = target
.parent()
.ok_or(anyhow!(format!("Error getting parent of {:?}", file)))?;
if !target.exists() {
archive.unpack(parent_path)?;
}
Ok(())
}
pub fn uncompress_tar(decoder: &mut dyn Read, target: &Path, log: &Logger) -> Result<(), Error> {
log.trace(format!(
"Uncompress compressed tarball to {}",
target.display()
));
let mut buffer: Vec<u8> = Vec::new();
decoder.read_to_end(&mut buffer)?;
let mut archive = Archive::new(Cursor::new(buffer));
for entry in archive.entries()? {
let mut entry_decoder = entry?;
let path = entry_decoder.path()?;
let entry_path: PathBuf = if path.iter().count() > 1 {View on GitHub (pinned to aa36b38e69)
Solutions
- Check that the target path passed for extraction has a parent directory (it must not be the filesystem root)
- Use a normal directory under the cache folder rather than '/' or a root-level path
When it happens
Trigger: Thrown at rust/src/files.rs:447 when the library encounters an invalid state.
Common situations: Occurs when a path has no parent directory (e.g., a filesystem root) while Selenium Manager tries to resolve it. Prevent it by passing a valid, non-root file path for downloads or cache locations.
AI-assisted analysis of SeleniumHQ/selenium@aa36b38e69 (2026-08-14).
Data as JSON: /api/errors/e821e35d9594d597.
Report an issue: GitHub.