{"record":{"id":"a9254a3d076ccd49","repo":"facebook/react","slug":"558-a9254a","errorCode":"558","errorMessage":"Client rendering an Activity suspended it again. This is a bug in React.","messagePattern":"Client rendering an Activity suspended it again\\. This is a bug in React\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-reconciler/src/ReactFiberCompleteWork.js","lineNumber":1538,"sourceCode":"          if (workInProgress.flags & ForceClientRender) {\n            popSuspenseHandler(workInProgress);\n            // Special case. There were remaining unhydrated nodes. We treat\n            // this as a mismatch. Revert to client rendering.\n            return workInProgress;\n          } else {\n            popSuspenseHandler(workInProgress);\n            // Did not finish hydrating, either because this is the initial\n            // render or because something suspended.\n            return null;\n          }\n        }\n\n        if ((workInProgress.flags & DidCapture) !== NoFlags) {\n          // We called retryActivityComponentWithoutHydrating and tried client rendering\n          // but now we suspended again. We should never arrive here because we should\n          // not have pushed a suspense handler during that second pass and it should\n          // instead have suspended above.\n          throw new Error(\n            'Client rendering an Activity suspended it again. This is a bug in React.',\n          );\n        }\n\n        // Continue with the normal Activity path.\n      }\n\n      bubbleProperties(workInProgress);\n      return null;\n    }\n    case SuspenseComponent: {\n      const nextState: null | SuspenseState = workInProgress.memoizedState;\n\n      // Special path for dehydrated boundaries. We may eventually move this\n      // to its own fiber type so that we can add other kinds of hydration\n      // boundaries that aren't associated with a Suspense tree. In anticipation\n      // of such a refactor, all the hydration logic is contained in\n      // this branch.","sourceCodeStart":1520,"sourceCodeEnd":1556,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-reconciler/src/ReactFiberCompleteWork.js#L1520-L1556","documentation":"Thrown while completing an Activity component during hydration. If hydrating an <Activity> boundary fails, React retries it with client rendering (retryActivityComponentWithoutHydrating); that retry is expected to render synchronously without a suspense handler. If the second, hydration-free pass suspends again (DidCapture flag set), this invariant fires — React would loop forever otherwise.","triggerScenarios":"An <Activity> subtree fails hydration (mismatched markup) AND its children suspend again during the client-render retry — e.g., a lazy component or suspending data fetch inside <Activity mode=\"hidden\"> whose server HTML doesn't match or is missing.","commonSituations":"Apps using the new <Activity> component together with streaming SSR, lazy() boundaries, or suspense-backed data caches, where hydration mismatches and suspending children coincide. Mostly seen on experimental/canary React builds.","solutions":["Fix the underlying hydration mismatch inside the Activity boundary so the client retry never has to run.","Ensure children of a mismatched Activity boundary can render without suspending on the client (preload lazy components / warm caches before hydrate).","Upgrade to the latest canary React — Activity hydration is actively worked on; if it persists, file an issue with a repro."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// ErrorBoundary is the only runtime containment; fix the mismatch underneath it\nclass ActivityBoundary extends React.Component {\n  state = {failed: false};\n  static getDerivedStateFromError() { return {failed: true}; }\n  render() { return this.state.failed ? this.props.fallback : this.props.children; }\n}","preventionTips":["Preload/warm lazy components and suspense caches before hydrateRoot for <Activity> subtrees","Validate server markup matches client tree inside Activity boundaries","Pin a known-good canary version once Activity hydration works for you"],"tags":["activity","hydration","suspense","react-internal","invariant"],"backgroundTag":"hydration-mismatch","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}