{"record":{"id":"27497b5c39b2f6aa","repo":"SeleniumHQ/selenium","slug":"unable-to-obtain-browser-driver-for-more","errorCode":null,"errorMessage":"Unable to obtain browser driver.\n        For more information on how to install drivers see\n        https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/. ${e}","messagePattern":"Unable to obtain browser driver\\.\n        For more information on how to install drivers see\n        https://www\\.selenium\\.dev/documentation/webdriver/troubleshooting/errors/driver_location/\\. (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"javascript/selenium-webdriver/common/driverFinder.js","lineNumber":38,"sourceCode":" *\n *  Utility to find if a given file is present and executable.\n */\n\nconst path = require('node:path')\nconst { binaryPaths } = require('./seleniumManager')\n\n/**\n * Determines the path of the correct Selenium Manager binary\n * @param {Capabilities} capabilities browser options to fetch the driver\n * @returns {{browserPath: string, driverPath: string}} path of the driver\n * and browser location\n */\nfunction getBinaryPaths(capabilities) {\n  try {\n    const args = getArgs(capabilities)\n    return binaryPaths(args)\n  } catch (e) {\n    throw new Error(\n      `Unable to obtain browser driver.\n        For more information on how to install drivers see\n        https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/. ${e}`,\n      { cause: e },\n    )\n  }\n}\n\nfunction getArgs(options) {\n  let args = ['--browser', options.getBrowserName(), '--language-binding', 'javascript', '--output', 'json']\n\n  if (options.getBrowserVersion() && options.getBrowserVersion() !== '') {\n    args.push('--browser-version', options.getBrowserVersion())\n  }\n\n  const vendorOptions =\n    options.get('goog:chromeOptions') || options.get('ms:edgeOptions') || options.get('moz:firefoxOptions')\n  if (vendorOptions && vendorOptions.binary && vendorOptions.binary !== '') {","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/SeleniumHQ/selenium/blob/aa36b38e696a0909e973bdf5e2f9031ffe842c4b/javascript/selenium-webdriver/common/driverFinder.js#L20-L56","documentation":"Thrown by getBinaryPaths() in driverFinder.js when Selenium Manager fails to return driver/browser paths. It wraps any error thrown by binaryPaths() (which spawns the selenium-manager binary) and appends a troubleshooting URL. The original error is preserved in the `cause` property.","triggerScenarios":"Selenium Manager cannot download a driver (no network, proxy block); the target browser is not installed; requested browser version has no matching driver; SE_MANAGER_PATH points to a broken binary; the spawned binary exits non-zero or returns unparseable output.","commonSituations":"First run in a locked-down CI/CD environment; corporate firewall blocking driver downloads; browser auto-updated to a version with no driver yet; running in a minimal Docker image without the browser installed.","solutions":["Inspect the error.cause for the specific underlying failure message.","Ensure network/proxy access for driver downloads, or configure proxy via capabilities.getProxy().","Pin a known browser version with capabilities.setBrowserVersion().","Pre-install the driver and pass it via the browser Service (e.g., new chrome.ServiceBuilder(driverPath)).","Install the target browser in the execution environment."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const paths = getBinaryPaths(capabilities)\n} catch (e) {\n  console.error('Driver setup failed:', e.message)\n  if (e.cause) console.error('Underlying cause:', e.cause)\n  // fallback: specify driver path manually via Service\n}","preventionTips":["Pin browser versions in CI to avoid driver mismatches after auto-updates.","Pre-install drivers and pass them via the browser Service builder to bypass Selenium Manager.","Ensure network/proxy access for driver downloads in CI environments.","Set SE_MANAGER_PATH explicitly in environments with a known-good binary."],"tags":["driver-management","selenium-manager","environment","network","configuration"],"backgroundTag":null,"analyzedSha":"aa36b38e696a0909e973bdf5e2f9031ffe842c4b","analyzedAt":"2026-08-14T02:32:32.244Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}