Store: 馃悶[BUG]: Infinite redirect with Angular 8 but not Angular 7

Created on 24 Oct 2019  路  3Comments  路  Source: ngxs/store

Affected Package


The issue is caused by package @ngxs/store and @ngxs/router-plugin

Is this a regression?


No

Description


Navigating from route with query parameters to one without them causes an infinite redirect in Angular 8 but not Angular 7 with both NGXS 3.4.3 and 3.5.1

馃敩 Minimal Reproduction

Initial route: localhost:4200?dialedNumber=5555555
Action handler:

  @Action(RouterNavigation)
  handleQueryParams(
    { dispatch }: StateContext<HomeStateModel>,
    { routerState }: RouterNavigation,
  ) {
    const queryParams = routerState.root.queryParams;
    const { dialedNumber } = queryParams;
    if (dialedNumber) {
      return dispatch(
        new Navigate([routerState.url.split('?')[0]]),
      );
    }
  }


Go ahead and close this issue if you need me to set up a stackblitz. I realized I don't technically need this in my app, so take this issue or leave it. If somebody else has this issue, feel free to give your own stackblitz they can use, or copy this issue text and create your own.

馃敟 Exception or Error




Throttling navigation to prevent the browser from hanging. See https://crbug.com/882238. Command line switch --disable-ipc-flooding-protection can be used to bypass the protection

Environment


Libs:
- @angular/core version: 8.2.10 (issue doesn't exist in 7.2.0)
- @ngxs/store version: 3.5.1 and 3.4.3


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:
- Node version: XX  
- Platform:  

Others:

plugins critical released has PR bufix

Most helpful comment

@mfp22 Thanks for the reproduction! That has been really helpful to debug this.
We were able to use that to reproduce in a test.

All 3 comments

@mfp22 Thanks for the reproduction! That has been really helpful to debug this.
We were able to use that to reproduce in a test.

Guys, what about status of this issue?

Try @dev version

Was this page helpful?
0 / 5 - 0 ratings