Skip to content

test: wait for the WebAuthn PIN warning instead of sampling console messages - #54377

Merged
MarshallOfSound merged 1 commit into
mainfrom
test/webauthn-pin-console-race
Sep 25, 2026
Merged

MarshallOfSound merged 1 commit into
mainfrom
test/webauthn-pin-console-race

Conversation

@codebytere

Copy link
Copy Markdown
Member

Description of Change

Follow-up to #54355. The two "WebAuthn request that needs a security key PIN" specs asserted that the "does not support WebAuthn PIN entry" console warning had already been collected by the time executeJavaScript() resolved with the rejected promise. The console-message event can arrive after that, so the assertion failed intermittently (seen 3/3 on a macOS arm64 MAS shard while the other shards passed, with the warning logged right after the failure).

The specs now start waiting for that console message with emittedUntil before issuing the request and await it after checking the rejection, so ordering between the two no longer matters.

Checklist

Release Notes

Notes: none

@codebytere codebytere added semver/none target/43-x-y PR should also be added to the "43-x-y" branch. target/44-x-y PR should also be added to the "44-x-y" branch. target/45-x-y PR should also be added to the "45-x-y" branch. labels Sep 25, 2026
@codebytere
codebytere requested review from a team as code owners September 25, 2026 13:15
@codebytere
codebytere force-pushed the test/webauthn-pin-console-race branch from fca8639 to 663876e Compare September 25, 2026 14:05
@codebytere
codebytere removed request for a team September 25, 2026 14:06
@MarshallOfSound
MarshallOfSound merged commit 7489ee0 into main Sep 25, 2026
74 checks passed
@MarshallOfSound
MarshallOfSound deleted the test/webauthn-pin-console-race branch September 25, 2026 16:09
@release-clerk

release-clerk Bot commented Sep 25, 2026

Copy link
Copy Markdown

No Release Notes

@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "43-x-y" cleanly;
you will need to perform this backport manually.

@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "44-x-y" cleanly;
you will need to perform this backport manually.

@trop trop Bot added needs-manual-bp/43-x-y needs-manual-bp/44-x-y and removed target/43-x-y PR should also be added to the "43-x-y" branch. target/44-x-y PR should also be added to the "44-x-y" branch. labels Sep 25, 2026
@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "45-x-y", please check out #54389

@trop trop Bot added merged/45-x-y PR was merged to the "45-x-y" branch. and removed in-flight/45-x-y labels Sep 25, 2026
MarshallOfSound added a commit that referenced this pull request Sep 25, 2026
… crashing (43-x-y) (#54404)

* fix: reject WebAuthn requests that need a security key PIN instead of crashing (#54355)

A CTAP2 security key whose built-in user verification is locked (or gets
blocked mid-request) makes Chromium fall back to collecting the key's PIN
even though the embedder reports SupportsPIN() == false. Electron inherited
content's default CollectPIN(), which is NOTREACHED(), so the browser
process died. Cancel the request instead and log why to the console.

Adds a testing-binding hook that injects a virtual CTAP 2.1 key in that
state (DevTools virtual authenticators cannot have a PIN) and a spec that
covers create() and get().

Fixes #54317

(cherry picked from commit 417f2e4)

* test: wait for the WebAuthn PIN warning instead of sampling console messages (#54377)

(cherry picked from commit 7489ee0)

---------

Co-authored-by: Shelley Vohr <[email protected]>
MarshallOfSound added a commit that referenced this pull request Sep 25, 2026
… crashing (44-x-y) (#54403)

* fix: reject WebAuthn requests that need a security key PIN instead of crashing (#54355)

A CTAP2 security key whose built-in user verification is locked (or gets
blocked mid-request) makes Chromium fall back to collecting the key's PIN
even though the embedder reports SupportsPIN() == false. Electron inherited
content's default CollectPIN(), which is NOTREACHED(), so the browser
process died. Cancel the request instead and log why to the console.

Adds a testing-binding hook that injects a virtual CTAP 2.1 key in that
state (DevTools virtual authenticators cannot have a PIN) and a spec that
covers create() and get().

Fixes #54317

(cherry picked from commit 417f2e4)

* test: wait for the WebAuthn PIN warning instead of sampling console messages (#54377)

(cherry picked from commit 7489ee0)

---------

Co-authored-by: Shelley Vohr <[email protected]>
@MarshallOfSound MarshallOfSound added merged/43-x-y PR was merged to the "43-x-y" branch. merged/44-x-y PR was merged to the "44-x-y" branch. and removed needs-manual-bp/43-x-y needs-manual-bp/44-x-y labels Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

46-x-y merged/43-x-y PR was merged to the "43-x-y" branch. merged/44-x-y PR was merged to the "44-x-y" branch. merged/45-x-y PR was merged to the "45-x-y" branch. semver/none

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants