[2.0 rc.13 + next] Aborted document closes a live-hole channel twice
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
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- backend
Direzione di ricerca
The issue does not name Solid source files; start by reading the server-side streaming and live-channel cleanup paths implicated by the reproduction. Run the standalone repro.test.ts from the linked reproduction setup with a Solid HEAD build, then compare normal completion with abort followed by producer completion. Done means aborting and later completing the producer does not throw, while normal cleanup still works.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
Abort followed by producer completion should clean up once. Instead an uncaught Controller is already closed TypeError escapes the document live channel.
Your Example Website or App
Steps to Reproduce the Bug or Issue
- Use the source below with the selected Solid build (complete setup is linked above).
import { createMemo } from "solid-js";
import { renderToStream } from "@solidjs/web";
import { frameTransformDirectResult } from "@solidjs/web/frames/server";
export function startDocument(values: () => AsyncIterable<number>) {
const Component = frameTransformDirectResult(
() => {
const value = createMemo(values);
return <b>{value()}</b>;
},
{ id: "minimal" },
);
const controller = new AbortController();
let html = "";
const stream = renderToStream(() => Component(), {
signal: controller.signal,
onError() {},
});
stream.pipe({
write: (chunk) => {
html += String(chunk);
},
end() {},
});
// After the first value, abort(), then finish the source.
// Source completion throws "Controller is already closed".
return { abort: () => controller.abort(), html: () => html };
}
- Requires server-side streaming. Pass an async generator that yields 1 and then waits. Once 1 has streamed, call the returned
abort(), then release the generator. The normal-completion control cleans up once.
Expected behavior
Expected: Abort and later producer completion clean up without an uncaught exception.
Actual: Producer completion throws TypeError: "Controller is already closed".
Platform
- Solid:
solid-js/@solidjs/webnext at3086f1b77cd7b0431d3a7f768c2984c335758633; comparison2.0.0-rc.13. Signals, compiler and diagnostics match the selected Solid build. - OS: macOS 26.6.2 (25G83); browser cases: system Google Chrome 155.0.8059.40. Server-only/type checks run in Bun 1.4.2.
- Builds/comparison: Development, production, and observe fail on HEAD and rc.13. Observe is the production runtime with optional instrumentation.
Additional context
Aborting one document should close its live channel once. Double close rejects with an invalid stream state during cleanup.
Related: #3768
Full automated reproduction
One-command setup, run and expected output.
Copy the standalone folder into a fresh Bun project. The visible source above is executed by these tests; the additional files supply the required HTTP, compilation, and browser setup.
bun init -y
bun add [email protected] @solidjs/[email protected] @solidjs/[email protected] @solidjs/[email protected] @solidjs/[email protected]
bun add -d playwright
bun run link-head.ts /absolute/path/to/built/solid
BUILD_MODE=development bun test ./repro.test.ts
The link command selects a built Solid HEAD checkout; omit it for rc.13. Repeat with BUILD_MODE=production for the production comparison. Browser tests use system Google Chrome.
- Lingua principale
- TypeScript
- Stelle
- 36.1k
- Fork
- 1.1k
- Merge medio
- 12h 10m
- PR unite (30g)
- 338
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 solidjs/solid
-
`lazy()`: remounting an already-loaded component renders empty (or the Suspense fallback) since 1.9.14Forse già presa @itisrmk l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 18/100
I maintainer di solito rispondono entro 1 giorno
-
[2.0 / next] Error formatting and async iterator protocol failures escape memo error handlingAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 14/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di solidjs/solid
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
auth: agent-bearer --manager-call is told to use the MCP instance argument on an ambiguous managerAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
Lyric and ApostrophesApertabug module: playback
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
chthollyphile/folia-major#739 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
agilepathway/label-checker#773 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno