Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

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

未關閉
#10,011 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@umeraamir69 已經在處理了。

開始於 2026年10月22日。

  • #10359 來自 @umeraamir69 —— 未關閉

評估

難度
3/5
預估耗時
1-2 天
新手友好度
65/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
nodejs, playwright, typescript
領域
testing

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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

主要語言
TypeScript
星號
1.8k
分支
483
平均合併
1 天 23 小時
30 天內合併 PR
325

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

clerk/javascript 的其他 Issue

查看 clerk/javascript 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。