ASYNC_MEMO_ELEMENT
An async memo landed on rendered output (JSX, a boundary), which cannot serialize for hydration; the memo rejects (observe + dev; rejects in every tier).
What you saw
- Kind:
ssr - Severity:
error(broken behavior)
The console report opens with [ASYNC_MEMO_ELEMENT] and the message, then an in line naming the owners that enclose the subject, root first, and an at line with the source location when the code was compiled with one.
In a captured artifact the same finding is an event with code: "ASYNC_MEMO_ELEMENT", ownerPath, and loc.
Diagnostics explains each line.
Why it fires
An async memo (or async iterable source) resolved, on the server, to rendered output — JSX, a component's result, a <Loading>/<Errored> boundary.
The memo serializes its landing for the client to adopt, and an element has no encoding (a boundary's accessor fails in the serializer and the client memo waits forever; a template object arrives as data the client cannot insert), so the memo rejects with this message in every tier and its boundary contains it: the nearest <Errored> renders its fallback, with none the <Loading> fragment rejects and the client renders the subtree.
The server runtime reports on the same channel, with the same in <App> › <Page> line.
Two groups.
Findings (SSR_RENDER_ERROR_CONTAINED, SSR_SUBTREE_ABANDONED, SSR_STREAM_ABANDONED, LATE_HEADER_WRITE, DYNAMIC_ASYNC_COMPONENT, ASYNC_MEMO_ELEMENT, SERVER_ERROR_SANITIZED, FRAME_MARKER_CORRUPTED) are facts about a render that exist in observe builds too — an APM sees them in production; in dev they print.
Checks (the rest, SSR_BOUNDARY_WATERFALL and SSR_CLIENT_CONTENT_MASKED included) are dev-only guidance.
A captured artifact from a server render carries both.
How to fix it
Return data from the async memo and render the JSX from it in the component.
Content that never hydrates (<NoHydration>) is untouched.
In tests
captureArtifact from @solidjs/diagnostics runs a scenario with the diagnostics channel open and returns the events it saw.
expectNoDiagnostics(artifact) fails while ASYNC_MEMO_ELEMENT is among them, with the events as evidence; after the fix, the code is gone from artifact.diagnostics.
Check for regressions in tests shows the loop and the Vitest matcher form.
Learn more
- Diagnostics: every code, with its kind, severity, and trigger.
- Debugging reactivity: how to read a report and what each group of codes points at.