{"record":{"id":"28b444ed879a33b6","repo":"facebook/react","slug":"expected-overridesuspensemilestone-to-not-get-ca","errorCode":null,"errorMessage":"Expected overrideSuspenseMilestone() to not get called for earlier React versions.","messagePattern":"Expected overrideSuspenseMilestone\\(\\) to not get called for earlier React versions\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-devtools-shared/src/backend/fiber/renderer.js","lineNumber":7567,"sourceCode":"    if (!forceFallback && typeof scheduleRetry === 'function') {\n      // If we're unsuspending and the renderer supports it, use a Retry instead of Sync\n      // to allow for things like View Transitions to proceed the way they would for real.\n      scheduleRetry(fiber);\n    } else {\n      scheduleUpdate(fiber);\n    }\n  }\n\n  /**\n   * Resets the all other roots of this renderer.\n   * @param suspendedSet List of IDs of SuspenseComponent Fibers\n   */\n  function overrideSuspenseMilestone(suspendedSet: Array<FiberInstance['id']>) {\n    if (\n      typeof setSuspenseHandler !== 'function' ||\n      typeof scheduleUpdate !== 'function'\n    ) {\n      throw new Error(\n        'Expected overrideSuspenseMilestone() to not get called for earlier React versions.',\n      );\n    }\n\n    const unsuspendedSet: Set<Fiber> = new Set(forceFallbackForFibers);\n\n    let resuspended = false;\n    for (let i = 0; i < suspendedSet.length; ++i) {\n      const instance = idToDevToolsInstanceMap.get(suspendedSet[i]);\n      if (instance === undefined) {\n        console.warn(\n          `Could not suspend ID '${suspendedSet[i]}' since the instance can't be found.`,\n        );\n        continue;\n      }\n\n      if (instance.kind === FIBER_INSTANCE) {\n        const fiber = instance.data;","sourceCodeStart":7549,"sourceCodeEnd":7585,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-devtools-shared/src/backend/fiber/renderer.js#L7549-L7585","documentation":"overrideSuspenseMilestone(suspendedSet) is the bulk variant used to force a whole set of Suspense boundaries to a milestone state (suspend all listed, resume the rest). Like the single-boundary override it requires setSuspenseHandler and scheduleUpdate from the renderer; on React versions that predate those DevTools hooks it throws, because there is no API to install the bulk handler.","triggerScenarios":"A bulk suspend/unsuspend action (milestone navigation in the profiler/components UI, or a custom frontend sending the corresponding bridge message with an ID array) while the attached renderer is older than the version that introduced setSuspenseHandler/scheduleUpdate.","commonSituations":"Newer DevTools frontend driving an older pinned React renderer; embedding devtools-shared and wiring milestone controls without capability checks; renderers swapped by HMR.","solutions":["Upgrade the page's React to a version that injects setSuspenseHandler and scheduleUpdate.","Before sending the milestone action, verify supportsTogglingSuspense/canToggleSuspense for the renderer and every id in the set.","Reload the page to re-run capability detection after renderer changes.","If you maintain a custom frontend, disable milestone controls when the capability check fails instead of sending the message."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before a bulk/milestone suspend, verify the renderer capability once\nconst renderer = hook.renderers.get(rendererID);\nconst canMilestone =\n  typeof renderer?.setSuspenseHandler === 'function' &&\n  typeof renderer?.scheduleUpdate === 'function';\nif (canMilestone) {\n  bridge.send('overrideSuspenseMilestone', {ids, rendererID});\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Hide milestone/bulk-suspend controls when setSuspenseHandler or scheduleUpdate is missing from the renderer.","Re-check capabilities after any renderer swap (HMR) before issuing bulk operations.","Keep React and DevTools versions aligned."],"tags":["react-devtools","suspense","version-mismatch","legacy-react","bulk-operations"],"backgroundTag":"unsupported-react-version","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}