No `AbortSignal` support in many functions - causing hanging requests on client and server
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue nà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
- 55/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ệ
- javascript, node.js, typescript
- Lĩnh vực
- authentication, backend
Hướng nghiên cứu
Start by locating the implementations of clerk.session.getToken() and clerk.authenticateRequest, then trace their internal fetch and handshake calls. Check how those entry points handle timeouts and retries; done means callers can pass an external abort signal that controls the request. The issue names no files or tests, so first identify the relevant packages and existing coverage.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Preliminary Checks
-
I have reviewed the documentation: https://clerk.com/docs
-
I have searched for existing issues: https://github.com/clerk/javascript/issues
-
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
-
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction
n/a
Publishable key
n/a
Description
Steps to reproduce:
- Use an API like
clerk.session.getToken()(e.g. on the client) orclerk.authenticateRequest(on the server) - Hit a bad spot with the Clerk servers (they tend to come in waves), to catch an overloaded server.
- Have a request hanging and never end
Expected behavior:
Have a way to pass in an external abort signal, so the timeout and retry behavior can be controlled from the outside.
Actual behavior:
We've had this happen on both, our servers - where we ran into execution timeout limits as the request never resolved even after a minute -, as well as the client (where we ultimately never sent of a crucial API request, because the Clerk SDK was still waiting on the Clerk server, but that request was never finished).
Here's a graph showing the maximum time of all clerk.authenticateRequest calls (from around 1,083,609 calls in total) - on an AWS server talking to Clerk:
As a 'quick fix', we had to wrap a custom timeout around the call, but the internal fetch() just keeps being open, and only gets freed when our server gets rotated (which may take 1-2 hours).
On a related note; According to the documentation, the clerk.authenticateRequest call does "no network requests" when you provide a JWT public key up-front, but that's not true - it still does an internal handshake call to the Clerk API, so this is not the JWT public key lookup hanging.
Environment
n/a
- Ngôn ngữ chính
- TypeScript
- Star
- 1.8k
- Fork
- 483
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 325
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
-
ClerkAPIError drops meta.lockout_expires_in_seconds from user_locked errorsCó thể đã có người làm @umeraamir69 đã nhận 5 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
clerk/javascript#10026 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
@clerk/nextjs: onBeforeSetActive never settles when invalidateCacheAction rejects (e.g. after a redeploy), so setActive and signOut hang foreverCó thể đã có người làm @RaphaelFakhri đã nhận 21 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
clerk/javascript#9987 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 44/100
clerk/javascript#10413 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Dev instances: clerk-js rewrites __clerk_db_jwt non-atomically, concurrent requests fail with dev-browser-missingCó thể đã có người làm @umeraamir69 đã nhận 3 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
clerk/javascript#10411 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
API key verification forwards client User-Agent, causing Python urllib requests to failCó thể đã có người làm @umeraamir69 đã nhận 5 ngày trước. Đang mởneeds-triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 25/100
clerk/javascript#10352 ·
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ó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
keptinventory/kept#336 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
hemi-earn
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
vetro-protocol/vetro-monorepo#1013 ·
Maintainer thường phản hồi trong vòng 1 ngày