pbakaus/impeccable · error
Error: {}
Error message
Error: {}
What it means
When shared browser-based scanning is requested, the CLI launches a shared browser once up front (`ensure_launched()`); if that fails it marks an operational failure, prints `Error: <message>` to stderr, closes the shared browser, and (per the accompanying comment) every URL target in the run is skipped so the failure is reported exactly once. This covers browser install/launch problems rather than per-URL fetch errors.
Source
Thrown at crates/detect/src/cli.rs:569
let paths: Vec<String> = if targets.is_empty() {
vec![cwd.clone()]
} else {
targets.clone()
};
let url_count = paths.iter().filter(|p| URL_RE.is_match(p)).count();
let mut shared = if url_count > 1 {
engines.url.and_then(|u| u.open_shared())
} else {
None
};
// JS: `await createBrowserDetector()` throws before the loop; the
// failure is reported once and every URL target is skipped (#711).
let mut browser_setup_failed = false;
if let Some(s) = shared.as_deref() {
if let Err(e) = s.ensure_launched() {
browser_setup_failed = true;
ctx.had_operational_failure = true;
ctx.io.err(&format!("Error: {}\n", e.message));
}
}
if browser_setup_failed {
if let Some(s) = shared.take() {
s.close();
}
}
let result = scan_targets(
&mut ctx,
&paths,
shared.as_deref(),
browser_setup_failed,
&mut all,
);
if let Some(s) = shared {
s.close();
}
result?;View on GitHub (pinned to 2bc2879276)
Solutions
- Install/repair the browser the engine uses (reinstall the CLI or run its setup/download step) and retry the URL scan.
- Check the printed message for the underlying cause (missing binary vs. launch failure) and install missing OS dependencies (`apt-get install` the needed libs on CI Linux images).
- Scan local paths with `impeccable detect <path>` instead — the local path doesn't require the shared browser.
- Ensure the CI job has permission to spawn processes (not a restricted sandbox).
Example fix
// before impeccable detect https://example.com # browser binary missing // after # install engine/browser assets first, then impeccable detect https://example.com
Defensive patterns
Strategy: fallback
Validate before calling
import { execFileSync } from "node:child_process";
// verify browser availability before scanning URLs
execFileSync("impeccable", ["detect", "--help"], { stdio: "ignore" });
// ensure any setup/download step has run in this environment Try / catch
try {
execFileSync("impeccable", ["detect", url], { stdio: "pipe" });
} catch (e) {
if (/Error: /.test(e.stderr?.toString() ?? "") && isUrlTarget(url)) {
console.error(`Browser unavailable; falling back to local scan or skipping ${url}`);
}
} Prevention
- Run the engine's browser setup/download step in CI before URL scans
- Install headless browser OS dependencies in container images
- Prefer local-path scans in environments where process spawning is restricted
- Fail fast with a preflight browser launch check
When it happens
Trigger: Running `impeccable detect <url> ...` where the shared browser cannot start: the browser binary is missing or not downloaded, launch times out, the platform lacks deps, or the environment forbids spawning the process (sandboxed CI).
Common situations: Fresh CI containers without the bundled browser installed; headless Linux boxes missing shared libraries; sandboxed environments blocking process launch; version mismatch after an engine upgrade changed the pinned browser.
Understand the failure class
Background: ECONNREFUSED and "connection refused" / "could not connect to server" errors: what they mean and how to fix them — this error's family across 44 libraries.
Related errors
- concept-seed: --candidate-count must be an integer from 5 to
- Unknown ignore-rule flag: ${arg}
- Pass a rule id, e.g. ${IMPECCABLE_COMMAND} hooks ignore-rule
- overused-font is value-specific by default. Use ${IMPECCABLE
- --reason is not supported for ignore-file because detector.i
AI-assisted analysis of pbakaus/impeccable@2bc2879276 (2026-09-08).
Data as JSON: /api/errors/2772ec2b466f1786.
Report an issue: GitHub.