tinyhumansai/openhuman · error · Error
Not running in Tauri
Error message
Not running in Tauri
What it means
openhumanDoctorReport requests the platform doctor diagnostic report via the openhuman.doctor_report core RPC, forwarded through the Tauri command bridge (relay_http_rpc). The guard throws when the strict isTauri() returns false — i.e., no Tauri shell (plain browser, SSR, test) or the CEF bootstrap gap where __TAURI_INTERNALS__.invoke is not yet wired. The doctor surface inherently needs the embedded Rust core, so there is no browser fallback.
Source
Thrown at app/src/utils/tauriCommands/core.ts:319
if (res && typeof res === 'object' && 'result' in res) return res.result;
return false;
}
/** Write onboarding_completed to core config. */
export async function setOnboardingCompleted(value: boolean): Promise<boolean> {
if (!isTauri()) return false;
const res = await callCoreRpc<boolean | { result: boolean }>({
method: 'openhuman.config_set_onboarding_completed',
params: { value },
});
if (typeof res === 'boolean') return res;
if (res && typeof res === 'object' && 'result' in res) return res.result;
return false;
}
export async function openhumanDoctorReport(): Promise<CommandResponse<DoctorReport>> {
if (!isTauri()) {
throw new Error('Not running in Tauri');
}
return await callCoreRpc<CommandResponse<DoctorReport>>({ method: 'openhuman.doctor_report' });
}
export async function openhumanDoctorModels(
useCache = true
): Promise<CommandResponse<ModelProbeReport>> {
if (!isTauri()) {
throw new Error('Not running in Tauri');
}
return await callCoreRpc<CommandResponse<ModelProbeReport>>({
method: 'openhuman.doctor_models',
params: { use_cache: useCache },
});
}
export async function openhumanMigrateOpenclaw(
sourceWorkspace?: string,View on GitHub (pinned to a221052e0d)
Solutions
- Run `pnpm dev:app` when testing doctor flows — the diagnostics only exist with the embedded core.
- Gate the screen/effect on isTauri() and show 'diagnostics unavailable outside the desktop app'.
- try/catch the call and match the guard message to degrade instead of crashing the screen.
- Defer on-mount diagnostics until the bridge is wired (window.__TAURI_INTERNALS__.invoke present).
Example fix
// before
useEffect(() => { void openhumanDoctorReport(); }, []);
// after
useEffect(() => {
if (!isTauri()) return;
void openhumanDoctorReport().catch(() => {/* show unavailable state */});
}, []); Defensive patterns
Strategy: validation
Validate before calling
if (!isTauri()) {
setReportUnavailable('Diagnostics require the desktop app');
return;
}
const { result } = await openhumanDoctorReport(); Type guard
function isNotRunningInTauriError(err: unknown): boolean {
return err instanceof Error && err.message === 'Not running in Tauri';
} Try / catch
try {
return await openhumanDoctorReport();
} catch (err) {
if (err instanceof Error && err.message === 'Not running in Tauri') {
return null; // render 'unavailable outside desktop app'
}
throw err;
} Prevention
- Doctor data is core-only — gate the whole screen on isTauri().
- Load diagnostics lazily (on opening the screen), not eagerly at app boot.
- Prefer `pnpm dev:app` when developing diagnostics UI.
When it happens
Trigger: Opening the doctor/diagnostics screen on mount under `pnpm dev`; a health widget polling doctor_report in browser mode; Vitest rendering the doctor screen without mocks; the fetch racing IPC wiring at app startup.
Common situations: Browser-mode UI development of the diagnostics screen; on-mount effects that assume the desktop shell; Sentry noise from unhandled rejections when the screen is viewed outside the shell.
Related errors
- Not running in Tauri
- Not running in Tauri
- Restart Core is only available in the desktop app.
- Not running in Tauri
- Not running in Tauri
AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16).
Data as JSON: /api/errors/dd93a0f0f485907e.
Report an issue: GitHub.