Skip to content

Errored fallback with an async hole is dropped inside a pending outer Loading (SSR streaming) #4306

Closed

Description

@ryansolid

What happens

An <Errored> whose fallback reads async data, sitting inside an outer <Loading> that is still pending, hydrates without its fallback when the inner <Loading> fails after the shell. The Errored region disappears.

<div>
  <Loading fallback={<i>outer loading</i>}>
    <b>{outer()}</b>
    <Errored fallback={e => <p>failed: {e().message} {hint()}</p>}>
      <Loading fallback={<i>loading</i>}>
        <span>user:{user()}</span>
      </Loading>
    </Errored>
  </Loading>
  <span>tail</span>
</div>

Three async createMemos are created in the component body:

  • user rejects with "no user 7" at 5ms.

  • hint resolves to "HINT" at 10ms.

  • outer resolves to "outer" at 15ms.

  • Expected: outerfailed: no user 7 HINTtail

  • Actual: outertail, with one or two hydration warnings. Both streamed and loaded hydration show this on next.

Server output

The shell has <i>outer loading</i> at pl-4. The stream rejects user, resolves hint, then sends <template id="4"><b _hk=4000>outer</b></template> and $df("4"). It sends nothing for the Errored region: no fallback markup and no inner placeholder.

Likely cause (unconfirmed)

The inner fragment is parked under the pending outer boundary. It fails while the Errored fallback's async hole is still pending, so the outcome render (renderOutcome in packages/solid/src/server/signals.ts) produces no markup. When the outer Loading later resolves, the Errored subtree is dropped instead of sending its fallback, or a placeholder the client can render into.

Found while reviewing #4303. That PR fixes the same shape without the outer Loading; this nested case fails the same way before and after it.


Generated by Claude Code

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