Memo over an error boundary output: a rejection during a held change halts uncaught
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 18/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript, typescript
- 领域
- frontend
调研方向
Start with the reproduction in the issue: createErrorBoundary wrapping a memo over a promise, then a memo over the boundary output, flushed during a held change. Compare the render-effect-reads-boundary case, which works, with the memo case, which halts. The scheduler's handling of held changes and rejected sources in the signals package is where the fix would live. Done means the second rejection is caught by the boundary, the render effect shows ERR, and nothing escapes as an uncaught error.
由索引模型根据 Issue 内容生成。
描述
A memo over an error boundary's output halts the scheduler when the boundary's source rejects during a held change. The rejection escapes as an uncaught error, and the screen stays on the old value instead of showing the boundary's fallback. If the render effect reads the boundary output directly, the fallback shows as expected.
import { createErrorBoundary, createMemo, createRenderEffect, createRoot, createSignal, flush, untrack } from "@solidjs/signals";
const asks = [];
let screen = "-";
const [sel, setSel] = createSignal(3);
createRoot(() => {
const detail = createMemo(() => { sel(); return new Promise((res, rej) => asks.push({ res, rej })); });
const shown = untrack(() => createErrorBoundary(() => detail(), () => "ERR"));
const t = createMemo(() => shown()); // remove this memo and it works
createRenderEffect(() => t(), v => { screen = v; });
});
// settle first ask with "A" -> screen "A"
// setSel(1); flush() -> held change, screen "A"
// reject second ask "boom" -> uncaught "boom", screen stays "A" (expected "ERR")
| shape | after reject |
|---|---|
| render effect reads the boundary output directly | ERR |
| render effect reads a memo over the output | uncaught boom, screen A |
The same uncaught error shows up when the memo is read under a <Loading> (without on). The bug is on next. Review of #4639 found it while probing error boundaries built outside a Loading.
Generated by Claude Code
- 主要语言
- TypeScript
- 星标
- 36.2k
- 派生
- 1.1k
- 平均合并
- 9 小时 58 分钟
- 30 天内合并 PR
- 474
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
solidjs/solid 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
维护者通常 1 天内回复
-
1.x
难度 4/5 3-5 天 新手友好度 45/100
维护者通常 1 天内回复
-
What gets passed to the `when` prop of a `Show` still gets executed twice on SSR可能已有人在做 @brenelz 于 6 天前认领。 未关闭1.x
难度 3/5 1-2 天 新手友好度 52/100
维护者通常 1 天内回复
相似的 Issue
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 83/100
lingdojo/kana-dojo#33701 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
tech-debt
难度 2/5 1-3 小时 新手友好度 68/100
rookslog/zlibrary-mcp#408 ·
维护者通常 1 天内回复
-
mp4box.js — 20-byte `sgpd` box with large `entry_count` causes unbounded loop and heap OOM abort未关闭
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
status: needs triage
难度 2/5 1-3 小时 新手友好度 64/100
mastra-ai/mastra#29641 · 1 条评论 ·
维护者通常 1 天内回复