Wednesday 9 February 2022

Angular Routing Mistake . Angular URL loop : Throttling navigation to prevent the browser from hanging. Command line switch –disable-ipc-flooding-protection can be used to bypass the protection

"Throttling navigation to prevent the browser from hanging. Command line switch –disable-ipc-flooding-protection can be used to bypass the protection"


Hi , if you are facing above issue then the Angular navigation stuck in a loop.

Possible root cause is Angular not able to detect the route name or wrong route name is given routing module. 

Consider an example:

 1. You are in login page[/login] and on success you will  redirect to home page[/home]

 2. Consider if no route is found for home then we will redirect to login page [/login] . 

 3. Now if we keep the wrong name or  with slash to the home routing url [path: '/home' or  path: 'home1'] in the routing module then Angular cannot find the path and hence it redirect user to login page. 

 4. But at this point you already authenticated user with login button click and have current user in ur local storage. This will push the router navigation again to home page . 

 5. So, Login to Home --> not able to find Home path because we gave it '/home' or home1  --->   Redirect to Login component --> Login component sees authentication succesful and token is available and hence ---> redirect again to Home  --> not able to find home , so go back to login 


   ABOVE scenario formed a CIRCULAR loop by which we ll receive above message from Angular. 


Kindly rectify your routes and see there is no circular dependencies. 

No comments:

Post a Comment