-
Notifications
You must be signed in to change notification settings - Fork 402
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
🐞[BUG]: CanActivate & CanLoad cause the browser to hang if they cause a navigation in their logic #1293
Comments
Show me full example on stackblitz |
Closing until reproduction is provided :) |
Here is the stackblitz: I've commented canActivate, as soon as you uncomment it, you'll get the hanging/throttle error. If i downgrade to 3.4.3 it works fine. Looking at it, it might have something to do with the empty path which children routes. If i try the canActivate elsewhere its fine. |
@johnwalshuk I also am experiencing an issue with 3.5.1. Downgrading to 3.5.0 is good enough, or if you comment this line in 3.5.1 https://github.com/ngxs/store/pull/1236/files#diff-96aa2bf67839c8810b8cab91460e8323R160 cc: @markwhitfeld |
I'm experiencing the same issue using version: 3.5.1 on every major browser. |
I also experienced the same problem. Dispatching a Navigate action in CanActivate hangs the browser. If you turn on 'enableTracing' in Angular's Router ( |
I have the same issue |
@arturovt help us |
I have the same issue using @angular/core: 8.2.11, but this issue only occurs by executing the build command, using the serve command works fine |
So what is current solution for this bug? Because I got the same error but I don't use ngxStore |
This is very annoying. It took me two days to realize that the error was from me adding this module to my app. @GrumWald I'll suggest getting back 3.5.0 |
I am facing the same issue. I am using CanActivate. |
@nehal076 Try using |
Why do you need to make this modification? There was no problem running the program before. This problem occurred with npm start after I cloned the code from the git repository today. I used your solution to run successfully, but I can't understand it. If you can tell me the reason, I would be very grateful. |
|
I have de same bug |
Affected Package
Possibly:
Is this a regression?
No
Description
CanActivate causes the browser to hang if it causes a navigation in its logic. Chrome reports the following error:
The way I've got around this issue is to add a
setTimeout
.🔬 Minimal Reproduction
🔥 Exception or Error
Environment
Libs:
Browser:
For Tooling issues:
The text was updated successfully, but these errors were encountered: