{"record":{"id":"86c6bfae434e9501","repo":"SeleniumHQ/selenium","slug":"unable-to-discover-proper-version-in-offline-mo","errorCode":null,"errorMessage":"Unable to discover proper {} version in offline mode","messagePattern":"Unable to discover proper (.+?) version in offline mode","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"rust/src/lib.rs","lineNumber":1171,"sourceCode":"\n        let mut release_version = driver_version.to_string();\n        if !driver_version.ends_with('0') && !self.is_nightly(driver_version) {\n            // E.g.: version 4.8.1 is shipped within release 4.8.0\n            let error_message = format!(\n                \"Wrong {} version: '{}'\",\n                self.get_driver_name(),\n                driver_version\n            );\n            let index = release_version.rfind('.').ok_or(anyhow!(error_message))? + 1;\n            release_version = release_version[..index].to_string();\n            release_version.push('0');\n        }\n        Ok(format!(\"selenium-{release_version}\"))\n    }\n\n    fn assert_online_or_err(&self, message: &str) -> Result<(), Error> {\n        if self.is_offline() {\n            return Err(anyhow!(format_one_arg(message, self.get_driver_name())));\n        }\n        Ok(())\n    }\n\n    fn get_driver_name_with_extension(&self) -> String {\n        format!(\n            \"{}{}\",\n            self.get_driver_name(),\n            get_binary_extension(self.get_os())\n        )\n    }\n\n    fn get_browser_name_with_extension(&self) -> String {\n        format!(\n            \"{}{}\",\n            self.get_browser_name(),\n            get_binary_extension(self.get_os())\n        )","sourceCodeStart":1153,"sourceCodeEnd":1189,"githubUrl":"https://github.com/SeleniumHQ/selenium/blob/aa36b38e696a0909e973bdf5e2f9031ffe842c4b/rust/src/lib.rs#L1153-L1189","documentation":"Produced by assert_online_or_err() using the OFFLINE_REQUEST_ERR_MSG constant (\"Unable to discover proper {} version in offline mode\"). It fires when Selenium Manager has detected offline mode but a manager's request_driver_version() needs the network (IEDriver, Edge, Firefox, Chrome, Grid, Electron). The placeholder is the driver name.","triggerScenarios":"is_offline() is true and a browser manager calls self.assert_online_or_err(OFFLINE_REQUEST_ERR_MSG) inside request_driver_version() (see iexplorer.rs:140, edge.rs:245, firefox.rs:241, chrome.rs:345, grid.rs:128, electron.rs:184).","commonSituations":"Air-gapped CI; --offline flag set; no default route detected; DNS resolution failing so Selenium Manager treats the host as offline; corporate firewall blocks the version endpoints.","solutions":["Allow network egress to the version-discovery endpoints (googlechromelabs.github.io, github.com, *githubusercontent.com, edge updates URLs).","Pre-populate the Selenium Manager cache with the needed driver so discovery can be served locally.","Pin the driver version via --driver-version so online discovery is bypassed.","Remove an explicit --offline flag if the host actually has connectivity."],"exampleFix":"# before\nselenium-manager --browser edge --offline   # cannot discover\n# after (allow network, or pin)\nselenium-manager --browser edge\ncurl -fsSL https://msedgedriver.azureedge.net/<ver>/edgedriver_<os>.zip -o ~/.cache/selenium/...","handlingStrategy":"validation","validationCode":"use std::net::ToSocketAddrs;\nfn has_network() -> bool {\n    \"googlechromelabs.github.io:443\".to_socket_addrs().is_ok()\n}\n// guard before relying on online discovery\nif !has_network() {\n    eprintln!(\"offline: pin a driver version or seed the cache\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pre-seed the Selenium Manager cache on a connected machine.","Pin driver versions for air-gapped environments.","Verify DNS/egress to the version endpoints in CI."],"tags":["offline","driver-discovery","network","selenium-manager"],"backgroundTag":null,"analyzedSha":"aa36b38e696a0909e973bdf5e2f9031ffe842c4b","analyzedAt":"2026-08-14T02:32:32.244Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}