SSR crash on Vercel: "object is not iterable" in handleServerRoutes after upgrading to [email protected] ([email protected])
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 28/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 活跃
- 技术栈
- node.js, react, typescript
调研方向
Start with packages/router-core/src/ssr/handlerCallback.ts, server-functions-handler.ts, and ServerFunctionSerializationAdapter.ts, then compare the built Vercel function under .vercel/output/functions/__server.func/index.mjs across the working and failing versions. Reproduce on Vercel with the reported runtime context and trace the SSR response contract until the source of the iterable error is identified; done means SSR requests render successfully on the security-fixed release.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
After upgrading to the latest patched release of @tanstack/react-start (1.168.60, pulling in @tanstack/[email protected] and @tanstack/[email protected]), our app crashes on every SSR request to / when deployed to Vercel (Node.js runtime, nodejs24.x, nitro vercel preset), with:
TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator))
at handleServerRoutes (file:///var/task/_ssr/server-<hash>.mjs:1528:49)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
This reproduces consistently on real Vercel infrastructure (confirmed via Vercel's own runtime error/log aggregation across multiple separate deployments of the identical commit), but we have not been able to reproduce it by invoking the exact same built .vercel/output/functions/__server.func/index.mjs bundle directly in a plain Node 24 process (both GET / and HEAD / against a bare new Request(...) return 200 locally, full HTML). So whatever triggers it depends on something specific to the real request/runtime context Vercel provides (headers, the context object with a real waitUntil, etc.) that we haven't been able to pin down yet from the outside.
Suspected cause
We noticed @tanstack/[email protected] was released together with #8573 ("fix(start): align server function transport behavior"), which tightened normalizeSsrResponse/isSsrResponse in packages/router-core/src/ssr/handlerCallback.ts to throw (Expected a Response from the SSR handler) instead of silently passing through non-Response values, and reshaped the server-function result contract (result.error/result.result) in server-functions-handler.ts and ServerFunctionSerializationAdapter.ts. We suspect something in our app's SSR path produces a value that no longer satisfies the new, stricter contract, and that whatever is swallowing/transforming that TypeError ends up presenting it as "object is not iterable" rather than the new explicit error message — but we haven't fully traced it through the minified bundle yet.
Your Example Website or App
Not shareable (private production app), sorry — happy to provide more detail/log excerpts on request.
Steps to Reproduce the Bug or Issue
- Deploy a TanStack Start app to Vercel using the
vercelnitro preset (Node.js runtime) with@tanstack/[email protected]. - Request
/(or any SSR page) from the deployed production URL. - Observe a 500 with the stack trace above.
We were unable to reduce this to a minimal public repro yet since it doesn't reproduce outside real Vercel infrastructure in our testing — will update if we manage to isolate it further or narrow down which of our server functions/middleware triggers it.
Expected behavior
SSR request to / should render normally, as it did on @tanstack/[email protected] (pre-upgrade).
Screenshots or Videos
No response
Platform
- OS: Vercel (Linux,
nodejs24.xruntime), nitro presetvercel - Browser: N/A (server-side crash)
Additional context
Versions involved: @tanstack/[email protected], @tanstack/[email protected], @tanstack/[email protected], @tanstack/[email protected], @tanstack/[email protected], @tanstack/[email protected], @tanstack/[email protected].
We upgraded specifically to pick up the fix for the recent critical XSS advisory in @tanstack/react-start (GHSA-qx66-fv34-fjm8 / CVE-2026-102989), so we can't simply stay on the older version. Since 1.168.60 is currently the only released version carrying that security fix, this regression is currently blocking us from deploying it — we've had to roll back to the pre-CVE-fix version in production in the meantime.
tanstack/router version
1.168.60 (react-start) / 1.171.34 (router-core) / 1.169.39 (start-server-core)
Platform
Vercel (Node.js 24.x runtime, nitro vercel preset)
- 主要语言
- TypeScript
- 星标
- 15.3k
- 派生
- 1.9k
- 平均合并
- 1 天 5 小时
- 30 天内合并 PR
- 46
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/router 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
Masked navigation drops the first character of the hash each time (__tempLocation hash missing '#')可能已有人在做 @hassanabrar202 于 8 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
router-generator: lazy-load Prettier (costs ~300–450ms per build even when formatting is off)可能已有人在做 @Sheraff 于 27 天前认领。 未关闭package: router-generator performance
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
router-generator: sibling `physical()` subtrees in a virtual route config generate duplicate identifiers可能已有人在做 @Sheraff 于 27 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
docs(router): clarify static title fallback in SPA mode可能已有人在做 @Rohan-Dedhia 于 17 天前认领。 未关闭
难度 1/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
相似的 Issue
-
[BUG]: Shared links drop the configured basePath on GitHub Pages可能已有人在做 @anshulchikhale30-p 今天认领。 未关闭bug
难度 1/5 1 小时以内 新手友好度 88/100
StabilityNexus/IdentityTokens-EVM-Frontend#182 · 1 条评论 ·
维护者通常 1 天内回复
-
Add: GTrekker未关闭check:passed streams:add
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
Koenkk/zigbee-herdsman-converters#13900 ·
维护者通常 1 天内回复
-
area: ui Bug Payload OSS
难度 1/5 1 小时以内 新手友好度 88/100
payloadcms/payload#19839 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
jeanibarz/knowledge-base-mcp-server#1291 ·
维护者通常 1 天内回复