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
Router initializer never completes if initial navigation fails #44355
Comments
This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list. You can find more details about the feature request process in our documentation. |
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends. Find more details about Angular's feature request process in our documentation. |
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage. We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package. You can find more details about the feature request process in our documentation. |
reproduction: https://stackblitz.com/edit/angular-ivy-router-base-4rgd9r?file=src%2Fapp%2Fapp.module.ts Opening the app to a URL that doesn't exist shows |
Previously, if initialNavigation were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
Previously, if initialNavigation were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
Previously, if initialNavigation were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
Adds additional tests to verify `enabledBlocking` functionality. The initial attempt to fix angular#44355 would have broken the scenario where a new navigation cancels the initial navigation. We also cannot rely on `NavigationError` like the example workaround in that issue report is doing because there won't be one if a guard simply rejects the initial nav (angular#16211).
Adds additional tests to verify `enabledBlocking` functionality. The initial attempt to fix angular#44355 would have broken the scenario where a new navigation cancels the initial navigation. We also cannot rely on `NavigationError` like the example workaround in that issue report is doing because there won't be one if a guard simply rejects the initial nav (angular#16211).
Adds additional tests to verify `enabledBlocking` functionality. The initial attempt to fix angular#44355 would have broken the scenario where a new navigation cancels the initial navigation. We also cannot rely on `NavigationError` like the example workaround in that issue report is doing because there won't be one if a guard simply rejects the initial nav (angular#16211).
Adds additional tests to verify `enabledBlocking` functionality. The initial attempt to fix angular#44355 would have broken the scenario where a new navigation cancels the initial navigation. We also cannot rely on `NavigationError` like the example workaround in that issue report is doing because there won't be one if a guard simply rejects the initial nav (angular#16211).
Adds additional tests to verify `enabledBlocking` functionality. The initial attempt to fix angular#44355 would have broken the scenario where a new navigation cancels the initial navigation. We also cannot rely on `NavigationError` like the example workaround in that issue report is doing because there won't be one if a guard simply rejects the initial nav (angular#16211).
Adds additional tests to verify `enabledBlocking` functionality. The initial attempt to fix angular#44355 would have broken the scenario where a new navigation cancels the initial navigation. We also cannot rely on `NavigationError` like the example workaround in that issue report is doing because there won't be one if a guard simply rejects the initial nav (angular#16211).
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
Adds additional tests to verify `enabledBlocking` functionality. The initial attempt to fix angular#44355 would have broken the scenario where a new navigation cancels the initial navigation. We also cannot rely on `NavigationError` like the example workaround in that issue report is doing because there won't be one if a guard simply rejects the initial nav (angular#16211).
Adds additional tests to verify `enabledBlocking` functionality. The initial attempt to fix angular#44355 would have broken the scenario where a new navigation cancels the initial navigation. We also cannot rely on `NavigationError` like the example workaround in that issue report is doing because there won't be one if a guard simply rejects the initial nav (angular#16211).
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
Adds additional tests to verify `enabledBlocking` functionality. The initial attempt to fix #44355 would have broken the scenario where a new navigation cancels the initial navigation. We also cannot rely on `NavigationError` like the example workaround in that issue report is doing because there won't be one if a guard simply rejects the initial nav (#16211). PR Close #45733
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
…pletes Previously, if `initialNavigation` were set to `enabledBlocking`, the Router's `APP_INITIALIZER` would never resolve if that initial navigation failed. This results in the application load hanging and never completing. fixes angular#44355
Which @angular/* package(s) are relevant/releated to the feature request?
router
Description
Rendering an app in SSR (using nguniversal) with an invalid URL (e.g. http://localhost:4200/electronics-spa/en/USD/Brands/Canon/c/brand_10%20or%20(1,2)=(select*from(select%20name_const(CHAR(82,88,106,99,113,78,74,70,73,118,87),1),name_const(CHAR(82,88,106,99,113,78,74,70,73,118,87),1))a)%20--%20and%201%3D1) causes the render to hang, and never release the taken resources.
The reason is that the navigation never completes on error, when the
Router
optioninitialNavigation
is set toenabled
.Proposed solution
Expose
RouterInitializer
.EDIT: or make the router complete the navigation on error, if that makes sense.
Alternatives considered
We came up with this workaround, but it would be nice if
ɵangular_packages_router_router_h
could be exposed.The above workaround is for ng12.
I noticed that in ng13 there's no similar private API available, unless I'm missing something.
The text was updated successfully, but these errors were encountered: