Skip to content

fix(chromium): report 204 subresource responses as finished - #42834

Merged
Yury Semikhatsky (yury-s) merged 2 commits into
microsoft:mainfrom
yury-s:fix-42786
Sep 21, 2026
Merged

Yury Semikhatsky (yury-s) merged 2 commits into
microsoft:mainfrom
yury-s:fix-42786

Conversation

@yury-s

@yury-s Yury Semikhatsky (yury-s) commented Sep 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Chromium reports a 204 response via Network.loadingFailed with net::ERR_ABORTED; treat it as finished like other browsers do.
  • page.goto to a 204 URL still fails in Chromium: the error comes from the errorText in the Page.navigate command result, not from the network events.

Fixes #42786

Comment on lines +523 to +525
// Chromium aborts 204 subresource responses with net::ERR_ABORTED, while other browsers
// report them as finished. Navigation 204 responses are aborted in all browsers.
if (response?.status() === 204 && !request.request.isNavigationRequest()) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isNavigationRequest is a wrong differentiator here, listener to all network on a context should treat all 204s equally.

@yury-s Yury Semikhatsky (yury-s) Sep 21, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed, it's not necessary, Page.navigate already has the error.

@github-actions

This comment has been minimized.

@yury-s
Yury Semikhatsky (yury-s) merged commit 3988aaf into microsoft:main Sep 21, 2026
42 of 43 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

7 flaky ⚠️ [chromium-library] › library/browsercontext-page-event.spec.ts:173 › should work with Ctrl-clicking `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:762 › screencast › should work with video+trace `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/popup.spec.ts:260 › should not throw when click closes popup `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:521 › screencast › should capture static page in persistent context Radoslav Kirilov (@smoke) `@chromium-ubuntu-22.04-node24`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:257 › third party 'Partitioned;' cookies `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:470 › top level 'Partitioned;' cookie and same origin iframe `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/page-event-request.spec.ts:181 › should return response body when Cross-Origin-Opener-Policy is set `@firefox-ubuntu-22.04-node20`

52038 passed, 1244 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

3 failed
❌ [firefox] › mcp/cli-devtools.spec.ts:140 › request* and response* commands support --filename @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-mouse.spec.ts:38 › mousewheel @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-session.spec.ts:54 › idle timeout shuts the session down @mcp-windows-latest-firefox

8689 passed, 1474 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

🟢 All three failures are known flakes — the PR is clear

Hi, I'm the Playwright bot and I triaged the failing CI run.

The three reds are all [firefox] › mcp/* on mcp-windows-latest-firefox. This PR only changes Chromium's crNetworkManager.ts plus a Chromium-gated assertion in page-event-request.spec.ts, so it can't reach the Firefox MCP CLI path. Each test also flips verdict on unrelated SHAs, including pushes to main.

Details

Pre-existing flake / infra

Scope check

crNetworkManager.ts is Chromium-only — Network.loadingFailed with net::ERR_ABORTED never reaches Firefox, which routes through ffNetworkManager.ts. The test change is in a Chromium-specific expectation. Nothing in the diff is shared with the MCP CLI surface these three tests exercise.

Counts are from the aggregated CI results database (2014 runs), refreshed with the last 3 days before querying.

Triaged by the Playwright bot - agent run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MCP]: browser_click takes ~5 s longer when the click's fetch gets a 204 No Content

2 participants