{"record":{"id":"a67f4fb87182a17b","repo":"tinyhumansai/openhuman","slug":"notch-failed-to-connect-socket","errorCode":null,"errorMessage":"[notch] failed to connect socket","messagePattern":"\\[notch\\] failed to connect socket","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/notch/NotchApp.tsx","lineNumber":254,"sourceCode":"            // The voice listener uses two reserved status words to drive the\n            // pill: \"Listening\" (capturing speech) and \"Processing\" (running a\n            // command). Map them to the matching icon; everything else is a\n            // generic attention message.\n            const lower = message.toLowerCase();\n            const mode: NotchMode =\n              lower === 'listening'\n                ? 'listening'\n                : lower === 'processing'\n                  ? 'thinking'\n                  : 'attention';\n            setState({ mode, text: message.length > 60 ? `${message.slice(0, 57)}…` : message });\n            scheduleDismiss(payload?.ttl_ms ?? DEFAULT_TTL_MS);\n          });\n\n          socket.connect();\n          console.debug('[notch] socket connected', socket.id);\n        } catch (err) {\n          console.warn('[notch] failed to connect socket', err);\n        }\n      })();\n\n      return () => {\n        disposed = true;\n      };\n    },\n    [t, clearDismiss, scheduleDismiss]\n  );\n\n  // ── Core URL bootstrap ──────────────────────────────────────────────────────\n\n  useEffect(() => {\n    // Track the in-flight connect's disposer so an unmount (or a new core-url)\n    // cancels a still-resolving connectCoreSocket — otherwise the async branch\n    // could attach listeners / setState after teardown.\n    let disposePendingConnect: (() => void) | undefined;\n","sourceCodeStart":236,"sourceCodeEnd":272,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/notch/NotchApp.tsx#L236-L272","documentation":"The notch companion window failed to establish its socket connection to the core. The notch UI depends on the socket for voice-listener status words ('Listening'/'Processing') and attention messages; without it the notch renders but receives no state updates, so the pill stays in its initial mode.","triggerScenarios":"Thrown at app/src/notch/NotchApp.tsx:254 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the core process is running and its socket port is reachable from the notch webview","Check the core log for socket server startup errors at the same timestamp","If auth-related, verify the socket bearer token handshake — an expired token rejects the connection","Restarting the app re-creates the notch window and its socket connection"],"exampleFix":null,"handlingStrategy":"retry","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"}