{"record":{"id":"2bcc183db707a419","repo":"vercel/next.js","slug":"warning-failed-to-re-render-we-will-retry-on-the","errorCode":null,"errorMessage":"Warning: Failed to re-render. We will retry on the next Fast Refresh event.\n${err}","messagePattern":"Warning: Failed to re-render\\. We will retry on the next Fast Refresh event\\.\n(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/react-refresh-utils/internal/helpers.ts","lineNumber":171,"sourceCode":"\nvar isUpdateScheduled: boolean = false\n// This function aggregates updates from multiple modules into a single React Refresh call.\nfunction scheduleUpdate() {\n  if (isUpdateScheduled) {\n    return\n  }\n  isUpdateScheduled = true\n\n  function canApplyUpdate(status: ModuleHotStatus) {\n    return status === 'idle'\n  }\n\n  function applyUpdate() {\n    isUpdateScheduled = false\n    try {\n      RefreshRuntime.performReactRefresh()\n    } catch (err) {\n      console.warn(\n        'Warning: Failed to re-render. We will retry on the next Fast Refresh event.\\n' +\n          err\n      )\n    }\n  }\n\n  if (canApplyUpdate(module.hot.status())) {\n    // Apply update on the next tick.\n    Promise.resolve().then(() => {\n      applyUpdate()\n    })\n    return\n  }\n\n  const statusHandler = (status) => {\n    if (canApplyUpdate(status)) {\n      module.hot.removeStatusHandler(statusHandler)\n      applyUpdate()","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/react-refresh-utils/internal/helpers.ts#L153-L189","documentation":"In react-refresh-utils' applyUpdate (scheduled by scheduleUpdate), performReactRefresh() runs inside try/catch; if the React refresh runtime throws while re-rendering after a hot update, this warning is logged and the update is retried on the next Fast Refresh event instead of crashing.","triggerScenarios":"Thrown at packages/react-refresh-utils/internal/helpers.ts:171 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the reported error in your code; Fast Refresh will retry rendering on the next edit.","If stuck, do a full page reload."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}