Repository navigation
test: wait for the WebAuthn PIN warning instead of sampling console messages - #54377
Merged
Merged
Conversation
codebytere
force-pushed
the
test/webauthn-pin-console-race
branch
from
September 25, 2026 14:05
fca8639 to
663876e
Compare
MarshallOfSound
approved these changes
Sep 25, 2026
|
No Release Notes |
Contributor
|
I was unable to backport this PR to "43-x-y" cleanly; |
Contributor
|
I was unable to backport this PR to "44-x-y" cleanly; |
Contributor
|
I have automatically backported this PR to "45-x-y", please check out #54389 |
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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. Theconsole-messageevent 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
emittedUntilbefore issuing the request and await it after checking the rejection, so ordering between the two no longer matters.Checklist
Release Notes
Notes: none