Repository navigation
Closed
Description
Describe the bug
A derived store can lose the rejection of a replacement request instead of routing it to the surrounding error boundary.
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 { createSignal, createStore, Errored, Loading } from "solid-js";
export default function App() {
let reject!: (error: Error) => void;
const replacement = new Promise<{ value: number }>((_, fail) => {
reject = fail;
});
const [id, setId] = createSignal(0);
const [store] = createStore(() => (id() ? replacement : { value: 0 }), { value: 0 });
function replace() {
setId(1); // Start a replacement request.
setTimeout(() => reject(new Error("replacement failed")), 20);
}
return (
<>
<button id="trigger" onClick={replace}>
Replace and reject
</button>
<Errored fallback={() => <b id="answer">error</b>}>
<Loading fallback={<i>pending</i>}>
<span id="answer">{store.value}</span>
</Loading>
</Errored>
</>
); // After the click: still 0, instead of the error fallback.
}- Paste this App into a Solid 2 playground. Click Replace and reject, then wait.
Expected behavior
Expected: The error fallback displays error.
Actual: The previous value 0 remains visible.
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 and production fail. rc.13 passes in both builds.
Additional context
The surrounding Errored boundary should handle rejection of the data it displays; keeping the old successful value hides the failed request.
Full automated reproduction
One-command setup, run and expected output.
Copy the standalone files into a fresh Bun project. The displayed snippet is executed by snippet.test.ts. The original automated case is also retained.
bun init -y
bun add solid-js@2.0.0-rc.13 @solidjs/web@2.0.0-rc.13 @solidjs/signals@2.0.0-rc.13 @solidjs/compiler@2.0.0-rc.13 @solidjs/diagnostics@2.0.0-rc.13
bun add -d playwright
bun run link-head.ts /absolute/path/to/built/solid
BUILD_MODE=development bun test ./snippet.test.tsThe five linked packages must come from the same built HEAD checkout. Omitting the link step selects the rc.13 comparison. Chrome runs use the system installation.
Metadata
Metadata
Assignees
Labels
No labels
Activity
report: record the 15 filed runtime issues (solidjs/solid#3887–#3901)
fix(signals): a failed derived-store refetch reaches Errored (#3887) (#…
ryansolid commentedon Oct 8, 2026
fix(signals): link a store reader to its derive's staged error (#4517) (