-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Query param changes during navigation breaks FlowRouter #66
Comments
@arggh thank you for reporting this one I see on your screenshot before exception it throws |
Because the template it's trying to render hasn't been imported yet, due to the glitch described in this issue. If you modify the reproduction and remove the edit: Maybe the fact that using a layout template with |
@arggh I cloned the repo and running locally, can't really reproduce it. |
@arggh got production in |
It's pretty obvious but I'll still mention this: if you access route I can reproduce each and every time on Chrome version 74.0.3729.157, Safari version 12.1 (12607.1.40.1.5) and Firefox 67.0. |
@arggh FYI I'm working on fix, it's caused by our logic, as we assume you'd like to abort all pending subscriptions and Promises when you navigating to another route, and calling
|
I would argue, yes. Say you have a modal opened, for example a message from another user. This is persisted in the url with a query parameter, Only now the app is just broken. This was also quite similar to the situation where I bumped into this issue.
I'm sure there's almost always a way to circumvent this situation from happening, but I think that doesn't mean a fix shouldn't be attempted? |
Hello @arggh , Very sorry for the late reply, as well as this may not fix the issue you are experiencing. |
@arggh friendly ping 🛸 |
Sorry for the eerie silence. I was, or am currently, a bit overrun by life at the moment. I took the newest
This would indicate that the actual bug is still unfixed, though the error message is improved apparently? |
Hello @arggh , I ran tests against your reproduction app, although error message is displayed, there is no exception and app not getting broken (users still can navigate, etc.) I'll keep looking for a solution to fix it. |
@arggh friendly ping. Is it fixed on your end? |
Sorry, but I still get the error when I run the reproduction with
|
@arggh opening this issue due to your report //cc @thearabbit |
Hope this one related and will be fixed by #73 and #74 |
A call to
FlowRouter.setQueryParams({ foo: 'bar' })
, at approximately the same time as a navigation happens, breaks the FlowRouter completely - rendering the app useless.See reproduction with instructions included in the repro app itself:
https://github.com/arggh/flow-router-waiton-issue
Just clone the repro, run
npm install
andmeteor
.Situation where this occurred and explanation what happens:
div, which has a handler that will call
FlowRouter.setQueryParams`.waitOn
will get called on the current routewaitOn
will get called on the new routeendWaiting
will get called twice on the new routeaction
will also get called twice on the new route, once before the dynamic import promise has been resolved inwaitOn
, thus breaking the app.flow-router-extra
you're experiencing this issue 3.6.3Meteor
you're experiencing this issue 1.8.1The text was updated successfully, but these errors were encountered: