{"record":{"id":"242052c4b724c187","repo":"tinyhumansai/openhuman","slug":"privacy-failed-to-persist-analytics-setting","errorCode":null,"errorMessage":"[privacy] failed to persist analytics setting:","messagePattern":"\\[privacy\\] failed to persist analytics setting:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/components/settings/panels/PrivacyPanel.tsx","lineNumber":88,"sourceCode":"        setCapabilities(annotated);\n        setLoadState('ready');\n      })\n      .catch(err => {\n        if (cancelled) return;\n        console.warn('[privacy] failed to load capability catalog:', err);\n        setLoadState('error');\n      });\n    return () => {\n      cancelled = true;\n    };\n  }, []);\n\n  const handleToggleAnalytics = async () => {\n    const newValue = !analyticsEnabled;\n    try {\n      await setAnalyticsEnabled(newValue);\n    } catch (error) {\n      console.warn('[privacy] failed to persist analytics setting:', error);\n    }\n  };\n\n  const handleToggleMeetAutoHandoff = async () => {\n    const newValue = !meetAutoHandoff;\n    try {\n      await setMeetAutoOrchestratorHandoff(newValue);\n    } catch (error) {\n      console.warn('[privacy] failed to persist meet auto-handoff setting:', error);\n    }\n  };\n\n  return (\n    <SettingsPanel\n      testId=\"settings-privacy-panel\"\n      description={t('pages.settings.account.privacyDesc')}>\n      <>\n        {/* Privacy Mode selector (#4435) — data-egress posture */}","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/components/settings/panels/PrivacyPanel.tsx#L70-L106","documentation":"Persisting the analytics opt-in/out toggle (setAnalyticsEnabled) failed in the Privacy panel's toggle handler. The warn is the only user-visible consequence — there is no inline error state and no rollback of the optimistic toggle value, so the on-screen switch can now disagree with the actually persisted consent (syncAnalyticsConsent reconciles only on the next snapshot refresh).","triggerScenarios":"Thrown at app/src/components/settings/panels/PrivacyPanel.tsx:88 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the warned error for the failing layer (core RPC vs analytics provider SDK)","Toggle analytics off and on again after the underlying cause is fixed to re-attempt the persist","Verify the persisted value after the next app-state refresh rather than trusting the switch","If it fails persistently, inspect the core log for the analytics consent write path"],"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"}