Describe the bug
In Solid 2.0.0-beta.14, a rejected server-side lazy() component under <Loading> and <Errored> does not render the error boundary fallback.
Instead, the original lazy rejection appears as a process-level unhandledRejection. In my local run, the rendered SSR output also serialized a RangeError: Maximum call stack size exceeded, but the core issue is independent of that exact symptom: the rejected lazy module does not reach <Errored> as lazy failed.
Your Example Website or App
https://stackblitz.com/edit/solidjs-templates-rxaw9heg?file=src%2Fentry-server.tsx
Steps to Reproduce the Bug or Issue
- Open the StackBlitz terminal.
- Run
npm run repro.
- Inspect the rendered output.
- Observe that the output does not contain the
<Errored> fallback.
- Observe that the original
lazy failed rejection is logged as an unhandled rejection.
Expected behavior
The rejected lazy module should be handled as an error.
Because the tree has an <Errored> boundary, expected output should include:
At minimum, SSR should fail/report cleanly with the original lazy failed error. It should not leak the original lazy rejection as a process-level unhandledRejection.
Screenshots or Videos
No response
Platform
- OS: macOS
- Runtime: Node.js
- Version: Solid 2.0.0-beta.14
Additional context
The likely issue is that server lazy() records only the fulfilled module:
p.then(mod => {
p.v = mod.default;
});
The render path then keeps checking:
if (!p.v) throw new NotReadyError(p);
If the Promise rejects, there is no stored rejection state, so the server can continue treating the lazy component as pending/retryable instead of converting it into an error. Locally, that produced stack overflow serialization plus an unhandled rejection; in any case, the stable bug is that the rejection does not reach <Errored>.
Describe the bug
In Solid 2.0.0-beta.14, a rejected server-side
lazy()component under<Loading>and<Errored>does not render the error boundary fallback.Instead, the original lazy rejection appears as a process-level
unhandledRejection. In my local run, the rendered SSR output also serialized aRangeError: Maximum call stack size exceeded, but the core issue is independent of that exact symptom: the rejected lazy module does not reach<Errored>aslazy failed.Your Example Website or App
https://stackblitz.com/edit/solidjs-templates-rxaw9heg?file=src%2Fentry-server.tsx
Steps to Reproduce the Bug or Issue
npm run repro.<Errored>fallback.lazy failedrejection is logged as an unhandled rejection.Expected behavior
The rejected lazy module should be handled as an error.
Because the tree has an
<Errored>boundary, expected output should include:At minimum, SSR should fail/report cleanly with the original
lazy failederror. It should not leak the original lazy rejection as a process-levelunhandledRejection.Screenshots or Videos
No response
Platform
Additional context
The likely issue is that server
lazy()records only the fulfilled module:The render path then keeps checking:
If the Promise rejects, there is no stored rejection state, so the server can continue treating the lazy component as pending/retryable instead of converting it into an error. Locally, that produced stack overflow serialization plus an unhandled rejection; in any case, the stable bug is that the rejection does not reach
<Errored>.