{"record":{"id":"0f87b3a03f028f5d","repo":"tinyhumansai/openhuman","slug":"walkthrough-could-not-set-pending-flag-in-locals","errorCode":null,"errorMessage":"[walkthrough] could not set pending flag in localStorage","messagePattern":"\\[walkthrough\\] could not set pending flag in localStorage","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/components/walkthrough/AppWalkthrough.tsx","lineNumber":47,"sourceCode":"    console.warn('[walkthrough] localStorage unavailable — treating as not pending', e);\n    return false;\n  }\n}\n\n/**\n * Flags the walkthrough as pending. Called by OnboardingLayout when the user\n * completes the wizard and is about to navigate to /chat.\n *\n * Best-effort: if localStorage is unavailable (SecurityError / quota) the\n * error is logged and the call is silently swallowed so navigation always\n * proceeds.\n */\nexport function setWalkthroughPending(): void {\n  try {\n    localStorage.setItem(WALKTHROUGH_PENDING_KEY, 'true');\n    console.debug('[walkthrough] pending flag set');\n  } catch (e) {\n    console.warn('[walkthrough] could not set pending flag in localStorage', e);\n  }\n}\n\n/**\n * Marks the walkthrough as completed (or skipped). Once set, the walkthrough\n * will not show again.\n *\n * Wrapped in try/catch to prevent SecurityError/quota exceptions from\n * interrupting the tour-end flow.\n */\nexport function markWalkthroughComplete(): void {\n  try {\n    localStorage.setItem(WALKTHROUGH_KEY, 'true');\n    localStorage.removeItem(WALKTHROUGH_PENDING_KEY);\n    console.debug('[walkthrough] marked as complete');\n  } catch (e) {\n    console.warn('[walkthrough] could not mark walkthrough complete in localStorage', e);\n  }","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/components/walkthrough/AppWalkthrough.tsx#L29-L65","documentation":"Best-effort catch in setWalkthroughPending: localStorage.setItem(WALKTHROUGH_PENDING_KEY) threw — typically SecurityError in blocked/embedded contexts or QuotaExceededError with a full store. Per the documented contract the error is logged and swallowed so onboarding navigation to /chat always proceeds; the only cost is that the walkthrough may not auto-start on landing.","triggerScenarios":"Thrown at app/src/components/walkthrough/AppWalkthrough.tsx:47 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["No user-facing action needed — navigation proceeds regardless","If the walkthrough should play, clear storage or unblock localStorage for the app origin","Check for storage quota exhaustion from other keys and prune them"],"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"}