Error Encyclopedia

Hydration Missing Node on Path

Production builds show this error when Angular can't find a node during hydration. Angular follows a path that it saved during server-side rendering, but a node on this path is missing. This means that the DOM in the browser is different from the HTML from the server.

Production builds don't include error messages, so you see only the code NG0509. Development builds show the same problem as error NG0502, and the message tells you the host node and the path.

Common causes

The causes are the same as for error NG0500. Also check for changes from outside your application, for example from a CDN feature or a browser extension. Read CDNs and browser extensions in the hydration guide.

Debugging the error

  • If you can see the problem in a development build, use that build. The NG0502 message tells you the host node and the path.
  • Compare the HTML from production with the HTML from your local server. If you see __cf_email__ elements, or if comment nodes are missing, a CDN feature is probably the cause.
  • Open the page in a browser profile with no extensions. If the error goes away, an extension is changing the page.