Skip to content
Source
Sign inSign up
TanStack/router

URL doesn't update in address bar after tab is idle, but content navigates correctly #6286

Closedfarukkandemir(GitHub profile, opens in a new tab) opened this issue 7 comments

Which project does this relate to?

Router

Describe the bug

When a browser tab is left idle for approximately 30-60 seconds (or when switching to another tab/app and returning), subsequent navigation attempts update the page content correctly, but the URL in the address bar remains unchanged.

The router appears to successfully navigate internally (components render, data loads), but history.pushState or equivalent URL update fails silently.

Your Example Website or App

https://pianolearn.app/

Steps to Reproduce the Bug or Issue

1.Open the app and navigate to any public page (e.g., /guide) 2.Leave the tab idle for 60-90 seconds, or switch to another tab/application 3.Return to the tab and click a navigation link (e.g., go to /about) 4.Observe: Page content updates to the new route, but the URL in the address bar still shows the old route (e.g., /guide) 5.Hard refresh is required to sync the URL

Expected behavior

URL in the address bar should update to match the navigated route when using Link or useNavigate().

Screenshots or Videos

No response

Platform

  • Router Version: 1.141.2
  • OS: Windows 11 (24H2, Build 26100.7462)
  • Browser: Chrome
  • Browser Version: 143.0.7499.170
  • Bundler: Vite
  • Bundler Version: 7.2.4

Additional context

No response

  1. please provide a minimal complete reproducer project

  2. schiller-manuel(GitHub profile, opens in a new tab) added labelsinformation needed

  3. +1, I have the same problem. I'm not sure how to reproduce it, and can't share the project i'm working on.

    I have a TanStack Start project. It works fine if I open a tab and navigate. But if I leave the tab open for some time (~5 minutes) and come back - navigation works, but url doesn't change. When I refresh the page, I get redirected to the url that was stuck, and from there I can navigate fine again, with updated address bar.

    The problem is present both locally and deployed (AWS ECS with Docker). Local machine is Mac M3.

    Problem persists on both these: "@tanstack/react-router": "^1.147.3", "@tanstack/react-start": "^1.149.1", "nitro": "3.0.1-alpha.1", "react": "^19.1.0", "vite": "^7.3.0", (devDependency) and these dependencies: "@tanstack/react-router": "^1.151.1", "@tanstack/react-start": "^1.151.1", "nitro": "3.0.1-alpha.1", "react": "^19.1.0", "vite": "^7.3.0", (devDependency)

    Let me know if i can share anything else or help somehow

  4. @denbondd please share a complete reproducer repo

  5. Here is the reproduction repo @schiller-manuel

    https://github.com/denbondd/ts-bug-repro

    To reproduct - run the app (dev or start), open the tab, then leave the tab open and navigate to another tab or window. In about 5 minutes come back and try to navigate between pages in the app without refreshing the page.

    I'm attaching a video

    https://github.com/user-attachments/assets/c868ee13-fb72-46ee-9b6c-c8a745dc1ea9

  6. @denbondd are there any interesting console logs?

  7. @schiller-manuel YES! There was an error, but the source leads to one of my Chrome extensions' code. So I disabled it, and it seems to solve the problem!

    Strange that it works fine for other websites, but I guess that's not your problem.

    Thanks!

    For reference, it was extension "Browserflow" v1.0.6

  8. going to close this then. if anyone else encounters a similar issue and it is NOT caused by a browser extension, please open up a new github issue with a complete minimal reproducer.

Sign in to join this conversation.