{"record":{"id":"fe8d15d1f30da57f","repo":"cypress-io/cypress","slug":"no-browsers-found-in-machinebrowsers","errorCode":null,"errorMessage":"no browsers found in machineBrowsers","messagePattern":"no browsers found in machineBrowsers","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"packages/data-context/src/sources/BrowserDataSource.ts","lineNumber":89,"sourceCode":"\n    this.ctx.coreData.allBrowsers = Promise.resolve(_.concat(machineBrowsers, userBrowsers))\n\n    return this.ctx.coreData.allBrowsers\n  }\n\n  /**\n   * Gets the browsers from the machine, caching the Promise on the coreData\n   * so we only look them up once\n   */\n  machineBrowsers () {\n    if (this.ctx.coreData.machineBrowsers) {\n      return this.ctx.coreData.machineBrowsers\n    }\n\n    const p = this.ctx._apis.browserApi.getBrowsers()\n\n    return this.ctx.coreData.machineBrowsers = p.then(async (browsers) => {\n      if (!browsers[0]) throw new Error('no browsers found in machineBrowsers')\n\n      return browsers\n    }).catch((e) => {\n      this.ctx.update((coreData) => {\n        coreData.machineBrowsers = null\n        coreData.diagnostics.error = e\n      })\n\n      throw e\n    })\n  }\n\n  idForBrowser (obj: FoundBrowser) {\n    return `${obj.name}-${obj.family}-${obj.channel}`\n  }\n\n  isSelected (obj: FoundBrowser) {\n    if (!this.ctx.coreData.activeBrowser) {","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/cypress-io/cypress/blob/0d85fdc91230885bca0a91df278312800a48b727/packages/data-context/src/sources/BrowserDataSource.ts#L71-L107","documentation":"Thrown by BrowserDataSource.machineBrowsers() when the launcher returns an empty browser array (browsers[0] is falsy at BrowserDataSource.ts:89). The result promise is cached on coreData.machineBrowsers and, on rejection, the catch handler clears the cache (sets it to null) and writes the error into coreData.diagnostics.error so the launchpad can surface it. The underlying list comes from ctx._apis.browserApi.getBrowsers() (the @packages/launcher scan). It means Cypress cannot find any browser it can drive on this machine.","triggerScenarios":"First call to machineBrowsers() (or any call after a prior failure cleared the cache) when browserApi.getBrowsers() resolves to an empty array. Typically triggered during launchpad startup / browser selection, or when launching a spec.","commonSituations":"Fresh CI runner or Docker container with no Chrome/Edge/Firefox/WebKit installed; headless server where browsers live outside the scanned paths; Linux missing shared libraries so the launcher detects then skips them; system where only the Cypress-bundled Electron is present but it was filtered out; browser installed under a non-standard channel/PATH.","solutions":["Install a supported browser on the machine (Chrome stable is the most reliable), then restart Cypress so the cache is rebuilt.","On CI/Docker, install Chrome (e.g. apt-get install google-chrome-stable) or use the playwright-webkit / browsers channels Cypress scans, and ensure shared libs are present.","If a browser is installed but not found, set the relevant channel path / ensure it is on PATH, or configure browsers in cypress.config via the bundled-electron fallback.","Inspect coreData.diagnostics.error (shown in the launchpad) for the underlying launcher error — it often names the missing library or permission problem."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-flight: probe for at least one installed browser before relying on machineBrowsers()\nimport { detectBrowser } from '@packages/launcher' // or your equivalent\n\nasync function hasAnyBrowser(): Promise<boolean> {\n  try {\n    const list = await browserApi.getBrowsers()\n    return list.length > 0\n  } catch {\n    return false\n  }\n}\n\nif (!(await hasAnyBrowser())) {\n  // surface 'install a browser' guidance to the user; do not proceed\n}","typeGuard":null,"tryCatchPattern":"try {\n  const browsers = await ctx.browser.machineBrowsers()\n  // proceed\n} catch (e) {\n  // coreData.diagnostics.error is already populated by the source's own catch;\n  // read it to render the underlying launcher cause in the UI.\n  const cause = ctx.coreData.diagnostics.error\n  showError('No browser detected', cause?.message ?? e.message)\n}","preventionTips":["Install a supported browser (Chrome stable recommended) on every machine/CI image that runs Cypress.","In Docker/CI images, install browsers and their shared-library dependencies so the launcher does not skip them.","Do not call machineBrowsers() repeatedly expecting fresh results — it caches on coreData; clear the cache explicitly after installing a browser if you need a re-scan.","Always surface coreData.diagnostics.error to the user; it carries the real reason the launcher returned an empty list."],"tags":["browser","launcher","environment","diagnostics","launchpad"],"backgroundTag":null,"analyzedSha":"0d85fdc91230885bca0a91df278312800a48b727","analyzedAt":"2026-08-12T16:24:28.056Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}