{"record":{"id":"de3e69bf6d8c5c07","repo":"tinyhumansai/openhuman","slug":"onboarding-failed-to-persist-onboarding-tasks-c","errorCode":null,"errorMessage":"[onboarding] Failed to persist onboarding tasks; continuing completion","messagePattern":"\\[onboarding\\] Failed to persist onboarding tasks; continuing completion","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/pages/onboarding/OnboardingLayout.tsx","lineNumber":56,"sourceCode":"      // stale snapshots stripping newer tools (issue #3096); this is\n      // defense-in-depth on the write path.\n      const existingEnabledTools = snapshot.localState.onboardingTasks?.enabledTools;\n      const enabledTools =\n        existingEnabledTools && existingEnabledTools.length > 0\n          ? existingEnabledTools\n          : getEnabledRustToolNames(getDefaultEnabledTools());\n\n      await setOnboardingTasks({\n        accessibilityPermissionGranted:\n          snapshot.localState.onboardingTasks?.accessibilityPermissionGranted ?? false,\n        localModelConsentGiven: false,\n        localModelDownloadStarted: false,\n        enabledTools,\n        connectedSources: draft.connectedSources,\n        updatedAtMs: Date.now(),\n      });\n    } catch (e) {\n      console.warn('[onboarding] Failed to persist onboarding tasks; continuing completion', e);\n    }\n\n    try {\n      await setOnboardingCompletedFlag(true);\n    } catch (e) {\n      console.error('[onboarding] Failed to persist onboarding_completed', e);\n      throw e;\n    }\n\n    // Fire onboarding_complete analytics event before navigation.\n    trackEvent('onboarding_complete');\n\n    // Flag the Joyride walkthrough as pending so it auto-starts on the chat landing surface.\n    // Best-effort: localStorage failures must not block navigation.\n    try {\n      setWalkthroughPending();\n      console.debug('[onboarding:layout] walkthrough pending flag set — navigating to /chat');\n    } catch (e) {","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/pages/onboarding/OnboardingLayout.tsx#L38-L74","documentation":"Best-effort catch around setOnboardingTasks during onboarding completion: persisting the onboarding-task snapshot to the core failed (RPC error, core not reachable), but the flow deliberately logs and continues rather than blocking the user at the finish line. The log line marks this as intentional — completion proceeds even though the persisted localState snapshot may be missing/stale for this session.","triggerScenarios":"Thrown at app/src/pages/onboarding/OnboardingLayout.tsx:56 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the core is running (the setOnboardingTasks RPC target) and retry onboarding completion if a persisted state matters","Check for stale-snapshot issues the defense-in-depth comment references (#3096) if tools appear missing later","Usually ignorable — completion state on the backend flag is the authoritative record"],"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"}