No `AbortSignal` support in many functions - causing hanging requests on client and server
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- javascript, node.js, typescript
- Bereich
- authentication, backend
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- TypeScript
- Sterne
- 1.8k
- Forks
- 483
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 325
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus clerk/javascript
-
ClerkAPIError drops meta.lockout_expires_in_seconds from user_locked errorsEvtl. vergeben @umeraamir69 hat das vor 5 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
clerk/javascript#10026 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
@clerk/nextjs: onBeforeSetActive never settles when invalidateCacheAction rejects (e.g. after a redeploy), so setActive and signOut hang foreverEvtl. vergeben @RaphaelFakhri hat das vor 21 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
clerk/javascript#9987 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs-triage
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 44/100
clerk/javascript#10413 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Dev instances: clerk-js rewrites __clerk_db_jwt non-atomically, concurrent requests fail with dev-browser-missingEvtl. vergeben @umeraamir69 hat das vor 4 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
clerk/javascript#10411 ·
Maintainer antworten meist innerhalb von 1 Tag
-
API key verification forwards client User-Agent, causing Python urllib requests to failEvtl. vergeben @umeraamir69 hat das vor 5 Tagen übernommen. Offenneeds-triage
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 25/100
clerk/javascript#10352 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in clerk/javascript
Ähnliche Issues
-
area: server priority: P3 type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
appandflow/stim#4538 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[BUG] Published Docker images lack the redis extra: HEADROOM_COMPRESS_SESSION_STORE stops startupEvtl. vergeben @AlessandroSpallina hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
headroomlabs-ai/headroom#4513 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug extension extension: obsidian platform: Windows
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
raycast/extensions#32838 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
copy design-review mac P3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
tosunlab/hisarapp-core#510 ·
-
bug priority-medium to-agent
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag