-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
Which project does this relate to?
Router
Describe the bug
In the rare case that sessionStorage is full (10 MB in modern Chrome), using scrollRestoration: true can cause a crash on navigation.
Failed to execute 'setItem' on 'Storage': Setting the value of 'tsr-scroll-restoration-v1_3' exceeded the quota.
Your Example Website or App
https://stackblitz.com/edit/github-wnddb8nk?file=src%2Froutes%2Findex.tsx
Steps to Reproduce the Bug or Issue
- Go to the linked stackblitz
- Click the "Fill session storage" button
- Click between Home and About a few times to trigger navigations
- Observe the error
Expected behavior
I expect Tanstack Router to catch session storage errors and not crash the app. I think adding a try/catch to this bit of code would fix the issue
Screenshots or Videos
No response
Platform
- Router / Start Version: 1.144.0
- OS: macOS Tahoe
- Browser: Chrome
- Browser Version: 143.0.7499.170
- Bundler: Vite
- Bundler Version: 7.3.0
Additional context
No response
coderabbitai
Metadata
Metadata
Assignees
Labels
No labels