{"record":{"id":"08980df6920ad251","repo":"tinyhumansai/openhuman","slug":"conscious-failed-to-trigger-analysis","errorCode":null,"errorMessage":"[conscious] Failed to trigger analysis:","messagePattern":"\\[conscious\\] Failed to trigger analysis:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/hooks/useConsciousItems.ts","lineNumber":187,"sourceCode":"      const extracted = extractActionablesFromContext(queryResult.text);\n      setItems(extracted.map(mapToActionableItem));\n    } catch (err) {\n      const msg = err instanceof Error ? err.message : 'Failed to load conscious items';\n      setError(msg);\n    } finally {\n      setLoading(false);\n      fetchingRef.current = false;\n    }\n  }, []);\n\n  const triggerAnalysis = useCallback(async () => {\n    const authToken = getCoreStateSnapshot().snapshot.sessionToken;\n    if (!isTauri() || !authToken || isRunning || runningRef.current) return;\n    runningRef.current = true;\n    try {\n      await consciousLoopRun(authToken, await getBackendUrl());\n    } catch (err) {\n      console.warn('[conscious] Failed to trigger analysis:', err);\n    } finally {\n      runningRef.current = false;\n    }\n  }, [isRunning]);\n\n  // Initial fetch\n  useEffect(() => {\n    refresh();\n  }, [refresh]);\n\n  // Listen to conscious loop events\n  useEffect(() => {\n    if (!isTauri()) return;\n\n    let unlistenStarted: (() => void) | undefined;\n    let unlistenCompleted: (() => void) | undefined;\n\n    listen('conscious_loop:started', () => {","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/hooks/useConsciousItems.ts#L169-L205","documentation":"Guard around triggerAnalysis in useConsciousItems: the call that kicks off conscious-item analysis (gated on Tauri + auth token + a running-ref dedupe) rejected. The catch warns with the error and lets the finally block clear the running flag, so the hook stays consistent and a later trigger can retry; items simply don't refresh.","triggerScenarios":"Thrown at app/src/hooks/useConsciousItems.ts:187 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry by re-triggering analysis once the core/session is healthy","Check core connectivity and session token presence if it consistently fails","Ensure the analysis RPC endpoint is registered in the running core 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-14T05:17:10.506Z"}