{"record":{"id":"0830d891fa82891d","repo":"facebook/react","slug":"452","errorCode":"452","errorMessage":"React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.","messagePattern":"React expected an <html> element \\(document\\.documentElement\\) to exist in the Document but one was not found\\. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js","lineNumber":4834,"sourceCode":"  props: Props,\n  rootContainerInstance: Container,\n  hostContext: HostContext,\n  validateDOMNestingDev: boolean,\n): Instance {\n  if (__DEV__) {\n    const hostContextDev = hostContext as any as HostContextDev;\n    if (validateDOMNestingDev) {\n      validateDOMNesting(type, hostContextDev.ancestorInfo);\n    }\n  }\n  const ownerDocument = getOwnerDocumentFromRootContainer(\n    rootContainerInstance,\n  );\n  switch (type) {\n    case 'html': {\n      const documentElement = ownerDocument.documentElement;\n      if (!documentElement) {\n        throw new Error(\n          'React expected an <html> element (document.documentElement) to exist in the Document but one was' +\n            ' not found. React never removes the documentElement for any Document it renders into so' +\n            ' the cause is likely in some other script running on this page.',\n        );\n      }\n      return documentElement;\n    }\n    case 'head': {\n      const head = ownerDocument.head;\n      if (!head) {\n        throw new Error(\n          'React expected a <head> element (document.head) to exist in the Document but one was' +\n            ' not found. React never removes the head for any Document it renders into so' +\n            ' the cause is likely in some other script running on this page.',\n        );\n      }\n      return head;\n    }","sourceCodeStart":4816,"sourceCodeEnd":4852,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js#L4816-L4852","documentation":"Error \"React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.\" thrown in facebook/react.","triggerScenarios":"Thrown at packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js:4834 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}