Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

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

Aberta
#10,011 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
65/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
nodejs, playwright, typescript
Domínio
testing

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

@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.

Linguagem predominante
TypeScript
Estrelas
1.8k
Forks
477
Merge médio
2d 25min
PRs com merge (30d)
267

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de clerk/javascript

Todas as issues de clerk/javascript

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.