Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

@clerk/testing retries FAPI token refresh after Playwright page/context closure

Aperta
#10,011 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
nodejs, playwright, typescript
Ambito
testing

Direzione di ricerca

Start by locating the @clerk/testing FAPI retry and route-handler implementation, then reproduce the case with a Playwright page or context closing during a background token refresh. Done means page/context-closure errors are not retried or warned, while genuine FAPI and network failures remain visible.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

@clerk/testing retries a Convex-template token refresh after its Playwright page/context has closed, then logs a FAPI failure between passing tests.

Observed with @clerk/testing 2.2.36, Playwright 1.63.0, Node 24.19.0, macOS arm64. A signed-in test opens a second page with browser.newPage(), signs in using clerk.signIn({ page, signInParams: { strategy: "email_code", identifier } }), performs its authenticated interaction successfully, and closes that page in finally. If a Clerk background token refresh is still routed at that point, the handler retries four times and prints:

[Clerk Testing] FAPI request failed after 4 attempts: <redacted FAPI Convex-token URL> (Error: route.fetch: Target page, context or browser has been closed)

This occurred after two passing cases in one eight-case run; the run exited 0 with all eight cases passing. It is not an observed authentication failure or a 429. The endpoint/query are redacted because they include session/token values.

Our project already has a local patch that returns early when String(error).includes("Test ended"); it does not cover this different Playwright closure error. No other route-handler changes are applied. We have not retested a newer Clerk Testing release.

Expected: do not retry or warn for a request aborted solely because its owning page/context has closed. Keep genuine FAPI/network failures visible. Current workaround: distinguish these post-close diagnostics from the test result; no assertion or authentication bypass was added.

Lingua principale
TypeScript
Stelle
1.8k
Fork
477
Merge medio
2g 3h
PR unite (30g)
269

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di clerk/javascript

Tutte le issue di clerk/javascript

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.