diff --git a/src/detectors/signals.ts b/src/detectors/signals.ts index 11ebffd..c8a4e43 100644 --- a/src/detectors/signals.ts +++ b/src/detectors/signals.ts @@ -121,9 +121,10 @@ export function attachSignalListeners(deps: SignalDeps): void { if (fenced.has(req.url())) return; // A request cancelled before it finished (a restarted navigation, an // aborted fetch) did not fail: Chromium net::ERR_ABORTED, Firefox - // NS_BINDING_ABORTED, WebKit "cancelled". + // NS_BINDING_ABORTED, WebKit "cancelled" on macOS and "Load request + // cancelled" on Linux. if ( - /ERR_ABORTED|NS_BINDING_ABORTED|^cancelled$|BLOCKED_BY_CLIENT|blockedbyclient/i.test( + /ERR_ABORTED|NS_BINDING_ABORTED|^(?:Load request )?cancelled$|BLOCKED_BY_CLIENT|blockedbyclient/i.test( errorText, ) ) { diff --git a/test/fence-noise.test.ts b/test/fence-noise.test.ts index c597600..0bc9fbb 100644 --- a/test/fence-noise.test.ts +++ b/test/fence-noise.test.ts @@ -78,7 +78,8 @@ describe(`requests the fence aborts (${browser})`, () => { describe(`requests cancelled before they finish (${browser})`, () => { // A double-clicked link restarts its navigation and a page can abort its own // fetch. Chromium calls that net::ERR_ABORTED, Firefox NS_BINDING_ABORTED, - // WebKit "cancelled"; none of them is a failed request. + // WebKit "cancelled" (macOS) or "Load request cancelled" (Linux); none of + // them is a failed request. it('are not reported as failed network requests', async () => { const cfg = await loadConfig({ ignoreConfigFile: true,