question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Query param changes during navigation breaks FlowRouter

See original GitHub issue

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 and meteor.

May-22-2019 12-29-31

Situation where this occurred and explanation what happens:

  1. There is a link inside a div, that takes us to another page.
  2. We also have a click event listener on the link’s parent div, which has a handler that will call FlowRouter.setQueryParams`.
  3. User clicks on the link
  4. Click listener will cause a query parameter change to be triggered
  5. waitOn will get called on the current route
  6. Navigation takes place and FlowRouter picks up route change
  7. waitOn will get called on the new route
  8. endWaiting will get called twice on the new route
  9. action will also get called twice on the new route, once before the dynamic import promise has been resolved in waitOn, thus breaking the app.
  10. Any further attempts at navigating will not work
  • Version of flow-router-extra you’re experiencing this issue 3.6.3
  • Version of Meteor you’re experiencing this issue 1.8.1
  • Browser name and its version All of them
  • If you’re getting an error or exception, please provide its full stack-trace as plain-text or screenshot
meteor.js?hash=857dafb4b9dff17e29ed8498a22ea5b1a3d6b41d:1059 Exception from Tracker recompute function:
meteor.js?hash=857dafb4b9dff17e29ed8498a22ea5b1a3d6b41d:1059 Error: Can't render undefined
    at checkRenderContent (blaze.js?hash=51f4a3bdae106610ee48d8eff291f3628713d847:2285)
    at contentAsFunc (blaze.js?hash=51f4a3bdae106610ee48d8eff291f3628713d847:2328)
    at Object.Blaze.renderWithData (blaze.js?hash=51f4a3bdae106610ee48d8eff291f3628713d847:2401)
    at BlazeRenderer.materialize (renderer.js:341)
    at BlazeRenderer._load (renderer.js:258)
    at BlazeRenderer.proceed (renderer.js:198)
    at BlazeRenderer.startQueue (renderer.js:98)
    at BlazeRenderer.render (renderer.js:90)
    at Route.action [as _action] (main.js:34)
    at Route.callAction (route.js:304)

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:17 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
dr-dimitrucommented, Mar 11, 2020

Hope this one related and will be fixed by #73 and #74 //cc @jankapunkt

0reactions
dr-dimitrucommented, Nov 27, 2019

@arggh opening this issue due to your report

//cc @thearabbit

Read more comments on GitHub >

github_iconTop Results From Across the Web

Query parameters persist after navigation · Issue #170 - GitHub
queryParams object still holds the parameters from the view-invoice page, even though the user was taken to a new route with no parameters....
Read more >
URLs and Routing - Meteor Guide
FlowRouter.getQueryParam(paramName) returns the value of a single URL query parameter. In our example of the list page from the Todos app, we access ......
Read more >
angular - On query parameters change, route is not updating
Supposing we are here : some_url/deposits-withdrawals and we wish to navigate , changing only parameters. let url = "id=2&num=12321344" this.
Read more >
React router detect page refresh
We check that the performance. The second way to re-render a react component is by calling a setState () with the same state...
Read more >
Angular Basics: Using Query Params in Angular Routing
Today we will look at how we can pass query parameters to the URL of ... the query parameters that suit our users'...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found