{"record":{"id":"269cfb834c92ec90","repo":"tinyhumansai/openhuman","slug":"dictation-failed-to-open-dedicated-socket","errorCode":null,"errorMessage":"[dictation] failed to open dedicated socket","messagePattern":"\\[dictation\\] failed to open dedicated socket","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/hooks/useDictationHotkey.ts","lineNumber":160,"sourceCode":"        };\n        socket.on('dictation:toggle', handleToggle);\n        socket.on('dictation_toggle', handleToggle);\n\n        // Transcription results — dispatch the custom DOM event that\n        // Conversations.tsx uses to insert text into the chat input.\n        socket.on('dictation:transcription', (data: { text?: string }) => {\n          const text = data?.text?.trim();\n          if (!text) return;\n          console.debug(`[dictation] transcription received: ${text.length} chars — \"${text}\"`);\n\n          window.dispatchEvent(\n            new CustomEvent('dictation://insert-text', { detail: { text, autoSend: true } })\n          );\n        });\n\n        socket.connect();\n      } catch (err) {\n        console.warn('[dictation] failed to open dedicated socket', err);\n      }\n    };\n\n    void connect();\n\n    return () => {\n      disposed = true;\n      if (socket) {\n        socket.disconnect();\n        socket = null;\n      }\n      socketRef.current = null;\n    };\n  }, []);\n\n  return { dictationEnabled, hotkeyRegistered, toggleCount, activationMode, hotkey };\n}\n","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/hooks/useDictationHotkey.ts#L142-L178","documentation":"Failure while opening the dedicated Socket.IO connection for dictation events in useDictationHotkey: the separate socket used for dictation:toggle / dictation_toggle / dictation:transcription events failed to connect or register listeners. The catch warns; dictation hotkey state remains local and transcription insertion (via the dictation://insert-text DOM event) stops working for this session.","triggerScenarios":"Thrown at app/src/hooks/useDictationHotkey.ts:160 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check core socket endpoint availability and auth token","Reconnect the dedicated socket when the main connection recovers","Verify the core's dictation event namespace is enabled in this build"],"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"}