{"record":{"id":"2858059b04303b79","repo":"SeleniumHQ/selenium","slug":"wrong-browser-driver-version","errorCode":null,"errorMessage":"Wrong browser/driver version","messagePattern":"Wrong browser/driver version","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"rust/src/files.rs","lineNumber":193,"sourceCode":"            target,\n            log,\n        )?\n    } else if extension.eq_ignore_ascii_case(PKG) {\n        uncompress_pkg(compressed_file, target, log)?\n    } else if extension.eq_ignore_ascii_case(DMG) {\n        uncompress_dmg(compressed_file, target, log, volume.unwrap_or_default())?\n    } else if extension.eq_ignore_ascii_case(EXE) {\n        uncompress_sfx(compressed_file, target, log)?\n    } else if extension.eq_ignore_ascii_case(DEB) {\n        uncompress_deb(compressed_file, target, log, volume.unwrap_or_default())?\n    } else if extension.eq_ignore_ascii_case(MSI) {\n        install_msi(compressed_file, log, os)?\n    } else if extension.eq_ignore_ascii_case(XML) || extension.eq_ignore_ascii_case(HTML) {\n        log.debug(format!(\n            \"Wrong downloaded driver: {}\",\n            fs::read_to_string(compressed_file).unwrap_or_default()\n        ));\n        return Err(anyhow!(PARSE_ERROR));\n    } else {\n        return Err(anyhow!(format!(\n            \"Downloaded file cannot be uncompressed ({} extension)\",\n            extension\n        )));\n    }\n\n    Ok(())\n}\n\npub fn uncompress_sfx(compressed_file: &str, target: &Path, log: &Logger) -> Result<(), Error> {\n    let zip_parent = Path::new(compressed_file).parent().unwrap();\n    log.trace(format!(\n        \"Decompressing {} to {}\",\n        compressed_file,\n        zip_parent.display()\n    ));\n","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/SeleniumHQ/selenium/blob/aa36b38e696a0909e973bdf5e2f9031ffe842c4b/rust/src/files.rs#L175-L211","documentation":"Raised in uncompress() (files.rs:193) via the PARSE_ERROR constant when the downloaded file's detected extension is XML or HTML. This signals that the download endpoint did not return a binary archive but an error page (e.g. a 404 HTML page, an XML error envelope), usually because the requested driver version was wrong or unavailable. The message is the constant 'Wrong browser/driver version'.","triggerScenarios":"infer identifies the downloaded bytes as XML or HTML (line 188). The branch logs the file contents at debug level and returns Err(PARSE_ERROR). Typical when a driver version doesn't exist and the server returns an HTML 404 page saved as the driver archive.","commonSituations":"Requesting a chromedriver/edgedriver version that doesn't exist returns an HTML error page; a CDN serves an XML error envelope; version auto-detection picked a non-existent patch; mirror returns an error document with 200 status.","solutions":["Check Selenium Manager debug logs which print the HTML/XML body revealing the server's error.","Verify the requested driver/browser version exists on the official endpoint.","Re-run with auto version discovery (drop explicit --driver-version).","Confirm the mirror URL is correct and returns binary archives."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# Bash: detect HTML/XML error pages masquerading as driver archives\nTYPE=$(file -b --mime-type \"$FILE\")\ncase \"$TYPE\" in\n  text/html|application/xml|text/xml) echo \"Download is an error page, not a driver\"; exit 1;;\nesac","typeGuard":null,"tryCatchPattern":"match uncompress(file, target, &log, os, single, vol) {\n    Ok(()) => (),\n    Err(e) if e.to_string().contains(\"Wrong browser/driver version\") => {\n        eprintln!(\"Driver URL returned an error page; verify the version exists\");\n        return Err(e);\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Let Selenium Manager auto-discover driver versions instead of pinning wrong ones.","Check Selenium Manager debug logs which print the HTML/XML body.","Verify driver version availability on the official endpoint."],"tags":["rust","selenium-manager","archive","download","versioning","http"],"backgroundTag":null,"analyzedSha":"aa36b38e696a0909e973bdf5e2f9031ffe842c4b","analyzedAt":"2026-08-14T02:32:32.244Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}