{"record":{"id":"4a815755d12f2c98","repo":"garrytan/gstack","slug":"no-chromium-browsers-found-supported-listsuppo","errorCode":null,"errorMessage":"No Chromium browsers found. Supported: ${listSupportedBrowserNames().join(', ')}","messagePattern":"No Chromium browsers found\\. Supported: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"browse/src/write-commands.ts","lineNumber":748,"sourceCode":"        }\n        const result = await importCookies(browser, allDomainNames, profile);\n        if (result.cookies.length > 0) {\n          await page.context().addCookies(result.cookies);\n          bm.trackCookieImportDomains(allDomainNames);\n        }\n        const msg = [`Imported ${result.count} cookies across ${Object.keys(result.domainCounts).length} domains from ${browser}`];\n        msg.push('(used --all: all browser cookies imported, consider --domain for tighter scoping)');\n        if (result.failed > 0) msg.push(`(${result.failed} failed to decrypt)`);\n        return msg.join(' ');\n      }\n\n      // Picker UI mode — open in user's browser for interactive domain selection\n      const port = bm.serverPort;\n      if (!port) throw new Error('Server port not available');\n\n      const browsers = findInstalledBrowsers();\n      if (browsers.length === 0) {\n        throw new Error(`No Chromium browsers found. Supported: ${listSupportedBrowserNames().join(', ')}`);\n      }\n\n      const code = generatePickerCode();\n      const pickerUrl = `http://127.0.0.1:${port}/cookie-picker?code=${code}`;\n      try {\n        Bun.spawn(['open', pickerUrl], { stdout: 'ignore', stderr: 'ignore' });\n      } catch (err: any) {\n        // open may fail on non-macOS or if 'open' binary is missing — URL is in the message below\n        if (err?.code !== 'ENOENT' && !err?.message?.includes('spawn')) throw err;\n      }\n\n      return `Cookie picker opened at http://127.0.0.1:${port}/cookie-picker\\nDetected browsers: ${browsers.map(b => b.name).join(', ')}\\nSelect domains to import, then close the picker when done.\\n\\nTip: For scripted imports, use --domain <domain> to scope cookies to a single domain.`;\n    }\n\n    case 'style': {\n      // style --undo [N] → revert modification\n      if (args[0] === '--undo') {\n        const idx = args[1] ? parseInt(args[1], 10) : undefined;","sourceCodeStart":730,"sourceCodeEnd":766,"githubUrl":"https://github.com/garrytan/gstack/blob/94993f74012782fd94416dd44b8314f6363a13a4/browse/src/write-commands.ts#L730-L766","documentation":"Thrown by `browse cookie-import-browser` picker mode when `findInstalledBrowsers()` returns an empty array — i.e. no Chromium-based browser installation was detected in the standard OS-specific locations. The command needs a real Chromium user-data-dir to read cookies from, so without one it cannot proceed. The message lists the supported browser names so the user knows what to install.","triggerScenarios":"Running on a headless CI container with no Chrome/Edge/Brave installed; running on Linux with browsers installed to non-standard paths not scanned by `findInstalledBrowsers`; a server/WSL environment where the browsers live on the Windows host, not inside the Linux guest.","commonSituations":"CI runner has only a Playwright-bundled Chromium (not in the scanned user-install paths) but no system Chrome; Docker container without a browser; macOS with browsers under a non-default Applications path; the user's only browser is Firefox or Safari, which are not supported for cookie extraction.","solutions":["Install a supported Chromium-based browser (Chrome, Edge, Brave, etc.) to the standard location for your OS.","If on CI/headless, prefer `--domain` direct mode which still needs a browser DB but at least surfaces the underlying extraction error; or run cookie operations on a machine that has the user's real browser profile.","Run the browse server on the same machine/profile where the user is logged into the target site in a Chromium browser.","If browsers are installed but not detected, verify they live under the paths `findInstalledBrowsers` scans (standard `~/Library/Application Support`, `%LOCALAPPDATA%`, or `~/.config` dirs)."],"exampleFix":"// before (headless container, no browser)\nawait runBrowseCommand(['cookie-import-browser']);\n\n// after (run on the user's real workstation, or import from a JSON file instead)\nawait runBrowseCommand(['cookie-import', '/tmp/errlookup-0o5UJv/cookies.json']);","handlingStrategy":"validation","validationCode":"import { findInstalledBrowsers } from './cookie-import-browser';\nfunction ensureBrowserInstalled(): void {\n  const browsers = findInstalledBrowsers();\n  if (browsers.length === 0) {\n    throw new Error('No supported Chromium browser installation detected');\n  }\n}","typeGuard":"function hasInstalledBrowser(): boolean {\n  return findInstalledBrowsers().length > 0;\n}","tryCatchPattern":null,"preventionTips":["Run the browse server on a machine with a real Chromium browser profile.","Prefer JSON cookie-import on headless/CI environments without a user browser.","Verify browsers are installed in standard OS scan paths."],"tags":["environment","cookies","import","browser-detection","browser-import","browse-command"],"backgroundTag":null,"analyzedSha":"94993f74012782fd94416dd44b8314f6363a13a4","analyzedAt":"2026-08-12T04:06:23.140Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}