[Bug]: WebKit's injected PublicKeyCredential is a plain object, so WebAuthn libraries report no support
I maintainer di solito rispondono entro 1 giorno
@microsoft-playwright-automation ci sta già lavorando.
Dal 29/10/2026.
- #43775 di @microsoft-playwright-automation — aperta
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, playwright, typescript
- Ambito
- testing
Direzione di ricerca
Start with wkPage.ts and _publicKeyCredentialScript, identified in the issue, then check the WebKit tests for the injected PublicKeyCredential and compare its shape with Chromium's. Reproduce with the supplied typeof window.PublicKeyCredential test under the WebKit project. Done when it reports "function" and WebAuthn library feature checks recognize support.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Version
1.64.1
Steps to reproduce
import { test, expect } from "@playwright/test";
test("PublicKeyCredential is a constructor", async ({ page }) => {
await page.goto("https://example.com");
const kind = await page.evaluate(() => typeof window.PublicKeyCredential);
expect(kind).toBe("function");
});
Run it with --project webkit (WebKit 27.2 on Windows; devices["iPhone 17"] gives the same), both with and without context.credentials.install() first.
Expected behavior
typeof PublicKeyCredential is "function", as in Chromium (where the same test passes) and in Safari. PublicKeyCredential is an interface object, and feature checks across the WebAuthn ecosystem test for a function. @simplewebauthn/browser 13.3.0's browserSupportsWebAuthn() reads:
return globalThis?.PublicKeyCredential !== undefined && typeof globalThis.PublicKeyCredential === 'function';
Actual behavior
typeof PublicKeyCredential is "object", and String(PublicKeyCredential) is "[object Object]". The WebKit page bootstrap (wkPage.ts :: _publicKeyCredentialScript) runs window.PublicKeyCredential ??= { getClientCapabilities, isConditionalMediationAvailable, isUserVerifyingPlatformAuthenticatorAvailable }, so a plain object fills the global.
Because of that, any app whose passkey ceremony goes through @simplewebauthn/browser (directly, or through an auth library's passkey client) throws "WebAuthn is not supported in this browser" under Playwright's WebKit before navigator.credentials.create is ever called. Calling navigator.credentials.create directly works, so the credentials API is fine. Only the shape of the stand-in global trips library feature checks.
Additional context
A function stand-in would keep the static methods and satisfy the check, for example window.PublicKeyCredential ??= Object.assign(function PublicKeyCredential() { throw new TypeError("Illegal constructor"); }, { getClientCapabilities, isConditionalMediationAvailable, isUserVerifyingPlatformAuthenticatorAvailable }).
Environment
- Operating System: Windows 11
- Browser: WebKit 27.2 (Playwright 1.64.1)
- Library: @simplewebauthn/browser 13.3.0
- Lingua principale
- TypeScript
- Stelle
- 98.5k
- Fork
- 6.7k
- Merge medio
- 15h 42m
- PR unite (30g)
- 313
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/playwright
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
microsoft/playwright#43762 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
microsoft/playwright#43759 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
microsoft/playwright#43741 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Uncaught TypeError in captureSecurityDetails when APIRequestContext reuses a destroyed keep-alive socketForse già presa @microsoft-playwright-automation l’ha presa 1 giorno fa. Apertaneeds-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
microsoft/playwright#43728 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature]: Set `this.name` in `TargetClosedError` constructorForse di nuovo libera @LeonxLJX l’ha presa 55 giorni fa e non c’è nessuna pull request aperta. ApertaP3-collecting-feedback
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
microsoft/playwright#42522 · 7 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/playwright
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
area:web p3
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Lets-Parley/Parley#912 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
wealthfolio/wealthfolio#2376 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
be-BOP-io-SA/be-BOP#2817 ·
I maintainer di solito rispondono entro 5 giorni
-
documentation good first issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
sno-ai/sno-station#149 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno