Which project does this relate to?
Start
Describe the bug
With a custom serialization adapter registered in start.ts and a route whose loader primes a query through @tanstack/solid-router-ssr-query, every page load throws:
TypeError: Cannot read properties of undefined (reading 'get')
The dehydrated query state reaches Solid's own SSR resource stream, not just the router's pipeline, so the adapter expression is emitted twice:
- inside Solid's stream script (
_$HY.r["0"] = …) as a bare $_TSR.t.get("Money")(1234) — no $_TSR.p(...) wrapper, and ahead of the router's $tsr-stream-barrier script that defines self.$_TSR. Solid's stream scripts run at parse time, so this one throws (or reports $_TSR is not defined when it parses before the router's bootstrap);
- inside the router's barrier script, correctly wrapped in
$_TSR.p(...) and buffered until hydrate() installs the adapter map.
A loader that simply returns the adapter-typed value does NOT reproduce it — that path is serialized by the router's pipeline alone. It takes the ssr-query dehydration path, which is the ordinary shape for an app reading session or loader data through the query cache.
Complete minimal reproducer
https://github.com/TylerRick/tanstack-solid-ssr-query-adapter-repro
Steps to Reproduce the Bug or Issue
pnpm install
pnpm dev
- Open http://localhost:5597 with the console visible — one uncaught
TypeError per load.
- Optional confirmation in the served HTML: the same
$_TSR.t.get("Money")(…) expression appears once unbuffered inside _$HY.r[...], and once inside $_TSR.p(...) in the barrier script.
Expected behavior
Adapter expressions emitted into Solid's SSR stream are buffered the way the router's own chunks are — or the adapter map is installed before any stream script can run — so a page that streams adapter-typed data through ssr-query loads without an uncaught error.
Screenshots or Videos
No response
Platform
- Router / Start Version:
@tanstack/solid-start, @tanstack/solid-router, @tanstack/solid-router-ssr-query 2.0.0-rc.0; @tanstack/solid-query 6.0.0-rc.0; @tanstack/router-core 1.171.16
- solid-js /
@solidjs/web: 2.0.0-rc.0
- OS: Linux
- Browser: Chromium 141
- Bundler: vite 8.2.1 (vite-plugin-solid 3.0.0-next.27)
Additional context
Ours carries a Temporal.PlainDate on the session, so every page load for a user with that field set threw. Workaround we ship: an inline head script, rendered first, that installs $_TSR as an accessor with a passthrough t map, so nothing throws whichever script parses first and hydrate()'s real map still wins.
Related: #5737 (closed, different cause), #7706 (adapter deserialization broken by calling a server fn from the client entry).
Which project does this relate to?
Start
Describe the bug
With a custom serialization adapter registered in
start.tsand a route whose loader primes a query through@tanstack/solid-router-ssr-query, every page load throws:The dehydrated query state reaches Solid's own SSR resource stream, not just the router's pipeline, so the adapter expression is emitted twice:
_$HY.r["0"] = …) as a bare$_TSR.t.get("Money")(1234)— no$_TSR.p(...)wrapper, and ahead of the router's$tsr-stream-barrierscript that definesself.$_TSR. Solid's stream scripts run at parse time, so this one throws (or reports$_TSR is not definedwhen it parses before the router's bootstrap);$_TSR.p(...)and buffered untilhydrate()installs the adapter map.A loader that simply returns the adapter-typed value does NOT reproduce it — that path is serialized by the router's pipeline alone. It takes the ssr-query dehydration path, which is the ordinary shape for an app reading session or loader data through the query cache.
Complete minimal reproducer
https://github.com/TylerRick/tanstack-solid-ssr-query-adapter-repro
Steps to Reproduce the Bug or Issue
pnpm installpnpm devTypeErrorper load.$_TSR.t.get("Money")(…)expression appears once unbuffered inside_$HY.r[...], and once inside$_TSR.p(...)in the barrier script.Expected behavior
Adapter expressions emitted into Solid's SSR stream are buffered the way the router's own chunks are — or the adapter map is installed before any stream script can run — so a page that streams adapter-typed data through ssr-query loads without an uncaught error.
Screenshots or Videos
No response
Platform
@tanstack/solid-start,@tanstack/solid-router,@tanstack/solid-router-ssr-query2.0.0-rc.0;@tanstack/solid-query6.0.0-rc.0;@tanstack/router-core1.171.16@solidjs/web: 2.0.0-rc.0Additional context
Ours carries a
Temporal.PlainDateon the session, so every page load for a user with that field set threw. Workaround we ship: an inline head script, rendered first, that installs$_TSRas an accessor with a passthroughtmap, so nothing throws whichever script parses first andhydrate()'s real map still wins.Related: #5737 (closed, different cause), #7706 (adapter deserialization broken by calling a server fn from the client entry).