SeleniumHQ/selenium · critical · Error

Error executing command for ${smBinary} with ${args}: ${erro

Error message

Error executing command for ${smBinary} with ${args}: ${errorMessage}

What it means

Thrown by binaryPaths() when spawnSync of selenium-manager returns a non-zero exit status. The message embeds stderr, or the parsed JSON result.message from stdout if available. This indicates Selenium Manager ran but could not fulfill the request (driver resolution failed).

Source

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

function binaryPaths(args) {
  const smBinary = getBinary()
  const spawnResult = spawnSync(smBinary, args)
  let output
  if (spawnResult.status) {
    let errorMessage
    if (spawnResult.stderr.toString()) {
      errorMessage = spawnResult.stderr.toString()
    }
    if (spawnResult.stdout.toString()) {
      try {
        output = JSON.parse(spawnResult.stdout.toString())
        logOutput(output)
        errorMessage = output.result.message
      } catch (e) {
        errorMessage = e.toString()
      }
    }
    throw new Error(`Error executing command for ${smBinary} with ${args}: ${errorMessage}`)
  }
  try {
    output = JSON.parse(spawnResult.stdout.toString())
  } catch (e) {
    throw new Error(`Error executing command for ${smBinary} with ${args}: ${e.toString()}`, { cause: e })
  }

  logOutput(output)
  return {
    driverPath: output.result.driver_path,
    browserPath: output.result.browser_path,
  }
}

function logOutput(output) {
  for (const key in output.logs) {
    if (output.logs[key].level === 'WARN') {
      log_.warning(`${output.logs[key].message}`)

View on GitHub (pinned to aa36b38e69)

Solutions

  1. Read the embedded errorMessage in the thrown Error for the specific cause.
  2. Pin capabilities.setBrowserVersion() to a version with a known driver.
  3. Configure proxy settings via capabilities so Selenium Manager can download.
  4. Manually provide the driver through the browser Service builder.
  5. Install the missing browser binary in the environment.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  const { driverPath, browserPath } = binaryPaths(args)
} catch (e) {
  console.error('Selenium Manager error:', e.message)
  // parse the embedded message for actionable detail
  // fallback: provide driver manually via Service

Prevention

When it happens

Trigger: No compatible driver found for the installed browser version; browser not installed; network/proxy error during download; unsupported browser requested via capabilities; Selenium Manager internal error reported in result.message.

Common situations: Browser updated beyond available drivers; running in headless CI without browser; corporate proxy blocking the driver repository; requesting an obscure or outdated browser version.

Related errors


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