Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

No `AbortSignal` support in many functions - causing hanging requests on client and server

Đang mở
#10,356 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
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ả

needs-triage
Preliminary Checks
Reproduction

n/a

Publishable key

n/a

Description

Steps to reproduce:

  1. Use an API like clerk.session.getToken() (e.g. on the client) or clerk.authenticateRequest (on the server)
  2. Hit a bad spot with the Clerk servers (they tend to come in waves), to catch an overloaded server.
  3. 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:

Image

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của clerk/javascript

Tất cả issue của clerk/javascript

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.