setupClerkTestingToken repeats invitation acceptance requests when a 303 redirects to HTML
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 40/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- testing-qa, typescript
- Lĩnh vực
- testing
Hướng nghiên cứu
Start with the reproduction repository at the linked commit: run node reproduce.mjs and then node reproduce.mjs --single-use, and note the request logs from both servers. The issue points at the setupClerkTestingToken route handler in the testing package, where route.fetch() follows the 303 and parses the HTML destination as JSON, then falls back to route.continue(). Done means one browser navigation produces one acceptance request, and the sign-up page loads in both fixtures.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Preliminary Checks
- Reviewed Clerk’s Playwright testing documentation.
- Searched existing issues for this redirect and retry behavior.
- I have not already contacted Clerk support by email or Discord about this problem.
- This is a reproducible bug in the Clerk JavaScript testing package.
Reproduction
Publishable key
No Clerk instance or publishable key is used by this reproduction. Both HTTPS origins run on loopback.
Description
One browser navigation to an invitation acceptance URL sends multiple requests when setupClerkTestingToken is enabled. In the single-use fixture, the first request consumes the ticket and the browser ends up displaying the response to the second attempt.
Steps to reproduce
- Follow the reproduction README to install the pinned dependencies and generate the local TLS certificate.
- Run
node reproduce.mjs. The ticket endpoint responds with a 303 to an HTML page on the second origin every time. - Run
node reproduce.mjs --single-use. The endpoint responds with a 303 once, then returns 410. Each command exercises a fresh browser context with and without the helper and logs requests to both servers.
Expected behavior
One navigation makes one acceptance request. The browser follows the 303 and loads the sign-up page.
Actual behavior
| Fixture | Without the helper | With the helper |
|---|---|---|
| Endpoint returns 303 every time | 1 acceptance request. Sign-up page loads. | 5 acceptance requests. Sign-up page eventually loads. |
| Endpoint returns 303 once, then 410 | 1 acceptance request. Sign-up page loads. | 2 acceptance requests. Browser stays at the ticket URL and displays the 410 response. |
The handler follows the 303 inside route.fetch() and tries to parse the destination HTML as JSON. In the repeatable case the parsing error triggers four fetch attempts, followed by a fifth request through route.continue().
I’m happy to submit a fix and a regression test if you’d like the browser to handle these redirects directly.
Environment
System:
OS: macOS 27.2.1
CPU: (18) arm64 Apple M5 Max
Memory: 4.34 GB / 128.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 26.13.1 - /opt/homebrew/bin/node
npm: 11.20.0 - /opt/homebrew/bin/npm
pnpm: 12.5.1 - ~/Library/pnpm/bin/pnpm
Deno: 2.9.8 - /opt/homebrew/bin/deno
Watchman: 2026.11.23.00 - /opt/homebrew/bin/watchman
Browsers:
Chrome: 158.0.8127.37
Safari: 27.2
npmPackages:
@clerk/testing: 2.3.7 => 2.3.7
@playwright/test: 1.65.1 => 1.65.1
- Ngôn ngữ chính
- TypeScript
- Star
- 1.8k
- Fork
- 493
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 359
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của clerk/javascript
-
<SignIn />: the reset password code step renders an empty, focusable back button with no accessible nameCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
clerk/javascript#10708 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Built-in reverification dialog lacks an accessible name (aria-dialog-name)Có thể đã có người làm @ItsShivam05 đã nhận 12 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
clerk/javascript#10548 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
MFA enrollment QR SVG lacks an accessible name (svg-img-alt)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
clerk/javascript#10547 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
<SignIn />: first "Use email" click switches back to phone when `initialValues.phoneNumber` is setCó thể đã có người làm @twicestruck đã nhận 29 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
clerk/javascript#10487 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
useLoadedIsomorphicClerk misses "ready" when a ClerkProvider remounts after clerk-js has loaded — <ClerkLoading> never resolvesCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
clerk/javascript#10462 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của clerk/javascript
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
superlinked/sie#1033 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
remix-run/react-router#15838 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/ci bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
melgarafael/DeskcommCRM#5290 ·
Maintainer thường phản hồi trong vòng 1 ngày