-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
NavigationError EmptyError: no elements in sequence since upgrade to 14.1 #47089
Comments
Please provide a minimal reproduction of the issue in order for us to investigate. |
Given the information you've provided, here's a reproduction showing the mentioned config works: https://stackblitz.com/edit/angular-ivy-htfvw6?file=src%2Fmain.ts,src%2Fstyles.css |
@atscott I will try to reproduce this error. It is failing in a big micro frontend project so not that easy to reconfigure. But for sure since the upgrade, the routing isn't working in the same way. When I downgrade, it works again. |
@jogelin I'm certainly not disputing that you are encountering an issue. That said, we can't do any investigation without a way to reproduce it. |
@jogelin You mentioned you're using a micro frontend. In addition, your issue description mentions "NavigationError EmptyError". If you look at that bit of code, |
@atscott Good point, when I check this part, the error is re-thrown: Below, is my console error, this is why I specified I noticed that sometimes in the same file, we are use this approach: if (e instanceof EmptyError || e.name === 'EmptyError') { If the test is the same, I think it would correctly catch the error. (I'll check tomorrow ;) ) |
Some versions of rxjs cause the algorithm used in the Router to not recognize Route configs correctly. This commit updates the algorithm to be compatible in the same way as other code locations internally. Context: angular@1160b81 fixes angular#47089 Note: This does not have a test because I was unable to identify the version of rxjs that would cause a failure here.
Some versions of rxjs cause the algorithm used in the Router to not recognize Route configs correctly. This commit updates the algorithm to be compatible in the same way as other code locations internally. Context: angular@1160b81 fixes angular#47089 Note: This does not have a test because I was unable to identify the version of rxjs that would cause a failure here.
Some versions of rxjs cause the algorithm used in the Router to not recognize Route configs correctly. This commit updates the algorithm to be compatible in the same way as other code locations internally. Context: angular@1160b81 fixes angular#47089 Note: This does not have a test because I was unable to identify the version of rxjs that would cause a failure here.
@atscott I applied the fix from your PR by using |
angular#47098) Some versions of rxjs cause the algorithm used in the Router to not recognize Route configs correctly. This commit updates the algorithm to be compatible in the same way as other code locations internally. Context: angular@1160b81 fixes angular#47089 Note: This does not have a test because I was unable to identify the version of rxjs that would cause a failure here. PR Close angular#47098
#47098) (#47112) Some versions of rxjs cause the algorithm used in the Router to not recognize Route configs correctly. This commit updates the algorithm to be compatible in the same way as other code locations internally. Context: 1160b81 fixes #47089 Note: This does not have a test because I was unable to identify the version of rxjs that would cause a failure here. PR Close #47098 PR Close #47112
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Which @angular/* package(s) are the source of the bug?
router
Is this a regression?
Yes
Description
Hello,
Since the upgrade from Angular 14.0.6 to 14.1.1, all of your routing configurations are broken because rxjs is throwing an EmptyError when processing the routing.
After some searching, I found that it is related to the commit 72e6a94 from @atscott
It seems that the observable
processSegment
is closed before emitting a value:I suspect the
first
operator above.My routing configuration:
WHen I remove the last config:
It works !!
Any ideas?
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: