SeleniumHQ/selenium · critical · Error

Unable to obtain Selenium Manager at ${filePath}

Error message

Unable to obtain Selenium Manager at ${filePath}

What it means

Thrown by getBinary() in seleniumManager.js when the selenium-manager executable file does not exist at the resolved path. The path comes from the SE_MANAGER_PATH env var, or from the bundled bin/<platform>/selenium-manager[.exe] directory. fs.existsSync returns false.

Source

Thrown at javascript/selenium-webdriver/common/seleniumManager.js:52

 * Determines the path of the correct Selenium Manager binary
 * @returns {string}
 */
function getBinary() {
  const directory = {
    darwin: 'macos',
    win32: 'windows',
    cygwin: 'windows',
    linux: 'linux',
  }[platform]

  const file = directory === 'windows' ? 'selenium-manager.exe' : 'selenium-manager'

  let seleniumManagerBasePath = path.join(__dirname, '..', '/bin')

  const filePath = process.env.SE_MANAGER_PATH || path.join(seleniumManagerBasePath, directory, file)

  if (!fs.existsSync(filePath)) {
    throw new Error(`Unable to obtain Selenium Manager at ${filePath}`)
  }

  if (!debugMessagePrinted) {
    log_.debug(`Selenium Manager binary found at ${filePath}`)
    debugMessagePrinted = true // Set the flag to true after printing the debug message
  }

  return filePath
}

/**
 * Determines the path of the correct driver
 * @param {string[]} args arguments to invoke Selenium Manager
 * @returns {{browserPath: string, driverPath: string}} path of the driver and
 * browser location
 */

function binaryPaths(args) {

View on GitHub (pinned to aa36b38e69)

Solutions

  1. Set SE_MANAGER_PATH to a valid, executable selenium-manager binary.
  2. Reinstall the package cleanly: rm -rf node_modules && npm install selenium-webdriver.
  3. Verify the platform directory exists under the package's bin/ folder.
  4. Download the matching selenium-manager binary from the Selenium release.
Defensive patterns

Strategy: validation

Validate before calling

const fs = require('node:fs')
const smPath = process.env.SE_MANAGER_PATH || defaultPath
if (!fs.existsSync(smPath)) {
  throw new Error(`Selenium Manager not found at ${smPath}. Reinstall selenium-webdriver or set SE_MANAGER_PATH.`)
}

Prevention

When it happens

Trigger: SE_MANAGER_PATH set to a non-existent file. The bundled binary missing due to a corrupt or incomplete package install. Running on a platform not in the darwin/win32/cygwin/linux map. A git checkout without the built binaries.

Common situations: Corrupted npm install; partial clone of the repo without built artifacts; CI caching a broken node_modules; custom build that omits the binary bundling step; SE_MANAGER_PATH typo.

Related errors


AI-assisted analysis of SeleniumHQ/selenium@aa36b38e69 (2026-08-14). Data as JSON: /api/errors/5f4daefe7f8f1898. Report an issue: GitHub.