Page freezes when a Suspense boundary suspends again while retrying hydration
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- react, typescript
- Domínio
- frontend
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 640
- Forks
- 32
- Merge médio
- 1h 15min
- PRs com merge (30d)
- 7
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de TanStack/redact
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
TanStack/redact#195 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
TanStack/redact#142 · 4 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
Todas as issues de TanStack/redact
Issues semelhantes
-
bug data-types
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
ClickHouse/clickhouse-js#1293 ·
Mantenedores costumam responder em até 1 dia
-
area: middleware enhancement good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
agent/quality testing
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 95/100
Mantenedores costumam responder em até 1 dia
-
GitHub registry install via `gh` credentials rewrites `\u0000`–`\u001f` escapes in source files to `^@`–`^_`Talvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 92/100
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
juspay/agent-distro#203 ·
Mantenedores costumam responder em até 1 dia