tinyhumansai/openhuman · error

[dictation] failed to open dedicated socket

Error message

[dictation] failed to open dedicated socket

What it means

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.

Source

Thrown at app/src/hooks/useDictationHotkey.ts:160

        };
        socket.on('dictation:toggle', handleToggle);
        socket.on('dictation_toggle', handleToggle);

        // Transcription results — dispatch the custom DOM event that
        // Conversations.tsx uses to insert text into the chat input.
        socket.on('dictation:transcription', (data: { text?: string }) => {
          const text = data?.text?.trim();
          if (!text) return;
          console.debug(`[dictation] transcription received: ${text.length} chars — "${text}"`);

          window.dispatchEvent(
            new CustomEvent('dictation://insert-text', { detail: { text, autoSend: true } })
          );
        });

        socket.connect();
      } catch (err) {
        console.warn('[dictation] failed to open dedicated socket', err);
      }
    };

    void connect();

    return () => {
      disposed = true;
      if (socket) {
        socket.disconnect();
        socket = null;
      }
      socketRef.current = null;
    };
  }, []);

  return { dictationEnabled, hotkeyRegistered, toggleCount, activationMode, hotkey };
}

View on GitHub (pinned to 7491200858)

Solutions

  1. Check core socket endpoint availability and auth token
  2. Reconnect the dedicated socket when the main connection recovers
  3. Verify the core's dictation event namespace is enabled in this build
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at app/src/hooks/useDictationHotkey.ts:160 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/269cfb834c92ec90. Report an issue: GitHub.