-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
After Angular 7 upgrade I started having problems with the Store Router Connector #1373
Comments
This should be resolved when we finished the upgrade to Angular 7. |
Estimated time? |
Any Estimated time when 7 will be out? |
Got the same issue. Or is there any way I can update to version Angular 6.1? |
Any workaround for now? |
Fixed via #1379 6.1.1 will be published today with the fix |
|
Weird, I am actually still getting an infinite loop with 6.1.1, and a similar error in Safari as the op. |
Could you reproduce it in a repo or in stackblitz? |
@timdeschryver Try this https://github.com/pedep/ngrx-router-crash I can get this to crash my tab pretty consistently on my 2012mbp/firefox63 and my thinkpadx220+linux/chrome55
which triggers this (chain hops off somewhere, leading to platform/modules/router-store/src/router_store_module.ts Lines 284 to 288 in 236462e
The navigation redirects to the guarded url again, triggering another ROUTER_CANCEL , beginning over at the top.
For some reason,
If it succeeds without hanging the browser, you can try refresh or refresh with devtools closed (which is a factor for some reason...), or a incognito window. In my own attempt at understanding the issue, i tried adding platform/modules/router-store/src/router_store_module.ts Lines 338 to 343 in 236462e
and also here
in the success case ( no loop ) it goes while the failure case (infinite loop -> crash tab) it goes |
Thanks @pedep ! |
This is my bad. While testing the fix I was still using Angular 6, resulting in a false positive. @brandonroberts when #1392 gets merged, we'll need another release. |
Fixed via #1392 and published in |
I am using the 7.0.0-beta and also encounter this issue. Is this also fixes in the 7.0 release? |
The fix on version Angular 7.0.1. |
I couldn't reproduce it, feel free to open up a new issue with a reproduction. |
Minimal reproduction of the bug/regression with instructions:
Stackblitz seed is still on Angular 6.1.0, this occurs with Angular 7.0
When using a Route Guard to check if user is authenticated I will get the following error if the user is not authenticated and the Guard logic return false and I redirect to a login route.
The browser console reports:
Throttling history state changes to prevent the browser from hanging.
authentication.guard.ts
Expected behavior:
The guard should work as it did with Angular 6, if the Guard logic determines the user is not authenticated then returning false to the router and then calling navigate should take me to the desired redirect without errors.
After disconnecting the StoreRouterConnectingModule from my app it works as expected.
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s):
NGRX: v6.1.0
Angular: v7
Node: v8.9.0
Chrome
Linux CentOs 7.5
Other information:
I would be willing to submit a PR to fix this issue
[ ] Yes (Assistance is provided if you need help submitting a pull request)
[ x] No
The text was updated successfully, but these errors were encountered: