Daemon leaves a /rpc connection unanswered when the JSON body root is null
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 76/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- node.js, typescript
- Domínio
- backend-api-design, testing-qa
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
/rpcbody leaves the connection unanswered: an unexpected throw on any path still gets a response.
- Linguagem predominante
- TypeScript
- Estrelas
- 5k
- Forks
- 334
- Merge médio
- 12h 2min
- PRs com merge (30d)
- 678
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de callstack/agent-device
-
`devices` reports a phantom Android emulator named after the emulator's crashdata INFO bannerTalvez já em andamento @airowe assumiu há 1 dia. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
callstack/agent-device#3716 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
callstack/agent-device#1869 ·
Mantenedores costumam responder em até 1 dia
-
backlog refactor
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 8/100
callstack/agent-device#3759 ·
Mantenedores costumam responder em até 1 dia
-
backlog enhancement needs-triage
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 8/100
callstack/agent-device#3758 ·
Mantenedores costumam responder em até 1 dia
-
enhancement ready-for-agent
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 15/100
callstack/agent-device#3757 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de callstack/agent-device
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
umami-software/umami#4637 ·
Mantenedores costumam responder em até 3 dias
-
Hotkeys fire when pressed with the Ctrl key, so browser shortcuts also trigger player actionsTalvez já em andamento @RaphaelFakhri assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
muxinc/media-chrome#1332 ·
Mantenedores costumam responder em até 5 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
polarsource/polar#15580 ·
Mantenedores costumam responder em até 1 dia
-
accepted bug via-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 69/100
pingdotgg/t3code#20931 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug/1-unconfirmed kind/bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia