Skip to content

fix(har): do not stall context close when saving the har fails - #42242

Merged
Pavel Feldman (pavelfeldman) merged 1 commit into
microsoft:mainfrom
pavelfeldman:fix-42231
Aug 13, 2026
Merged

Pavel Feldman (pavelfeldman) merged 1 commit into
microsoft:mainfrom
pavelfeldman:fix-42231

Conversation

@pavelfeldman

Copy link
Copy Markdown
Member

Summary

  • A HAR save error no longer aborts browserContext.close() midway: the context now always closes, and the error is thrown after the close completes. Previously the context was left in a permanent 'closing' state, stalling teardown.
  • SerializedFS.syncAndGetError() is replaced with sync() that throws the first error once, so callers cannot accidentally drop it and the error does not stick forever.

Fixes #42231

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

8101 passed, 1311 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

1 flaky ⚠️ [chromium-library] › library/video.spec.ts:664 › screencast › should capture full viewport `@chromium-ubuntu-22.04-node22`

51124 passed, 1208 skipped


Merge workflow 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.

[Bug]: [Regression] BrowserContext.close() hangs during teardown with recordHar after upgrading from 1.61.0 to 1.62.1

2 participants