{"record":{"id":"24b6ed32be2c9a04","repo":"SeleniumHQ/selenium","slug":"error-executing-command-for-smbinary-with-arg","errorCode":null,"errorMessage":"Error executing command for ${smBinary} with ${args}: ${errorMessage}","messagePattern":"Error executing command for (.+?) with (.+?): (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"javascript/selenium-webdriver/common/seleniumManager.js","lineNumber":88,"sourceCode":"function binaryPaths(args) {\n  const smBinary = getBinary()\n  const spawnResult = spawnSync(smBinary, args)\n  let output\n  if (spawnResult.status) {\n    let errorMessage\n    if (spawnResult.stderr.toString()) {\n      errorMessage = spawnResult.stderr.toString()\n    }\n    if (spawnResult.stdout.toString()) {\n      try {\n        output = JSON.parse(spawnResult.stdout.toString())\n        logOutput(output)\n        errorMessage = output.result.message\n      } catch (e) {\n        errorMessage = e.toString()\n      }\n    }\n    throw new Error(`Error executing command for ${smBinary} with ${args}: ${errorMessage}`)\n  }\n  try {\n    output = JSON.parse(spawnResult.stdout.toString())\n  } catch (e) {\n    throw new Error(`Error executing command for ${smBinary} with ${args}: ${e.toString()}`, { cause: e })\n  }\n\n  logOutput(output)\n  return {\n    driverPath: output.result.driver_path,\n    browserPath: output.result.browser_path,\n  }\n}\n\nfunction logOutput(output) {\n  for (const key in output.logs) {\n    if (output.logs[key].level === 'WARN') {\n      log_.warning(`${output.logs[key].message}`)","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/SeleniumHQ/selenium/blob/aa36b38e696a0909e973bdf5e2f9031ffe842c4b/javascript/selenium-webdriver/common/seleniumManager.js#L70-L106","documentation":"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).","triggerScenarios":"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.","commonSituations":"Browser updated beyond available drivers; running in headless CI without browser; corporate proxy blocking the driver repository; requesting an obscure or outdated browser version.","solutions":["Read the embedded errorMessage in the thrown Error for the specific cause.","Pin capabilities.setBrowserVersion() to a version with a known driver.","Configure proxy settings via capabilities so Selenium Manager can download.","Manually provide the driver through the browser Service builder.","Install the missing browser binary in the environment."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const { driverPath, browserPath } = binaryPaths(args)\n} catch (e) {\n  console.error('Selenium Manager error:', e.message)\n  // parse the embedded message for actionable detail\n  // fallback: provide driver manually via Service","preventionTips":["Pin capabilities.setBrowserVersion() to versions with known available drivers.","Configure proxy in capabilities so Selenium Manager can reach download servers.","Pre-install the driver and pass it via the browser Service to avoid runtime resolution.","Keep the browser and selenium-webdriver versions reasonably current."],"tags":["selenium-manager","driver-management","network","environment"],"backgroundTag":null,"analyzedSha":"aa36b38e696a0909e973bdf5e2f9031ffe842c4b","analyzedAt":"2026-08-14T02:32:32.244Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}