Skip to content

Errored stays up after the only reader that threw is disposed (isPending-opened branch) #4373

Closed

Description

@ryansolid

Found by the async app generator (#4371). Reproduces on next 5f60713.

const [s, setS] = createSignal(3);
const act = action(function* (v: number) {
  setS(v);
  yield new Promise<void>(r => (release = r));
});

render(() => {
  const m = createMemo(() => {
    if (s() === 1) throw new Error("boom");
    return s();
  });
  return (
    <Errored fallback={e => "[ERR]"}>
      <Show when={isPending(m)}>
        <span>{m()}</span>
      </Show>
    </Errored>
  );
}, el);

act(1);   // the screen shows <span></span> while the action is in flight
release(); // after the action settles, the screen shows [ERR]

When the action ends, isPending(m) turns false, so the Show branch closes and the <span> reading m() is disposed. The Errored still shows its fallback. A fresh render with s = 1 shows nothing, because nothing on the page reads m().

Expected (Ryan's ruling): the boundary heals when the reader that threw is disposed and nothing else keeps it errored. The screen should be empty, as it is in the fresh render.

Activity

  1. ryansolid commented on Oct 29, 2026

    @ryansolid
    MemberAuthor

    Fixed on next by #4384 (957f065); it ships in the next RC.


    Generated by Claude Code

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