garrytan/gstack · error · Error
No Chromium browsers found. Supported: ${listSupportedBrowse
Error message
No Chromium browsers found. Supported: ${listSupportedBrowserNames().join(', ')} What it means
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.
Source
Thrown at browse/src/write-commands.ts:748
}
const result = await importCookies(browser, allDomainNames, profile);
if (result.cookies.length > 0) {
await page.context().addCookies(result.cookies);
bm.trackCookieImportDomains(allDomainNames);
}
const msg = [`Imported ${result.count} cookies across ${Object.keys(result.domainCounts).length} domains from ${browser}`];
msg.push('(used --all: all browser cookies imported, consider --domain for tighter scoping)');
if (result.failed > 0) msg.push(`(${result.failed} failed to decrypt)`);
return msg.join(' ');
}
// Picker UI mode — open in user's browser for interactive domain selection
const port = bm.serverPort;
if (!port) throw new Error('Server port not available');
const browsers = findInstalledBrowsers();
if (browsers.length === 0) {
throw new Error(`No Chromium browsers found. Supported: ${listSupportedBrowserNames().join(', ')}`);
}
const code = generatePickerCode();
const pickerUrl = `http://127.0.0.1:${port}/cookie-picker?code=${code}`;
try {
Bun.spawn(['open', pickerUrl], { stdout: 'ignore', stderr: 'ignore' });
} catch (err: any) {
// open may fail on non-macOS or if 'open' binary is missing — URL is in the message below
if (err?.code !== 'ENOENT' && !err?.message?.includes('spawn')) throw err;
}
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.`;
}
case 'style': {
// style --undo [N] → revert modification
if (args[0] === '--undo') {
const idx = args[1] ? parseInt(args[1], 10) : undefined;View on GitHub (pinned to 94993f7401)
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).
Example fix
// before (headless container, no browser) await runBrowseCommand(['cookie-import-browser']); // after (run on the user's real workstation, or import from a JSON file instead) await runBrowseCommand(['cookie-import', '/tmp/errlookup-0o5UJv/cookies.json']);
Defensive patterns
Strategy: validation
Validate before calling
import { findInstalledBrowsers } from './cookie-import-browser';
function ensureBrowserInstalled(): void {
const browsers = findInstalledBrowsers();
if (browsers.length === 0) {
throw new Error('No supported Chromium browser installation detected');
}
} Type guard
function hasInstalledBrowser(): boolean {
return findInstalledBrowsers().length > 0;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- --domain "${domain}" does not match current page domain "${p
- Server port not available
- Usage: browse cookie-import <json-file>
- File not found: ${filePath}
- Invalid JSON in ${filePath}: ${err?.message || err}
AI-assisted analysis of garrytan/gstack@94993f7401 (2026-08-12).
Data as JSON: /api/errors/4a815755d12f2c98.
Report an issue: GitHub.