diff --git a/scripts/lighthouse-budget.mjs b/scripts/lighthouse-budget.mjs index 12ef0832..c190df17 100644 --- a/scripts/lighthouse-budget.mjs +++ b/scripts/lighthouse-budget.mjs @@ -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; diff --git a/scripts/lighthouse-budget.test.mjs b/scripts/lighthouse-budget.test.mjs index 8e12634d..c98950de 100644 --- a/scripts/lighthouse-budget.test.mjs +++ b/scripts/lighthouse-budget.test.mjs @@ -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")), );