Skip to content

fix(dialog): handle auto-dismiss races - #42828

Merged
Yury Semikhatsky (yury-s) merged 1 commit into
microsoft:mainfrom
Tib-Gridello:fix-42827
Sep 22, 2026
Merged

Yury Semikhatsky (yury-s) merged 1 commit into
microsoft:mainfrom
Tib-Gridello:fix-42827

Conversation

@Tib-Gridello

Copy link
Copy Markdown
Contributor

Summary

  • ignore failed best-effort dialog auto-dismissals when another CDP client handles the dialog first
  • cover the race in the existing two-client CDP test

Fixes #42827

@Tib-Gridello

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

5 flaky ⚠️ [chromium-library] › library/video.spec.ts:762 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node22`
⚠️ [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-goto.spec.ts:90 › should work with Cross-Origin-Opener-Policy `@firefox-ubuntu-22.04-node20`
⚠️ [webkit-page] › page/frame-goto.spec.ts:31 › should reject when frame detaches `@webkit-ubuntu-22.04-node20`

52020 passed, 1250 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

8692 passed, 1474 skipped


Merge workflow run.

@yury-s
Yury Semikhatsky (yury-s) merged commit 02ffa62 into microsoft:main Sep 22, 2026
45 checks passed
@MSH4R1F

Copy link
Copy Markdown

Thanks for this fix. We hit the same race in production: a page dialog opened while two CDP clients were connected, the auto-dismiss rejected, and the unhandled rejection crashed the Node process.

We work around it by answering dialogs ourselves on every client we connect. That still leaves a short window between a client connecting and its listener being in place.

Could this go into a 1.63.x patch release? If not, we will wait for 1.64.0.

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]: Auto-dismissed dialog race terminates one of two CDP clients

3 participants