Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/lighthouse-budget.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ export function isChromeConnectionError(error) {
/unable to connect to chrome/i.test(message) ||
/failed to fetch browser websocket url/i.test(message) ||
/chrome (has crashed|failed to launch|connection)/i.test(message) ||
// chrome-launcher's launch timeout: Chrome started and never wrote its
// DevTools port to chrome-err.log.
/waiting for dynamic debugging port/i.test(message) ||
/(target|session) closed/i.test(message)
) {
return true;
Expand Down
3 changes: 3 additions & 0 deletions scripts/lighthouse-budget.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ test("isChromeConnectionError matches Chrome/connection failures and not budget
);
assert.ok(isChromeConnectionError(new Error("read ECONNRESET")));
assert.ok(isChromeConnectionError(new Error("socket hang up")));
assert.ok(
isChromeConnectionError(new Error("waiting for dynamic debugging port in chrome-err.log")),
);
assert.ok(
!isChromeConnectionError(new Error("marketing performance budget exceeded: 0.5 < 0.66")),
);
Expand Down
Loading