Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#10,356 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, node.js, typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
TypeScript
Stelle
1.8k
Fork
483
Merge medio
2g 58m
PR unite (30g)
357

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di clerk/javascript

Tutte le issue di clerk/javascript

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.