Route Execution in Loops
Overview
AppNavi detects route loops when a configured Route redirects users between pages repeatedly instead of allowing the Route to continue normally.
This can happen when the URL configured in a Route does not match the application's actual navigation behavior. For example, the Route redirects a user to a URL that the application automatically redirects elsewhere, causing repeated page reloads.
AppNavi includes a loop detection mechanism to stop repeated reloads and help prevent an endless redirect cycle.
By configuring the redirect setting, you instruct AppNavi to direct your application to a specific URL. However, it appears that your application is attempting to redirect the user to another page, resulting in a loop.
AppNavi continuously reloads the page when an "illegal" URL is used in a route.
Example
Suppose a Route step was originally captured on this URL:
Later, the Relative Path is changed to:
and user disable prevent redirect, now the step will redirect to a changed URL which then results into loop

When Does a Route Loop Occur?
A route loop can occur when:
- The configured URL redirects to another page automatically.
- The application redirects users away from the URL configured in the Route.
- The Relative Path setting points to a URL that triggers an unexpected redirect.
- The Prevent Redirect setting is disabled, allowing the Route to navigate to a URL that causes a redirect loop.
The only way to halt this reloading is by removing the runtime property from localStorage.
How AppNavi Detects a Route Loop
AppNavi uses an internal loop detection mechanism to identify repeated page reloads.
When the page refreshes more than five times due to loop detection, AppNavi clears the runtime state and resets the appnavi_refresh_count property to 0 when its value is 5 or greater. A warning is displayed, such as:
We have detected a route loop, please check the settings in the planner.
This mechanism helps stop repeated reloads and prevents an endless navigation cycle between the application and AppNavi.

Route loop detection warning
AppNavi features an internal loop detection system that cancels the route if such a loop is detected. Without this, there could be an endless loop between your application and AppNavi.
How to Troubleshoot a Route Loop
As this issue does not seem to be product-related, we can only advise user to select a different URL that your application does not redirect to. You can then update the target URL in the "Relative Path" field accordingly.
Follow these steps if a Route repeatedly reloads the application page.
Step 1: Identify the URL causing the loop
- Check the URL configured in the Route step and compare it with the URL displayed in the browser.
- Determine whether the application automatically redirects the configured URL to another page.
Step 2: Review the Relative Path setting
- Open the affected Route in the AppNavi Editor and locate the step's URL configuration.
- Review the Relative Path value and confirm that it points to the intended page.
- If the URL has been changed, verify that the new URL does not trigger an unwanted redirect.
Step 3: Check the redirect configuration
- Review the Prevent Redirect setting and confirm that its configuration matches the intended navigation behavior.
- If the application redirects users automatically, avoid configuring the Route to navigate to a URL that causes repeated redirects.
Step 4: Update the URL
- Choose a URL that the application can open without triggering the redirect loop.
- Update the Relative Path field with the corrected URL, then save and test the Route again.
Updated 11 days ago