{"record":{"id":"6c7f95013c085178","repo":"facebook/react","slug":"161","errorCode":"161","errorMessage":"Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.","messagePattern":"Invalid host parent fiber\\. This error is likely caused by a bug in React\\. Please file an issue\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-reconciler/src/ReactFiberCommitHostEffects.js","lineNumber":538,"sourceCode":"        parent,\n        parentFragmentInstances,\n      );\n      break;\n    }\n    case HostRoot:\n    case HostPortal: {\n      const parent: Container = hostParentFiber.stateNode.containerInfo;\n      const before = getHostSibling(finishedWork);\n      insertOrAppendPlacementNodeIntoContainer(\n        finishedWork,\n        before,\n        parent,\n        parentFragmentInstances,\n      );\n      break;\n    }\n    default:\n      throw new Error(\n        'Invalid host parent fiber. This error is likely caused by a bug ' +\n          'in React. Please file an issue.',\n      );\n  }\n}\n\nfunction commitImmutablePlacementNodeToFragmentInstances(\n  finishedWork: Fiber,\n  parentFragmentInstances: null | Array<FragmentInstanceType>,\n): void {\n  if (!enableFragmentRefs) {\n    return;\n  }\n  const isHost =\n    finishedWork.tag === HostComponent ||\n    // $FlowFixMe[constant-condition]\n    (supportsSingletons ? finishedWork.tag === HostSingleton : false);\n  if (isHost) {","sourceCodeStart":520,"sourceCodeEnd":556,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-reconciler/src/ReactFiberCommitHostEffects.js#L520-L556","documentation":"commitPlacement() found a host parent fiber whose tag matched no case in the placement switch - only HostSingleton, HostComponent, HostRoot, and HostPortal are handled. The set of tags the walker accepts (isHostParent) and the set the switch handles must agree; disagreement means the fiber came from React internals with a different feature set than the host config running the commit.","triggerScenarios":"Version skew: a react-reconciler copy emitting newer host tags (for example HostSingleton) paired with an older renderer; a custom renderer built with supportsSingletons: false receiving HostSingleton fibers; host feature flags mismatched between reconciler and renderer packages.","commonSituations":"Custom renderers (ink, react-three-fiber, react-pdf) whose pinned react-reconciler resolves to a different version than the app's react; partially upgraded monorepos; bundler aliases resolving react-dom to an older copy.","solutions":["Dedupe react, react-dom, and react-reconciler to one version using npm overrides/resolutions","Upgrade the custom renderer package so its reconciler matches your react version","Renderer maintainers: rebuild against the react-reconciler version you ship","If all versions align, file an issue with the fiber tag number from the component stack"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import {version} from 'react';\nimport * as reconciler from 'react-reconciler';\nif (reconciler.version && reconciler.version.split('.')[0] !== version.split('.')[0]) {\n  throw new Error(`react ${version} + react-reconciler ${reconciler.version}: align versions before rendering`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep react, react-dom, and every react-reconciler-based renderer on the same release","Verify host config feature flags (supportsSingletons, supportsMutation) match the environment you render into","Run npm ls react react-dom react-reconciler in CI and fail on duplicates"],"tags":["version-mismatch","custom-renderer","placement","host-config"],"backgroundTag":"host-parent-not-found","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}