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
I'm new to TanStack Start and Router, and migrating a new project from React Router v7 has been a good experience overall. However, I encountered some issues and spent hours trying to figure out what was happening. My guess is that it’s caused by a hydration mismatch or a component being unmounted unexpectedly.
After integrating Clerk authentication, 404 pages sometimes return blank instead of showing the expected notFoundComponent. The behavior is inconsistent—sometimes it works, sometimes it just shows a white screen.
Key points:
The issue is intermittent: the same URL sometimes works, sometimes doesn’t.
Which project does this relate to?
Start
Describe the bug
I'm new to TanStack Start and Router, and migrating a new project from React Router v7 has been a good experience overall. However, I encountered some issues and spent hours trying to figure out what was happening. My guess is that it’s caused by a hydration mismatch or a component being unmounted unexpectedly.
After integrating Clerk authentication, 404 pages sometimes return blank instead of showing the expected notFoundComponent. The behavior is inconsistent—sometimes it works, sometimes it just shows a white screen.
Key points:
Your Example Website or App
https://github.com/michael-land/tanstack-start-with-clerk-hydration-issue
Steps to Reproduce the Bug or Issue
Expected behavior
Should consistently show the notFoundComponent
Screenshots or Videos
tanstack-clerk.mp4
0:03 - 0:14 refreshing post index page working fine
0:14 - 0:20 refreshing post not found page shows empty white screen
Platform
Chromium Engine Version 139.0.7258.128
Additional context
Environment