Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

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

Aberta
#10,356 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
55/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
javascript, node.js, typescript

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
TypeScript
Estrelas
1.8k
Forks
483
Merge médio
1d 23h
PRs com merge (30d)
325

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de clerk/javascript

Todas as issues de clerk/javascript

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.