-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Vue3] [React] window.history.state
is null causing errors after upgrading to 2.0.3
#2204
Comments
We have what is likely the same issue, except in React. Similarly, I haven't been able to reproduce myself, but we started seeing issues in 2.0.2, but not 2.0.0. We didn't have 2.0.1 deployed, and not yet tried 2.0.3.
Will also keep trying to replicate locally. |
@davidwessman did you say in the original comment that this was in iOS? There's an |
Hm, not what I can remember. You mean here #2195 (comment)? |
@davidwessman nevermind, must have been thinking of something else, sorry! |
I've started getting these errors in BugSnag after upgrading from 2.0.0 to 2.0.3. |
Same, seeing this issue in Sentry. We're using React.
|
Same here on React, right after upgrading from 2.0.0 to 2.0.3. All events occured on Chrome Mobile and Edge Mobile, on Android, at least for now. |
Got another report for a different value, but seems to be the same issue: Again on Edge Mobile / Android, on 2.0.3 It does look like the issue discussed #2195 (comment) |
Ah, seems to be happening on iOS locally as well - good find! 🙂 @MarcEspiard (iOS Safari) |
I’m experiencing the same issue. Are there any updates? |
@joetannenbaum this is related to #2200 that was merged last week. In our case it's causing some major outages in production with clients reporting they're unable to navigate. Same as everybody, I have been able to reproduce but not consistantly. Reverting back to 2.0.0 solved the issue for us. |
window.history.state
is null causing errors after upgradingwindow.history.state
is null causing errors after upgrading to 2.0.3
I don't have the issue myself, but i can force it by replacing the history state in the javascript console with This could also happen if you use window.history.pushState or replaceState somewhere in your codebase without putting in the current state, to add query parameters or do something else. It could also be an external script which tries to modify the state, like a cookie consent manager. This breaks: window.history.pushState(null, "", url.toString()) This won't: window.history.pushState(window.history.state, "", url.toString()) Why the error happens: The saveDocumentScrollPosition() function in core/history.ts gets called on scroll and tries access The |
I get this issue when navigating from a non-inertia to an inertia page in the same application. In my case it is the
Seems like a nullcheck on state here would do the trick as it will return a default state in that case. Using react adapter 2.0.3 |
Version:
@inertiajs/vue3
version: 2.0.3Describe the problem:
Before upgrading to 2.0.2 we had tests failing due to #2195.
Then we waited for 2.0.3 fixing the first issue, but as soon as we deployed to production we started receiving other errors of similar nature.
We might be doing something bad in these views, it seems related to some navigation but I cannot pinpoint it.
Steps to reproduce:
I cannot reproduce it, but the errors were rolling into Sentry until we reverted.
Will try to make an example if I can :/
The text was updated successfully, but these errors were encountered: