{"record":{"id":"840d6079f215d7ca","repo":"tinyhumansai/openhuman","slug":"not-running-in-tauri-840d60","errorCode":null,"errorMessage":"Not running in Tauri","messagePattern":"Not running in Tauri","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"app/src/utils/tauriCommands/config.ts","lineNumber":214,"sourceCode":"  tools: {\n    raw: string;\n    totalTools: number;\n    activeSkills: number;\n    skillsPreview: string[];\n    loadedAt: number;\n  };\n  metadata: {\n    loadedAt: number;\n    loadingDuration: number;\n    hasFallbacks: boolean;\n    sources: { soul: string; tools: string };\n    errors: string[];\n  };\n}\n\nexport async function openhumanGetConfig(): Promise<CommandResponse<ConfigSnapshot>> {\n  if (!isTauri()) {\n    throw new Error('Not running in Tauri');\n  }\n  return await callCoreRpc<CommandResponse<ConfigSnapshot>>({ method: CORE_RPC_METHODS.configGet });\n}\n\n/**\n * Safe client-facing config slice. Never contains the raw api_key — only\n * `api_key_set` indicates whether a custom backend key is stored. See\n * `config.get_client_config` in `src/openhuman/config/schemas.rs`.\n */\nexport interface ClientConfig {\n  /** OpenHuman product backend URL (auth/billing/voice). */\n  api_url: string | null;\n  /**\n   * Custom OpenAI-compatible LLM endpoint. Legacy field, retained for\n   * back-compat — the new AI settings panel reads/writes\n   * `cloud_providers` + `*_provider` fields instead.\n   */\n  inference_url: string | null;","sourceCodeStart":196,"sourceCodeEnd":232,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/app/src/utils/tauriCommands/config.ts#L196-L232","documentation":"openhumanGetConfig() forwards the core RPC configGet (CORE_RPC_METHODS.configGet) and returns the full ConfigSnapshot, including load metadata (loadedAt, loadingDuration, sources, errors). The isTauri() guard throws when the frontend runs outside the Tauri shell — the snapshot lives in the embedded Rust core, reachable only through the relay_http_rpc IPC bridge.","triggerScenarios":"Calling openhumanGetConfig() from a diagnostics or settings screen while the UI runs under `pnpm dev` in a plain browser, or from a Vitest spec importing the real wrapper.","commonSituations":"Opening the config/diagnostics screen during browser-based styling; a snapshot render test without mocked IPC; running the frontend bundle in a non-Tauri harness.","solutions":["Run the app under the full Tauri host (`pnpm dev:app` or the packaged build).","Mock '@/utils/tauriCommands/config' in tests for screens that read the config snapshot.","Skip the fetch when isTauri() is false and render a desktop-only placeholder.","Prefer openhumanGetClientConfig() (the safe slice) for UI display; reserve the full snapshot for desktop diagnostics."],"exampleFix":"// before\nconst { data: config } = await openhumanGetConfig();\n// after\nimport { isTauri } from '@/utils/tauriCommands/common';\nif (!isTauri()) throw new Error('Config snapshot is desktop-only.');\nconst { data: config } = await openhumanGetConfig();","handlingStrategy":"validation","validationCode":"import { isTauri } from '@/utils/tauriCommands/common';\n\nif (!isTauri()) {\n  // full config snapshot is desktop-only — render a placeholder\n}","typeGuard":null,"tryCatchPattern":"try {\n  const { data: config } = await openhumanGetConfig();\n} catch (err) {\n  if (err instanceof Error && err.message === 'Not running in Tauri') {\n    setConfigUnavailable(true);\n  } else {\n    throw err;\n  }\n}","preventionTips":["Use `pnpm dev:app` when working on config/diagnostics screens.","Mock '@/utils/tauriCommands/config' in tests.","Prefer the safe client config slice for UI display; keep the full snapshot desktop-gated."],"tags":["tauri","ipc","config","environment"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}