Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[2.0 rc.13 + next] Aborted document closes a live-hole channel twice

Đang mở
#3,893 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Standalone reproduction

Steps to Reproduce the Bug or Issue
  1. 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 };
}
  1. 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/web next at 3086f1b77cd7b0431d3a7f768c2984c335758633; comparison 2.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.

Ngôn ngữ chính
TypeScript
Star
36.1k
Fork
1.1k
Merge trung bình
11 giờ 42 phút
Pull request đã merge (30 ngày)
326

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của solidjs/solid

Tất cả issue của solidjs/solid

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.