{"record":{"id":"4686a4469146edc8","repo":"SeleniumHQ/selenium","slug":"the-version-cannot-be-discovered","errorCode":null,"errorMessage":"The {} version cannot be discovered","messagePattern":"The (.+?) version cannot be discovered","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"rust/src/lib.rs","lineNumber":685,"sourceCode":"                    self.get_browser_version(),\n                    browser_path.unwrap().display()\n                ));\n            } else if !self.is_iexplorer() && !self.is_grid() && !self.is_safari() {\n                return Err(anyhow!(format!(\n                    \"{}{} cannot be downloaded\",\n                    self.get_browser_name(),\n                    self.get_browser_version_label()\n                )));\n            }\n        }\n        Ok(())\n    }\n\n    fn discover_driver_version(&mut self) -> Result<String, Error> {\n        // We request the driver version using online endpoints\n        let driver_version = self.request_driver_version()?;\n        if driver_version.is_empty() {\n            Err(anyhow!(format!(\n                \"The {} version cannot be discovered\",\n                self.get_driver_name()\n            )))\n        } else {\n            self.get_logger().debug(format!(\n                \"Required driver: {} {}\",\n                self.get_driver_name(),\n                driver_version\n            ));\n            Ok(driver_version)\n        }\n    }\n\n    fn find_browser_in_path(&self) -> Option<PathBuf> {\n        for browser_name in self.get_browser_names_in_path().iter() {\n            self.get_logger()\n                .trace(format!(\"Checking {} in PATH\", browser_name));\n            let browser_path = self.execute_which_in_shell(browser_name);","sourceCodeStart":667,"sourceCodeEnd":703,"githubUrl":"https://github.com/SeleniumHQ/selenium/blob/aa36b38e696a0909e973bdf5e2f9031ffe842c4b/rust/src/lib.rs#L667-L703","documentation":"Thrown by Selenium Manager's discover_driver_version() when request_driver_version() succeeds but returns an empty string. The placeholder is filled with the driver name (e.g. chromedriver, geckodriver). It means the online version endpoint was reachable but yielded no usable version, so Selenium Manager cannot decide which driver to install.","triggerScenarios":"request_driver_version() returns Ok(\"\") because the browser/driver version could not be resolved upstream (e.g. browser version itself was empty, so the version-lookup endpoint returned no matching driver). discover_driver_version() then errors instead of propagating an empty version.","commonSituations":"A corporate proxy or filtering layer returns a 200 with an empty body; the browser is not installed so its version is unknown; an unstable/nightly browser version is not listed in the Chrome-for-Testing or geckodriver release JSON.","solutions":["Check Selenium Manager logs (SE_LOG_LEVEL=debug or --debug) to see which endpoint returned the empty response and what browser version it used for the lookup.","Pin the driver version explicitly so Selenium Manager skips online discovery (e.g. --driver-version 0.32.0 or the browserVersion/driver capability).","If behind a proxy, set HTTPS_PROXY / HTTP_PROXY and confirm the endpoint (googlechromelabs.github.io, github.com/mozilla/geckodriver/releases) is reachable and not returning empty.","Install or repair the target browser so its version can be detected locally."],"exampleFix":"# before\nSE_MANAGER_PATH=/path/selenium-manager --browser chrome\n# after (pin driver version, skip discovery)\nSE_MANAGER_PATH=/path/selenium-manager --browser chrome --driver-version 131.0.6778.87","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Driver discovery is invoked by the binding via selenium-manager CLI.\n// Retry the Selenium Manager call a few times for transient empty responses,\n// then fall back to an explicitly pinned driver version.\nfor (int attempt = 0; attempt < 3; attempt++) {\n    try {\n        return runSeleniumManager(\"--browser\", browser);\n    } catch (DriverDiscoveryException e) {\n        if (attempt == 2) return runSeleniumManager(\"--browser\", browser, \"--driver-version\", pinned);\n    }\n}","preventionTips":["Pin the driver version in capabilities so online discovery is never required.","Keep the target browser installed and detectable so its version is non-empty.","Whitelist the version-discovery endpoints in proxy/firewall rules."],"tags":["driver-discovery","network","selenium-manager","rust"],"backgroundTag":null,"analyzedSha":"aa36b38e696a0909e973bdf5e2f9031ffe842c4b","analyzedAt":"2026-08-14T02:32:32.244Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}