You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
router-core@1.171.7+ regresses SSR streaming when used with @tanstack/react-router-ssr-query: the dehydration query stream is never closed, so the response stream hangs until the 60s serialization timeout fires ("Serialization timeout after app render finished"). Real browsers paint early; curl/bots see the full ~30–60s hang.
Root cause
PR #7497 ("fix streaming", landed in router-core@1.171.7) added a reserveStreamFastPath() fast path and guarded onRenderFinished:
When reserveStreamFastPath() has already set streamFastPathReserved = true by the time the integration registers its onRenderFinished listener, that listener is silently dropped. queryStream is therefore never closed → serializationFinished never becomes true → transformStreamWithRouter hits the serialization timeout.
Works:@tanstack/react-router@1.169.0 (→ router-core@1.169.0), or router-core@1.171.6 (pre-fix: fix streaming #7497, no guard)
Confirmed onRenderFinished is unguarded in 1.171.6 and guarded in 1.171.7, 1.171.8, 1.171.9.
Reproduction
React SSR with streaming (renderToReadableStream + transformReadableStreamWithRouter) and setupRouterSsrQueryIntegration, where a route loader uses ensureQueryData/prefetchQuery so there are dehydrated queries. On a route that resolves all queries quickly, reserveStreamFastPath() fires before the ssr-query integration registers its close listener → the stream hangs.
Expected
The latest published @tanstack/react-router-ssr-query is 1.167.1, which does not appear to account for reserveStreamFastPath, so there is currently no version combination on router-core@1.171.7+ that closes the query stream. Either:
onRenderFinished should still register (or immediately invoke) the listener when the fast path is already reserved, or
ship a router-ssr-query-core release coordinated with the reserveStreamFastPath change.
Bug
router-core@1.171.7+regresses SSR streaming when used with@tanstack/react-router-ssr-query: the dehydration query stream is never closed, so the response stream hangs until the 60s serialization timeout fires ("Serialization timeout after app render finished"). Real browsers paint early;curl/bots see the full ~30–60s hang.Root cause
PR #7497 ("fix streaming", landed in
router-core@1.171.7) added areserveStreamFastPath()fast path and guardedonRenderFinished:@tanstack/router-ssr-query-core@1.169.1registers the query-stream close viaonRenderFinished:When
reserveStreamFastPath()has already setstreamFastPathReserved = trueby the time the integration registers itsonRenderFinishedlistener, that listener is silently dropped.queryStreamis therefore never closed →serializationFinishednever becomes true →transformStreamWithRouterhits the serialization timeout.Versions
@tanstack/react-router@1.170.x(→router-core@1.171.7–1.171.9) +@tanstack/react-router-ssr-query@1.167.1(→router-ssr-query-core@1.169.1)@tanstack/react-router@1.169.0(→router-core@1.169.0), orrouter-core@1.171.6(pre-fix: fix streaming #7497, no guard)Confirmed
onRenderFinishedis unguarded in1.171.6and guarded in1.171.7,1.171.8,1.171.9.Reproduction
React SSR with streaming (
renderToReadableStream+transformReadableStreamWithRouter) andsetupRouterSsrQueryIntegration, where a route loader usesensureQueryData/prefetchQueryso there are dehydrated queries. On a route that resolves all queries quickly,reserveStreamFastPath()fires before the ssr-query integration registers its close listener → the stream hangs.Expected
The latest published
@tanstack/react-router-ssr-queryis1.167.1, which does not appear to account forreserveStreamFastPath, so there is currently no version combination onrouter-core@1.171.7+that closes the query stream. Either:onRenderFinishedshould still register (or immediately invoke) the listener when the fast path is already reserved, orrouter-ssr-query-corerelease coordinated with thereserveStreamFastPathchange.Happy to provide a minimal repro repo if useful.