Server rendering
Server rendering in the Diagnostics reference guide.
Raised by @shadow-js/web/server. These blocks are compiled for the server target and run with __SERVER__ set, like a real server.
SSR_BOUNDARY_WATERFALL#
Error (SsrError, code property). renderToStringAsync needed more than maxPasses passes (default 10): each pass resolved resources that, once resolved, made the app create new resources, a request waterfall. Fix: start independent requests together (create the resources in the same component pass), flatten the data flow, or raise maxPasses when the depth is intended.
SSR_TIMEOUT#
Error (SsrError, code property). The render (renderToStringAsync, default 10 000 ms) or the stream (renderToStream, default 30 000 ms) did not finish within timeoutMs; the render is canceled and its roots are disposed. Fix: find the resource that never settles (a request without its own timeout), or raise timeoutMs.
UNRECOGNIZED_INSERT_VALUE#
Error (TypeError). A value that cannot become markup reached the renderer (a plain object throws in development and renders nothing in production; a Symbol throws in both): a plain object, a Symbol (also as an attribute value, class name, style value or innerHTML), or a style that is not a string, object or array. This is the guard that keeps untrusted objects out of the HTML: only strings, numbers, booleans, null/undefined, arrays, functions returning those, and trusted SsrNode values render.
Fix: render a field ({user.name}), not the object; stringify explicitly with JSON.stringify if you really want text.
INVALID_TAG_NAME#
Error (TypeError). ssrElement(tag, ...) (used for elements with spread props) received a tag name that is not letters, digits and dashes starting with a letter. Fix: never build tag names from user input; map to an allow-list.
INVALID_STYLE_PROPERTY#
Error (TypeError). An object passed as style (or inside a style array) has a key that is not a valid CSS property name, so it could break out of the style attribute. camelCase keys (backgroundColor) and custom properties (--gap) are valid. Fix: use real property names; do not take property names from user input.
UNSERIALIZABLE_VALUE#
Error (TypeError). serialize(data) found a value it cannot represent: a function, a symbol, a class instance or another non-plain object. Supported: plain objects, arrays, Map, Set, Date, URL, bigint, undefined, NaN, ±Infinity, -0, cycles and shared references. Fix: convert to plain data before it goes into resource results.
INVALID_ATTRIBUTE_NAME on the server has the same meaning as in the DOM runtime entry above: ssrAttribute and ssrElement throw it for invalid names.