Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Daemon leaves a /rpc connection unanswered when the JSON body root is null

Abierto
#3,453 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
76/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
node.js, typescript

Línea de trabajo

Start with src/daemon/server/http-rpc-envelope-validation.ts and the /rpc request body handling described in the issue. Add a test that posts each non-object JSON root, including null, and checks for the 400 JSON-RPC -32600 response with id: null; then confirm unexpected throws still receive a response. Done means no /rpc body leaves its connection waiting unanswered.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

needs-triage

Purpose

A POST /rpc body whose JSON root is null is never answered: the connection stays open until the client's own timeout. Any other non-object root is answered correctly, so only this one literal hangs.

Findings

JSON.parse('null') succeeds and yields null, so the envelope check dereferences null.jsonrpc and throws. On main the throw happens inside req.on('end'); inside handleRpcRequest on #3452, which the body reader calls as void handleRpcRequest(...). Neither caller awaits it, so the rejection is dropped and nothing writes a response.

Measured against a live server with a 400 ms client budget, on main @ 5f84627d8 and on #3452's head — identical on both:

body result
null no answer within budget, connection held open
true, 7, "str", {}, [] 400 -32600 Invalid Request

Reported from the #3424 review thread on src/daemon/server/http-rpc-envelope-validation.ts. Deliberately not fixed in #3424: that issue's contract is that observable behavior is preserved exactly, and this path has no test of its own.

Required behavior

A null root is refused the way every other non-object root already is: 400, JSON-RPC -32600 Invalid Request, id: null. No connection is left waiting on a request the daemon will not answer.

Completion

  • A test posts each non-object JSON root, including null, and asserts the answer for every one.
  • No /rpc body leaves the connection unanswered: an unexpected throw on any path still gets a response.
Lenguaje dominante
TypeScript
Estrellas
4.9k
Forks
328
Merge medio
12 h 18 min
PR fusionados (30 d)
561

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de callstack/agent-device

Todos los issues de callstack/agent-device

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.