{"record":{"id":"fdbee1bd8596c3fd","repo":"tinyhumansai/openhuman","slug":"dictation-failed-to-fetch-dictation-settings","errorCode":null,"errorMessage":"[dictation] failed to fetch dictation settings","messagePattern":"\\[dictation\\] failed to fetch dictation settings","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/hooks/useDictationHotkey.ts","lineNumber":103,"sourceCode":"\n        // Handle RpcOutcome wrapper — the result may be nested in .result\n        const s = (\n          'result' in settings ? (settings as Record<string, unknown>).result : settings\n        ) as DictationSettings;\n\n        setDictationEnabled(s.enabled);\n        setActivationMode(s.activation_mode ?? 'toggle');\n        setHotkey(s.hotkey ?? '');\n\n        if (s.enabled && s.hotkey) {\n          // The core process registers the hotkey via rdev — we just note it.\n          setHotkeyRegistered(true);\n          console.debug(`[dictation] core hotkey active: ${s.hotkey}`);\n        } else {\n          console.debug('[dictation] dictation disabled or no hotkey configured');\n        }\n      } catch (err) {\n        console.warn('[dictation] failed to fetch dictation settings', err);\n      }\n    };\n\n    void init();\n\n    return () => {\n      disposed = true;\n    };\n  }, []);\n\n  // Open a dedicated Socket.IO connection to the core for dictation\n  // events. This is independent of the main socketService (which\n  // requires auth) so dictation works even when not logged in.\n  useEffect(() => {\n    let socket: Socket | null = null;\n    let disposed = false;\n\n    const connect = async () => {","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/hooks/useDictationHotkey.ts#L85-L121","documentation":"Failure of the initial settings fetch in useDictationHotkey: the RPC that loads dictation settings (enabled, activation mode, hotkey) rejected, so the hook cannot know whether the core has registered a global hotkey. The catch warns and the hook falls back to its defaults — dictation appears disabled until settings load successfully.","triggerScenarios":"Thrown at app/src/hooks/useDictationHotkey.ts:103 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the core RPC is reachable (core process up, token valid)","Retry the settings fetch on reconnect/socket re-establishment","Surface the failure in UI state instead of only console when dictation is expected on"],"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-14T00:17:10.932Z"}