santifer/career-ops · error · Error
--verify could not launch Chromium (run "npx playwright inst
Error message
--verify could not launch Chromium (run "npx playwright install chromium" or re-run without --verify): ${err.message} What it means
After the playwright module imports successfully, scan.mjs calls chromium.launch({ headless: true }). If launching the browser process fails (no Chromium binary on disk, sandbox/permission error, missing system libraries), it throws an Error with a cause. This is distinct from error 348: the npm package is present, but the browser executable is not.
Source
Thrown at scan.mjs:2035
let createHeadedPageProvider;
let newLivenessPage;
let jitteredDelayMs;
let sleep;
try {
({ chromium } = await import('playwright'));
({ checkUrlLiveness, checkUrlLivenessWithFallback, createHeadedPageProvider, newLivenessPage, jitteredDelayMs, sleep } = await import('./liveness-browser.mjs'));
} catch (err) {
throw new Error(
`--verify requires Playwright with Chromium (run "npx playwright install chromium"): ${err.message}`,
{ cause: err },
);
}
let browser;
try {
browser = await chromium.launch({ headless: true });
} catch (err) {
throw new Error(
`--verify could not launch Chromium (run "npx playwright install chromium" or re-run without --verify): ${err.message}`,
{ cause: err },
);
}
// Three permanent buckets + one transient passthrough:
// verified → active pages and transient nav errors (retry next scan)
// expired → classifier-confirmed dead postings (HTTP 4xx, redirect markers,
// body patterns, listing pages, insufficient content)
// dropped → page loaded but classifier saw no Apply control. --verify is an
// opt-in stricter filter; keeping these defeats the purpose.
// invalid → up-front URL guard rejections (malformed / non-http / private)
const verified = [];
const expired = [];
const dropped = [];
const invalid = [];
const migrated = [];
View on GitHub (pinned to 9b17a8ac97)
Solutions
- Download the Chromium binary: npx playwright install chromium.
- Install OS dependencies: npx playwright install-deps chromium (Debian/Ubuntu) or install libnss3, libatk1.0, libatk-bridge2.0, libcups2, libxkbcommon0 manually.
- If running as root in a container, configure launch args: chromium.launch({ headless: true, args: ['--no-sandbox'] }) — or set PLAYWRIGHT_CHROMIUM_ARGS.
- Re-run without --verify to bypass the browser path.
Example fix
# before: package installed but no browser binary node scan.mjs --verify # -> could not launch Chromium # after npx playwright install chromium node scan.mjs --verify
Defensive patterns
Strategy: try-catch
Validate before calling
async function chromiumIsLaunchable() {
try {
const { chromium } = await import('playwright');
const b = await chromium.launch({ headless: true });
await b.close();
return true;
} catch { return false; }
}
if (opts.verify && !(await chromiumIsLaunchable())) {
throw new Error('Chromium not launchable. Run: npx playwright install chromium');
} Try / catch
try {
browser = await chromium.launch({ headless: true });
} catch (err) {
if (err.message.includes('could not launch Chromium')) {
console.error(err.message);
process.exitCode = 3;
return;
}
throw err;
} Prevention
- Add `npx playwright install chromium` to your CI setup and Dockerfile.
- Install OS deps: npx playwright install-deps chromium on Debian/Ubuntu.
- In root containers, pass { args: ['--no-sandbox'] } to chromium.launch.
When it happens
Trigger: playwright npm package is installed but the Chromium browser binary has not been downloaded via `npx playwright install chromium`; system shared libraries missing (libnss3, libatk, etc.); a sandbox/permissions error in CI containers running as root without --no-sandbox.
Common situations: CI/CD pipeline that runs npm install but skips playwright install; a Docker image missing OS deps; headless Linux server without libnss3; running as root in a container where Chromium refuses to launch without flags.
Related errors
- --liveness requires Playwright with Chromium (run "npx playw
- --verify requires Playwright with Chromium (run "npx playwri
- Could not determine the rendered PDF page count (received ${
- Could not determine the rendered PDF page count from its pag
- The apply feature needs Google Chrome. Install Chrome (or ru
AI-assisted analysis of santifer/career-ops@9b17a8ac97 (2026-08-13).
Data as JSON: /api/errors/9ceb89b61cbe7a54.
Report an issue: GitHub.