{"record":{"id":"8fe62429719fc806","repo":"puppeteer/puppeteer","slug":"tried-to-find-the-browser-at-the-configured-path","errorCode":null,"errorMessage":"Tried to find the browser at the configured path (${executablePath}), but no executable was found.","messagePattern":"Tried to find the browser at the configured path \\((.+?)\\), but no executable was found\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/puppeteer-core/src/node/BrowserLauncher.ts","lineNumber":566,"sourceCode":"    const config = await this.puppeteer.configuration();\n    return join(\n      config.temporaryDirectory ?? tmpdir(),\n      `puppeteer_dev_${this.browser}_profile-`,\n    );\n  }\n\n  /**\n   * @internal\n   */\n  async resolveExecutablePath(\n    headless?: boolean | 'shell',\n    validatePath = true,\n  ): Promise<string> {\n    const config = await this.puppeteer.configuration();\n    let executablePath = config.executablePath;\n    if (executablePath) {\n      if (validatePath && !existsSync(executablePath)) {\n        throw new Error(\n          `Tried to find the browser at the configured path (${executablePath}), but no executable was found.`,\n        );\n      }\n      return executablePath;\n    }\n\n    function puppeteerBrowserToInstalledBrowser(\n      browser?: SupportedBrowser,\n      headless?: boolean | 'shell',\n    ) {\n      switch (browser) {\n        case 'chrome':\n          if (headless === 'shell') {\n            return InstalledBrowser.CHROMEHEADLESSSHELL;\n          }\n          return InstalledBrowser.CHROME;\n        case 'firefox':\n          return InstalledBrowser.FIREFOX;","sourceCodeStart":548,"sourceCodeEnd":584,"githubUrl":"https://github.com/puppeteer/puppeteer/blob/d484e21c17f6023826fefdcdeeb553e04a7aaed8/packages/puppeteer-core/src/node/BrowserLauncher.ts#L548-L584","documentation":"resolveExecutablePath first honors a user-configured executablePath. If validatePath is true and that configured path does not exist on disk, it throws immediately — before falling back to a cached browser. This protects against silently using a wrong binary when the user explicitly set one.","triggerScenarios":"Setting executablePath in puppeteer.config / configuration() (or via the PUPPETEER_EXECUTABLE_PATH env-derived config) to a path that doesn't exist; calling resolveExecutablePath after the binary was moved/deleted.","commonSituations":"Config file committed with a developer's local path; container path differs from the dev machine; browser uninstalled/upgraded and the old path is stale; typo in the config path.","solutions":["Correct or remove the executablePath entry in your Puppeteer config / env so Puppeteer can resolve the cached browser.","Re-install the browser to the configured location.","Pass validatePath=false only if you intentionally resolve without checking (advanced).","Verify the path with fs.existsSync before relying on it in scripts/CI."],"exampleFix":"// before (puppeteer.config.cjs)\nmodule.exports = { executablePath: '/old/path/chrome' };\n\n// after\nmodule.exports = {}; // let Puppeteer resolve the cached Chrome\n// or point to a verified path\nmodule.exports = { executablePath: '/usr/bin/google-chrome' };","handlingStrategy":"validation","validationCode":"import fs from 'node:fs';\nfunction resolveConfiguredExe(path?: string, validate = true) {\n  if (path && validate && !fs.existsSync(path)) {\n    throw new Error(`Configured executablePath does not exist: ${path}`);\n  }\n  return path;\n}","typeGuard":"const executableExists = (p?: string): boolean =>\n  !p || (fs.existsSync(p));","tryCatchPattern":"try {\n  await puppeteer.launch(); // uses configured executablePath\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('Tried to find the browser at the configured path')) {\n    // remove the stale executablePath from config and let it resolve from cache\n  } else throw e;\n}","preventionTips":["Keep executablePath out of shared/version-controlled config unless it's a stable path.","Verify the path with fs.existsSync in startup checks.","Re-run the browser install if the binary was moved."],"tags":["browser","executable-path","config","filesystem"],"backgroundTag":null,"analyzedSha":"d484e21c17f6023826fefdcdeeb553e04a7aaed8","analyzedAt":"2026-08-12T06:33:19.665Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}