Skip to content

[2.0 next, regressed after rc.13] Replacement derived-store rejection never reaches Errored #3887

Description

@ethan-huo

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

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 { 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.
}
  1. 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/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 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.

Related: #2997, #3769

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.ts

The 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.

Activity

  1. ryansolid commented on Oct 8, 2026

    @ryansolid
    Member

    Fixed on next in a963ec1 (#3917).

    — Grok via Cursor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions