Page freezes when a Suspense boundary suspends again while retrying hydration
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- react, typescript
- 领域
- frontend
调研方向
Start by tracing renderSuspense, hydrateSuspenseBoundary, recoverBoundaryHydration, and realHandleSuspended through the retry path described in the issue. Then find the existing hydration and Suspense tests and add coverage for a child suspending during boundary recovery. Done means the pending promise is retried without a repeated microtask loop and the page becomes responsive.
由索引模型根据 Issue 内容生成。
描述
Hi! I had a try using Redact and intlayer webapps and the homepage froze on load.
Chrome showed the "Page unresponsive" dialog. With plain React 19 the same build works fine. Changing the feature flags didn't help (redact(), or redact({ features: { ... } })).
After some digging in an unminified build, the console was full of the bare Error() that flushPending throws after 50 passes. It fires over and over, and the microtask loop never gives the main thread back.
What seems to happen:
- The landing page sits in a server-rendered
<Suspense>. Its content suspends during the first hydration (our dictionaries load lazily), so the boundary getswset andretryHydrationwaits on the promise. All good so far. - When it retries (
renderSuspense, thestate.w && state.b && state.ebranch), the markup no longer matches the server, sohydrateSuspenseBoundaryfalls back torecoverBoundaryHydration. That client-renders withroot.h = false. - A child suspends during that client render.
suspendHandlerisn't set on this path, sorealHandleSuspendedthrows aRenderSuspenseCapture, and the capture doesn't carry the promise. - The
catchin that branch only callsretryHydrationfor thenables, so the capture is rethrown.renderUpdatesthen reschedules the boundary right away, the child suspends on the same pending promise, and it goes round again.
Versions:
-@tanstack/redact 0.2.5,
- Vite 8.3.5,
@tanstack/react-start1.169.
- 主要语言
- TypeScript
- 星标
- 640
- 派生
- 32
- 平均合并
- 1 小时 15 分钟
- 30 天内合并 PR
- 7
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/redact 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
相似的 Issue
-
bug data-types
难度 2/5 1-3 小时 新手友好度 88/100
ClickHouse/clickhouse-js#1293 ·
维护者通常 1 天内回复
-
area: middleware enhancement good first issue
难度 2/5 1-3 小时 新手友好度 68/100
-
agent/quality testing
难度 1/5 1 小时以内 新手友好度 95/100
维护者通常 1 天内回复
-
GitHub registry install via `gh` credentials rewrites `\u0000`–`\u001f` escapes in source files to `^@`–`^_`可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 92/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
juspay/agent-distro#203 ·
维护者通常 1 天内回复