Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[2.0 / next] Recovering before a held error commits throws the successful value

Aperta
#4,145 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@drakeo338 ci sta già lavorando.

Dal 19/10/2026.

  • #4148 di @drakeo338 — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, typescript

Direzione di ricerca

Start with the held-frame error handling described in the issue, especially stageError, _pendingValue, CONFIG_STAGED_ERROR, serve, and commitPendingNode. Read the related S-43 case in error-is-an-answer.test.ts and compare its recovery timing with this reproduction, which recovers before the error commits. Done means the successful value replaces the proposed error and the request can finish with the UI showing Sum: 3 without [REACTIVITY_HALTED].

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug

A memo throws while an async sibling keeps the rendered update held. Before the request finishes, the memo recomputes successfully. When the request then resolves, Solid throws the successful recovery value as an error, reports [REACTIVITY_HALTED], and leaves the old content on screen.

Your Example Website or App

https://s.olid.uk/id/df_wYAiPRlmgfLmezgxTag

Steps to Reproduce the Bug or Issue

Click each button once, in order; rebuild or reload to repeat.

  1. Initially the page shows Sum: 2: both memos return 1.
  2. Click 1. Start update. slow becomes pending and value throws Error("boom"). The previous sum stays visible.
  3. Click 2. Recover. value successfully returns 1 while the request is still pending.
  4. Click 3. Finish request. The request resolves to 2.
  5. The page stays at Sum: 2. The console reports [REACTIVITY_HALTED] with the successful value 1 as the error.

Control: remove if (step() === 1) throw new Error("boom"); and rebuild. The same clicks produce Sum: 3.

Changing the recovery value to 7 makes Solid throw 7 instead; the sum stays 2 instead of becoming 9.

Expected behavior

The successful recomputation should replace the proposed error. Once the request resolves, the page should show Sum: 3 without throwing the recovered value or halting reactivity.

Screenshots or Videos

No response

Platform
  • OS: Linux
  • Browser: Chromium 154.0.8037.57
  • Solid: playground pinned to next@d2ad8b288886a5c7171e6746ccc019ad1d08d8ab, also the current next head when checked on 2026-10-19. Reproduces with development and production builds.
Additional context

Follow-up to the error-outcome audit in #3886, which was closed in favor of the D-41 implementation in #4085. The related S-43 test in error-is-an-answer.test.ts covers recovery after the previous error has committed. This case replaces an error proposal with a successful value before that error commits, while the same frame is still held.

Related reports, with different triggers:

  • #4109 concerns ordinary outside reads throwing before a held frame reveals. This repro fails during the eventual reveal, after the memo has recovered.
  • #4110 concerns a direct write to a failed writable memo. This repro uses successful recomputation of an ordinary memo; there is no writable memo setter.
  • #4106 was fixed by #4129 for error/value publication through latest() derivations. This repro uses no latest() and still fails on a commit containing that fix.

Likely cause: stageError stores the proposed error in _pendingValue and sets CONFIG_STAGED_ERROR. The successful recomputation replaces _pendingValue with 1 but leaves that flag set. A subsequent tracked read in serve therefore throws the successful value. The flag is normally cleared by commitPendingNode, after the failing read in this schedule.

The component uses one signal, two memos, a native Promise and ordinary JSX, with no timers or explicit effects/flushes. Source-level controls reproduce both same-value and changed-value recovery failures with immediate and native delivery; the no-error controls succeed.

Lingua principale
TypeScript
Stelle
36.1k
Fork
1.1k
Merge medio
11h 45m
PR unite (30g)
329

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di solidjs/solid

Tutte le issue di solidjs/solid

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.