{"record":{"id":"ddcab7f87f27a933","repo":"tinyhumansai/openhuman","slug":"onboarding-context-auto-advance-failed","errorCode":null,"errorMessage":"[onboarding:context] auto-advance failed","messagePattern":"\\[onboarding:context\\] auto-advance failed","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/pages/onboarding/steps/ContextGatheringStep.tsx","lineNumber":375,"sourceCode":"        window.clearTimeout(timer);\n        inFlight = false;\n      }\n    };\n\n    void probe();\n    const interval = window.setInterval(probe, ALIVE_PROBE_INTERVAL_MS);\n    return () => {\n      cancelled = true;\n      window.clearInterval(interval);\n    };\n  }, [stillWorking, finished, hasError]);\n\n  // Auto-navigate on successful completion (skip if user already clicked background link)\n  useEffect(() => {\n    if (finished && !hasError && !backgroundClickedRef.current) {\n      const t = setTimeout(() => {\n        void Promise.resolve(onNext()).catch(e => {\n          console.warn('[onboarding:context] auto-advance failed', e);\n          // Mirrors the manual click capture in ContextPage so the auto-\n          // advance failure mode is not a Sentry blind spot (#2081). The\n          // step tag distinguishes it from `continue-to-chat` clicks in\n          // the dashboard.\n          Sentry.captureException(e, {\n            tags: { flow: 'onboarding-complete', step: 'auto-advance' },\n          });\n          setHasError(true);\n        });\n      }, 800);\n      return () => clearTimeout(t);\n    }\n  }, [finished, hasError, onNext]);\n\n  if (finished && hasError) {\n    return (\n      <div className=\"rounded-2xl border border-line bg-surface p-8 shadow-soft animate-fade-up\">\n        <div className=\"flex flex-col items-center justify-center gap-5\">","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/pages/onboarding/steps/ContextGatheringStep.tsx#L357-L393","documentation":"Catch around the auto-advance navigation in ContextGatheringStep: after the context-gathering probe finished successfully (and the user had not clicked the background link), the delayed onNext() call to move to the next onboarding step rejected. The warn is logged instead of surfacing an error screen — the step stays on screen and the user can still advance manually.","triggerScenarios":"Thrown at app/src/pages/onboarding/steps/ContextGatheringStep.tsx:375 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Click Next / the advance control manually — the step is still interactive","Check the router/state error in the console warn for the underlying rejection cause","Reload the onboarding if navigation state is wedged"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}