Title: NavigationError EmptyError: no elements in sequence since upgrade to 14.1 · Issue #47089 · angular/angular · GitHub
Open Graph Title: NavigationError EmptyError: no elements in sequence since upgrade to 14.1 · Issue #47089 · angular/angular
X Title: NavigationError EmptyError: no elements in sequence since upgrade to 14.1 · Issue #47089 · angular/angular
Description: 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 EmptyEr...
Open Graph Description: 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 br...
X Description: 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 br...
Opengraph URL: https://github.com/angular/angular/issues/47089
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"NavigationError EmptyError: no elements in sequence since upgrade to 14.1","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nrouter\n\n### Is this a regression?\n\nYes\n\n### Description\n\nHello,\r\n\r\nSince 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.\r\n\r\nAfter some searching, I found that it is related to the commit https://github.com/angular/angular/commit/72e6a948bb8ec58f14b87d297d5f81baf2e1942d from @atscott \r\n\r\nIt seems that the observable `processSegment` is closed before emitting a value:\r\n```typescript\r\n processSegment(injector, routes, segmentGroup, segments, outlet) {\r\n return from(routes).pipe(concatMap(r => {\r\n return this.processSegmentAgainstRoute(r._injector ?? injector, r, segmentGroup, segments, outlet);\r\n }), first((x) => !!x), catchError(e => {\r\n // THE ERROR IS THROWN HERE\r\n if (e instanceof EmptyError) {\r\n if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\r\n return of([]);\r\n }\r\n return of(null);\r\n }\r\n throw e;\r\n }));\r\n }\r\n```\r\nI suspect the `first` operator above.\r\n\r\nMy routing configuration:\r\n```\r\n{\r\n path: ':brandId',\r\n children: [\r\n { path: '', redirectTo: 'admin', pathMatch: 'full' },\r\n {\r\n path: 'admin',\r\n children: [\r\n {\r\n path: '',\r\n redirectTo: 'orga',\r\n pathMatch: 'full',\r\n },\r\n {\r\n path: 'orga',\r\n component: OrganizationComponent,\r\n children: [\r\n {\r\n path: 'test',\r\n component: DetailsComponent,\r\n },\r\n ],\r\n },\r\n ],\r\n },\r\n ],\r\n },\r\n```\r\n\r\nWHen I remove the last config:\r\n```\r\n children: [\r\n {\r\n path: 'test',\r\n component: DetailsComponent,\r\n },\r\n ],\r\n```\r\nIt works !!\r\n\r\nAny ideas?\n\n### Please provide a link to a minimal reproduction of the bug\n\n_No response_\n\n### Please provide the exception or error you saw\n\n_No response_\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 14.1.1\r\nNode: 16.15.0\r\nPackage Manager: yarn 1.22.15\r\nOS: darwin x64\r\n\r\nAngular: 14.1.1\r\n... animations, cdk, cli, common, compiler, compiler-cli, core\r\n... forms, language-service, material, platform-browser\r\n... platform-browser-dynamic, router\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1401.1\r\n@angular-devkit/build-angular 14.1.1\r\n@angular-devkit/core 14.1.1\r\n@angular-devkit/schematics 14.1.1\r\n@schematics/angular 14.1.1\r\nrxjs 7.5.6\r\ntypescript 4.7.4\r\nwebpack 5.73.0\r\n\r\n\r\nthe project is also using Nrwl/Nx:\r\n Node : 16.15.0\r\n OS : darwin x64\r\n yarn : 1.22.15\r\n\r\n nx : 14.5.4\r\n @nrwl/angular : 14.5.4\r\n @nrwl/cypress : 14.5.4\r\n @nrwl/detox : Not Found\r\n @nrwl/devkit : 14.5.4\r\n @nrwl/eslint-plugin-nx : 14.5.4\r\n @nrwl/express : Not Found\r\n @nrwl/jest : 14.5.4\r\n @nrwl/js : 14.5.4\r\n @nrwl/linter : 14.5.4\r\n @nrwl/nest : Not Found\r\n @nrwl/next : Not Found\r\n @nrwl/node : 14.5.4\r\n @nrwl/nx-cloud : Not Found\r\n @nrwl/nx-plugin : 14.5.4\r\n @nrwl/react : Not Found\r\n @nrwl/react-native : Not Found\r\n @nrwl/schematics : Not Found\r\n @nrwl/storybook : 14.5.4\r\n @nrwl/web : 14.5.4\r\n @nrwl/workspace : 14.5.4\r\n typescript : 4.7.4\r\n ---------------------------------------\r\n Community plugins:\r\n \t @auth0/auth0-angular: 1.10.0\r\n \t @cumul.io/ngx-cumulio-dashboard: 3.0.2\r\n \t @ngneat/edit-in-place: 1.6.1\r\n \t @ngneat/transloco: 4.1.1\r\n \t @ngrx/component: 14.0.2\r\n \t @ngrx/component-store: 14.0.2\r\n \t ng2-charts: 3.0.11\r\n \t single-spa-angular: 7.1.0\r\n \t @compodoc/compodoc: 1.1.19\r\n \t @ngneat/spectator: 11.1.0\r\n \t @storybook/angular: 6.5.9\r\n \t @twittwer/compodoc: 1.8.0\n```\n\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/jogelin","@type":"Person","name":"jogelin"},"datePublished":"2022-08-09T06:42:03Z","url":"https://github.com/angular/angular/issues/47089"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:72a87954-1f6b-3a9a-9bd9-deb149b9db53 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF56:19E4BB:BCC996:F23934:6B00FCB1 |
| html-safe-nonce | 1f7967055050cc0055b61678bdb7281e93f6174c31c5a849e480a4ac3042ef56 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjU2OjE5RTRCQjpCQ0M5OTY6RjIzOTM0OjZCMDBGQ0IxIiwidmlzaXRvcl9pZCI6Ijc2NDA4NTg4Mzg0MjEyNzM3NzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0dd2674578550338d3d65f5f1edef6dbe1c407f5b3ee57a9719bfeea98e03838 |
| hovercard-subject-tag | issue:1332787298 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/47089/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4b862541b2bfb33a3bca9570943aa27c6b6f1b18f828c1f3901ab44e9cae2e7f/angular/angular/issues/47089 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4b862541b2bfb33a3bca9570943aa27c6b6f1b18f828c1f3901ab44e9cae2e7f/angular/angular/issues/47089 |
| og:image:alt | 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 br... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jogelin |
| hostname | github.com |
| expected-hostname | github.com |
| None | e208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7dafd017fb7809a839c443dba08622af38e63c09 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width