Memo over an error boundary output: a rejection during a held change halts uncaught
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 18/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, typescript
- Área
- frontend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 36.2k
- Forks
- 1.1k
- Merge medio
- 10 h 39 min
- PR fusionados (30 d)
- 500
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de solidjs/solid
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
[2.0 / next] Optimistic todo list with an "N left" memo loops forever when a toggle's save landsAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
Los mantenedores suelen responder en 1 día
-
[2.0 / next] createOptimisticStore: add, delete, add with saves pending hands <For> an undefined rowAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
Todos los issues de solidjs/solid
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Broken links in the docsAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
🔊 a11y
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
betagouv/mon-entreprise#4726 ·
Los mantenedores suelen responder en 9 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Deltares/fews-pi-requests#357 ·
Los mantenedores suelen responder en 1 día
-
bug confirmed js v6
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día