{"record":{"id":"0eb5ade20bc2c9b9","repo":"angular/angular","slug":"missing-ssr-content-integrity-marker","errorCode":"MISSING_SSR_CONTENT_INTEGRITY_MARKER","errorMessage":"Angular hydration logic detected that HTML content of this page was modified after it was produced during server side rendering. Make sure that there are no optimizations that remove comment nodes from HTML enabled on your CDN. Angular hydration relies on HTML produced by the server, including whitespaces and comment nodes.","messagePattern":"Angular hydration logic detected that HTML content of this page was modified after it was produced during server side rendering\\. Make sure that there are no optimizations that remove comment nodes from HTML enabled on your CDN\\. Angular hydration relies on HTML produced by the server, including whitespaces and comment nodes\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"packages/core/src/hydration/utils.ts","lineNumber":801,"sourceCode":"  // Check if the HTML parser may have moved the marker to just before the <body> tag,\n  // e.g. because the body tag was implicit and not present in the markup. An implicit body\n  // tag is unlikely to interfer with whitespace/comments inside of the app's root element.\n\n  // Case 1: Implicit body. Example:\n  //   <!doctype html><head><title>Hi</title></head><!--nghm--><app-root></app-root>\n  const beforeBody = skipTextNodes(doc.body.previousSibling);\n  if (isSsrContentsIntegrity(beforeBody)) {\n    return;\n  }\n\n  // Case 2: Implicit body & head. Example:\n  //   <!doctype html><head><title>Hi</title><!--nghm--><app-root></app-root>\n  let endOfHead = skipTextNodes(doc.head.lastChild);\n  if (isSsrContentsIntegrity(endOfHead)) {\n    return;\n  }\n\n  throw new RuntimeError(\n    RuntimeErrorCode.MISSING_SSR_CONTENT_INTEGRITY_MARKER,\n    typeof ngDevMode !== 'undefined' &&\n      ngDevMode &&\n      'Angular hydration logic detected that HTML content of this page was modified after it ' +\n        'was produced during server side rendering. Make sure that there are no optimizations ' +\n        'that remove comment nodes from HTML enabled on your CDN. Angular hydration ' +\n        'relies on HTML produced by the server, including whitespaces and comment nodes.',\n  );\n}\n","sourceCodeStart":783,"sourceCodeEnd":811,"githubUrl":"https://github.com/angular/angular/blob/51cb07e98081ab7e4e84a9e0949266a8e19cca84/packages/core/src/hydration/utils.ts#L783-L811","documentation":"Error \"Angular hydration logic detected that HTML content of this page was modified after it was produced during server side rendering. Make sure that there are no optimizations that remove comment nodes from HTML enabled on your CDN. Angular hydration relies on HTML produced by the server, including whitespaces and comment nodes.\" thrown in angular/angular.","triggerScenarios":"Thrown at packages/core/src/hydration/utils.ts:801 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Disable CDN/hosting optimizations that strip comment nodes or whitespace from the SSR HTML."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"51cb07e98081ab7e4e84a9e0949266a8e19cca84","analyzedAt":"2026-08-22T07:04:54.531Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}