Title: Incremental Hydration throws error - Cannot read properties of undefined (reading 'p') on Client Side Navigation to this page · Issue #58359 · angular/angular · GitHub
Open Graph Title: Incremental Hydration throws error - Cannot read properties of undefined (reading 'p') on Client Side Navigation to this page · Issue #58359 · angular/angular
X Title: Incremental Hydration throws error - Cannot read properties of undefined (reading 'p') on Client Side Navigation to this page · Issue #58359 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description When using Incremental Hydration, the below code works but subsequent code throws error on client side navigation to this page from another ...
Open Graph Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description When using Incremental Hydration, the below code works but subsequent code throws error on client si...
X Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description When using Incremental Hydration, the below code works but subsequent code throws error on client si...
Opengraph URL: https://github.com/angular/angular/issues/58359
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incremental Hydration throws error - Cannot read properties of undefined (reading 'p') on Client Side Navigation to this page","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\ncore\n\n### Is this a regression?\n\nNo\n\n### Description\n\nWhen using Incremental Hydration, the below code works but subsequent code throws error on client side navigation to this page from another page:\n\nThis works:\n```\n@if (pageHeading() && !isLoggedIn()) {\n@defer(hydrate when isLoggedIn()) {\n\u003cdiv class=\"mat-card p15 pb7 mb10\">\n \u003ch1 class=\"mb10\">{{pageHeading()}}\u003c/h1>\n \u003cp class=\"mb10 paragraph\">{{pageDescription()}}\u003c/p>\n\u003c/div>\n}\n}\n\n```\n\nThis doesn't work:\n```\n@defer(hydrate when isLoggedIn()) {\n@if (pageHeading() && !isLoggedIn()) {\n\u003cdiv class=\"mat-card p15 pb7 mb10\">\n \u003ch1 class=\"mb10\">{{pageHeading()}}\u003c/h1>\n \u003cp class=\"mb10 paragraph\">{{pageDescription()}}\u003c/p>\n\u003c/div>\n}\n}\n```\n\nError\n\n```\ncore.mjs:7283 ERROR TypeError: Cannot read properties of undefined (reading 'p')\n at findFirstKnownParentDeferBlock (core.mjs:22378:54)\n at core.mjs:22414:7\n at Generator.next (\u003canonymous>)\n at chunk-4MWRP73S.js?v=7a14075d:76:61\n at new ZoneAwarePromise (zone.js:2702:25)\n at __async (chunk-4MWRP73S.js?v=7a14075d:60:10)\n at hydrateFromBlockNameImpl (core.mjs:22403:91)\n at core.mjs:22445:16\n at Generator.next (\u003canonymous>)\n at chunk-4MWRP73S.js?v=7a14075d:76:61\n```\n\nSimilarly when using the second code block, incremental hydration works as expected on hard page load i.e. when isLoggedIn() is true, this div gets removed. But that doesn't seem to be the case with the first code block.\n\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\ncore.mjs:7283 ERROR TypeError: Cannot read properties of undefined (reading 'p')\n at findFirstKnownParentDeferBlock (core.mjs:22378:54)\n at core.mjs:22414:7\n at Generator.next (\u003canonymous>)\n at chunk-4MWRP73S.js?v=7a14075d:76:61\n at new ZoneAwarePromise (zone.js:2702:25)\n at __async (chunk-4MWRP73S.js?v=7a14075d:60:10)\n at hydrateFromBlockNameImpl (core.mjs:22403:91)\n at core.mjs:22445:16\n at Generator.next (\u003canonymous>)\n at chunk-4MWRP73S.js?v=7a14075d:76:61\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n@angular-devkit/architect 0.1900.0-next.13\n@angular-devkit/build-angular 19.0.0-next.13\n@angular-devkit/core 18.2.4\n@angular-devkit/schematics 18.2.4\n@angular/cdk 19.0.0-next.10\n@angular/cli 19.0.0-next.13\n@angular/fire 18.0.1\n@angular/google-maps 19.0.0-next.10\n@angular/material 19.0.0-next.10\n@angular/pwa 19.0.0-next.13\n@angular/ssr 19.0.0-next.13\n@schematics/angular 18.2.4\nrxjs 7.8.1\ntypescript 5.6.2\nzone.js 0.15.0\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/naveedahmed1","@type":"Person","name":"naveedahmed1"},"datePublished":"2024-10-25T14:07:16Z","url":"https://github.com/angular/angular/issues/58359"}
| 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:41dcc6e5-849a-f911-a33e-55cd00732da4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D19C:22DB35:1C6AF63:244DD88:6B014798 |
| html-safe-nonce | e81a8a88f93c462a7c1457a6865374a67c795b69ef4fddf0b1c75ef953a2f27e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTlDOjIyREIzNToxQzZBRjYzOjI0NEREODg6NkIwMTQ3OTgiLCJ2aXNpdG9yX2lkIjoiNDU4MTgwNjU4MTI4NDQyMzU3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 64922fcc5859edac922ea6c93efc07e4fbf6f64d4f1073fabf2840041ae511eb |
| hovercard-subject-tag | issue:2614218694 |
| 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/58359/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5fe53b23290c1622ba8d3379c95aef41193538150de82af4374008667f3f9131/angular/angular/issues/58359 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5fe53b23290c1622ba8d3379c95aef41193538150de82af4374008667f3f9131/angular/angular/issues/58359 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description When using Incremental Hydration, the below code works but subsequent code throws error on client si... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | naveedahmed1 |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width