A stale blocker answer after a push makes the next Back change the URL without updating the router
Los mantenedores suelen responder en 1 día
@cgalo ya está trabajando en esto.
Desde el 8/11/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 56/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
Start with the linked StackBlitz reproducer and trace how the router handles an async blocker answer after a push replaces pending navigation. Inspect the history and blocker code paths around go(+1) and ignoreNextPop, then run the relevant router history and blocker tests. Done means the stale “stay” answer has no effect on the next Back, and the URL and router both reach /first.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Which project does this relate to?
Router
Describe the bug
If a push happens while an async blocker is still waiting on a Back, and the old blocker is then answered "stay", the next Back changes the URL but the router never hears about it. The URL and the router stay out of sync.
It looks like the stale answer calls go(+1) after the push has removed forward history, so no popstate arrives and ignoreNextPop stays set for the next real Back.
Complete minimal reproducer
https://stackblitz.com/edit/er7zmjvu?file=src%2Fmain.jsx
Steps to Reproduce the Bug
Click the buttons in the preview, in order:
- Setup: go to
/first, then/second - Back. The blocker waits.
- Push
/newwithignoreBlocker: true - Answer the old blocker: stay
- Back
The blocker:
useBlocker({
shouldBlockFn: () => new Promise((resolve) => { answer.current = resolve }),
enableBeforeUnload: false,
withResolver: false,
})
Result after step 5: URL /first, router /new.
Expected behavior
After step 5, the URL and the router are both on /first.
Edit: After step 5 the still-mounted blocker asks again. While it waits, the URL is /first and the router is /new. Leaving puts both on /first. Staying still leaves them apart (index drift, not fixed by the linked PR).
An answer from a blocker that a push already replaced should have no effect on later navigation.
Platform
- Router / Start Version:
@tanstack/react-router1.170.45,@tanstack/history1.162.5 - OS: Linux
- Browser: Chrome. Firefox also shows it with
createBrowserHistorydirectly. - Browser Version: 154.0.8037.92
- Bundler: vite
- Bundler Version: 7.2.2
Additional context
Not the same as #8844, which is about __TSR_index on push/replace.
Written with AI assistance. The steps above were run in a browser against the linked project. Happy to send a PR if that helps.
- Lenguaje dominante
- TypeScript
- Estrellas
- 15.3k
- Forks
- 1.9k
- Merge medio
- 1 d 5 h
- PR fusionados (30 d)
- 46
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TanStack/router
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Masked navigation drops the first character of the hash each time (__tempLocation hash missing '#')Posiblemente ocupada @hassanabrar202 la tomó hace 8 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
router-generator: lazy-load Prettier (costs ~300–450ms per build even when formatting is off)Posiblemente ocupada @Sheraff la tomó hace 27 días. Abiertopackage: router-generator performance
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
router-generator: sibling `physical()` subtrees in a virtual route config generate duplicate identifiersPosiblemente ocupada @Sheraff la tomó hace 27 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
docs(router): clarify static title fallback in SPA modePosiblemente ocupada @Rohan-Dedhia la tomó hace 17 días. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
Todos los issues de TanStack/router
Issues similares
-
[BUG]: Shared links drop the configured basePath on GitHub PagesPosiblemente ocupada @anshulchikhale30-p la tomó hoy. Abiertobug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
StabilityNexus/IdentityTokens-EVM-Frontend#182 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Add: GTrekkerAbiertocheck:passed streams:add
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Koenkk/zigbee-herdsman-converters#13900 ·
Los mantenedores suelen responder en 1 día
-
area: ui Bug Payload OSS
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
payloadcms/payload#19839 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
jeanibarz/knowledge-base-mcp-server#1291 ·
Los mantenedores suelen responder en 1 día