No `AbortSignal` support in many functions - causing hanging requests on client and server
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
- Ambito
- authentication, backend
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
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
- Lingua principale
- TypeScript
- Stelle
- 1.8k
- Fork
- 483
- Merge medio
- 2g 58m
- PR unite (30g)
- 357
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di clerk/javascript
-
<SignIn />: first "Use email" click switches back to phone when `initialValues.phoneNumber` is setForse già presa @twicestruck l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
clerk/javascript#10487 ·
I maintainer di solito rispondono entro 1 giorno
-
useLoadedIsomorphicClerk misses "ready" when a ClerkProvider remounts after clerk-js has loaded — <ClerkLoading> never resolvesForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
clerk/javascript#10462 ·
I maintainer di solito rispondono entro 1 giorno
-
ClerkAPIError drops meta.lockout_expires_in_seconds from user_locked errorsForse già presa @umeraamir69 l’ha presa 7 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
clerk/javascript#10026 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
@clerk/nextjs: onBeforeSetActive never settles when invalidateCacheAction rejects (e.g. after a redeploy), so setActive and signOut hang foreverForse già presa @RaphaelFakhri l’ha presa 23 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
clerk/javascript#9987 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
clerk/javascript#10510 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di clerk/javascript
Issue simili
-
Shell: serve the home app's Cookie Policy on a hard reloadForse già presa @2001anshkaushik l’ha presa oggi. Apertafeature module:ai
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
rocketride-org/rocketride-server#2899 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
wazuh/wazuh-dashboard-plugins#9551 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
gofish-graphics/gofish-graphics#1252 ·
I maintainer di solito rispondono entro 1 giorno
-
optimization P3 size:XS
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
josephfung/curia#2366 ·
I maintainer di solito rispondono entro 1 giorno
-
stranded-follow-up sweep trusts any issue whose body carries the marker as the tracking issueApertatype:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
nightgauge/nightgauge#2688 ·
I maintainer di solito rispondono entro 1 giorno