You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another scenario involves manually entering a URL that belongs to an authenticated layout directly into the address bar. If I navigate to that page manually, not using a Link or navigate function, the same error occurs.
Reacted by Jakub Podhorský, Maksim, Vitor Gomes, santosa, Denys Bondarenko and Tamás Sallai
using the official example, even on latest version 1.29.2 or 1.28.1, although it works just fine when using the <Link> component to navigate, it keeps throwing the Uncaught error when manually navigating to /dashboard url
As mentioned above, this occurs to me when I initially hard-load the route that includes redirect in the browser address bar. It works well when navigating to that page on client side.
Reacted by Jakub Podhorský, Richard Strand, PT, John-Olav Storvold, Andrej, Victor Afanassieff and junglast
Wrapping the <RouterProvider router={router} /> in Suspense component helped me to resolve this issue.
This does not seem to help for our case. throw redirect({ to: '/login', search: { redirect: location.href }}); is changing the url, but showing a blank screen, suggesting indeed the Outlet is not rendering?
Activity
tannerlinsley commentedon Apr 17, 2024
Should be fixed in latest!
gregflynn commentedon Apr 18, 2024
Still seeing this in
1.28.7gregflynn commentedon Apr 18, 2024
as seen in other issues, downgrading to
1.28.1is a solid workaroundAndrejNemec commentedon Apr 18, 2024
+1
Another scenario involves manually entering a URL that belongs to an authenticated layout directly into the address bar. If I navigate to that page manually, not using a Link or navigate function, the same error occurs.
bazo commentedon Apr 19, 2024
yeah still happens, even on 1.28.9
6jonathanaloi6 commentedon Apr 19, 2024
Still happens in 1.28.9
nick-cheatwood7 commentedon Apr 19, 2024
Can confirm, downgrading from
1.28.7to1.28.1fixes the issue temporarily.planktonrobo commentedon Apr 20, 2024
Seeing this is broken in latest as well
sher commentedon Apr 21, 2024
Can confirm this is a degradation from
1.28.2and still exists in1.29.2.Working: https://stackblitz.com/edit/vitejs-vite-qsrurg?file=src%2Frouter.tsx
Failing: https://stackblitz.com/edit/vitejs-vite-m1s4ek?file=src%2Frouter.tsx
vitoorgomes commentedon Apr 21, 2024
using the official example, even on latest version
1.29.2or1.28.1, although it works just fine when using the<Link>component to navigate, it keeps throwing theUncaughterror when manually navigating to/dashboardurljunglast commentedon Apr 22, 2024
As mentioned above, this occurs to me when I initially hard-load the route that includes
redirectin the browser address bar. It works well when navigating to that page on client side.chore: downgrade tanstack router due to bug
artsiomshaitar commentedon Apr 22, 2024
Still happens in
1.29.2angelsantosa commentedon Apr 22, 2024
Also happens using loader in route.

andelkocvjetkovic commentedon Apr 23, 2024
Experiencing the same issue.
felix-bohlin commentedon Apr 23, 2024
Same here, but it only happens in my prod build.
I downgraded to
1.28.1and it worked again.hugocostadev commentedon Apr 25, 2024
Still happening with the latest version.
Error:

Code:
angelsantosa commentedon Apr 25, 2024
Hey, I just tested the new change, and while redirect does work, now it does not show Outlet content.
You can see the behavior here: https://stackblitz.com/edit/vitejs-vite-pcqzrt?file=src%2Fmain.tsx
fix: Handle client-only first-load redirects and not founds properly
vafanassieff commentedon Apr 26, 2024
There is no more error in the console, but the redirect does not load the current page and leave me with an empty screen.
hugocostadev commentedon Apr 26, 2024
Same here
miroslavmih commentedon Apr 30, 2024
Tested in
@tanstack/react-router": "^1.31.3and it seems that redirect doesn't work, i.e.
throw redirect({ to: '/' });will redirect to current page and not to: '/'
mykhailoalekseiev commentedon May 2, 2024
Wrapping the
<RouterProvider router={router} />in Suspense component helped me to resolve this issue.dedene commentedon May 6, 2024
This does not seem to help for our case.
throw redirect({ to: '/login', search: { redirect: location.href }});is changing the url, but showing a blank screen, suggesting indeed the Outlet is not rendering?dedene commentedon May 6, 2024
Ah, version 1.31.20 seems to have a fix! 🙌 Probably 51eb39b fixed it, it is working after updating. Thanks!!