tinyhumansai/openhuman · error · Error

Not running in Tauri

Error message

Not running in Tauri

What it means

openhumanComposioListTriggerHistory() forwards `openhuman.composio_list_trigger_history`, which reads the Composio trigger archive (archive_dir, current_day_file, entries) from the core. The isTauri() guard throws when the frontend runs outside the Tauri shell, because the archive is read core-side and surfaced only through desktop IPC.

Source

Thrown at app/src/utils/tauriCommands/composio.ts:23

  received_at_ms: number;
  toolkit: string;
  trigger: string;
  metadata_id: string;
  metadata_uuid: string;
  payload: unknown;
}

export interface ComposioTriggerHistoryResult {
  archive_dir: string;
  current_day_file: string;
  entries: ComposioTriggerHistoryEntry[];
}

export async function openhumanComposioListTriggerHistory(
  limit = 100
): Promise<CommandResponse<{ result: ComposioTriggerHistoryResult }>> {
  if (!isTauri()) {
    throw new Error('Not running in Tauri');
  }

  return await callCoreRpc<CommandResponse<{ result: ComposioTriggerHistoryResult }>>({
    method: 'openhuman.composio_list_trigger_history',
    params: { limit },
  });
}

// ── Direct mode (BYO API key) ───────────────────────────────────────
//
// [composio-direct] These three RPCs back the Settings > Composio panel
// added in PR3 of #1710. The API key itself is *never* read back over
// RPC — only a boolean flag (`api_key_set`) so the UI can show a
// "Key stored ✓" / "No key set" status without exposing the secret.

export interface ComposioModeStatus {
  mode: 'backend' | 'direct' | string;
  api_key_set: boolean;

View on GitHub (pinned to a221052e0d)

Solutions

  1. Run the app inside the Tauri desktop shell (`pnpm dev:app` or the packaged build).
  2. Mock '@/utils/tauriCommands/composio' in tests for screens that show trigger history.
  3. Skip the history fetch when isTauri() is false and render an empty state.
  4. Keep the history panel behind the same desktop-only gate as the rest of the Composio surface.

Example fix

// before
const { data } = await openhumanComposioListTriggerHistory(50);
// after
import { isTauri } from '@/utils/tauriCommands/common';
if (!isTauri()) throw new Error('Trigger history is desktop-only.');
const { data } = await openhumanComposioListTriggerHistory(50);
Defensive patterns

Strategy: validation

Validate before calling

import { isTauri } from '@/utils/tauriCommands/common';

if (!isTauri()) {
  // trigger history lives core-side — skip the fetch here
}

Try / catch

try {
  const { data } = await openhumanComposioListTriggerHistory(100);
} catch (err) {
  if (err instanceof Error && err.message === 'Not running in Tauri') {
    setHistory(null); // desktop-only diagnostics
  } else {
    throw err;
  }
}

Prevention

When it happens

Trigger: Calling openhumanComposioListTriggerHistory(limit) from the integrations/settings UI under `pnpm dev` (browser-only), or from a Vitest spec importing the real wrapper.

Common situations: Browsing trigger history while the UI runs in a plain browser; a diagnostics-panel test without mocked IPC; a preview deployment without the desktop host.

Related errors


AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16). Data as JSON: /api/errors/e795fef02cac234a. Report an issue: GitHub.