tonhowtf/omniget · warning

[omnidisc] device list failed

Error message

[omnidisc] device list failed

What it means

Logged by refreshDevices() when the `omnidisc_voice_devices` IPC command fails. The store sets devicesLoading back to false in the finally block but leaves the previous (possibly empty) devices list, so the device picker shows stale data. Non-fatal.

Solutions

  1. Check errorText(e) for the OS-level enumeration error.
  2. Verify an audio server (PulseAudio/PipeWire/CoreAudio) is running and devices exist.
  3. Confirm `omnidisc_voice_devices` is registered in the Tauri invoke handler.
  4. Retry the enumeration; transient device hotplug can cause failures.
  5. Keep showing cached device list and offer a manual refresh button when this fails.
Defensive patterns

Strategy: retry

Validate before calling

if (!isTauri()) return; // skip device enumeration outside the webview

Type guard

function isTauri(): boolean {
  return typeof window !== "undefined" && "__TAURI_INTERNALS__" in window;
}

Try / catch

try {
  devices = await invoke<AudioDevices>("omnidisc_voice_devices");
} catch (e) {
  console.warn("[omnidisc] device list failed", errorText(e));
  // keep stale devices list; offer manual refresh
} finally {
  devicesLoading = false;
}

Prevention

When it happens

Trigger: Calling refreshDevices() when enumerating audio devices on the backend fails: no audio subsystem available, OS device enumeration error, or command not registered in Tauri.

Common situations: Running on a machine/CI/container with no audio devices; audio driver crash; headless Linux without PulseAudio/PipeWire; browser dev mode without Tauri IPC.

Understand the failure class

Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/a0e998d8c3379420. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/stores/omnidisc-voice-store.svelte.ts:642

  if (clamped === 1) {
    const next = { ...volumes };
    delete next[userId];
    volumes = next;
  } else {
    volumes = { ...volumes, [userId]: clamped };
  }
  persistVolumes();
  invoke("omnidisc_voice_set_volume", { userId, gain: clamped }).catch((e: unknown) => {
    console.warn("[omnidisc] volume failed", errorText(e));
  });
}

export async function refreshDevices(): Promise<void> {
  devicesLoading = true;
  try {
    devices = await invoke<AudioDevices>("omnidisc_voice_devices");
  } catch (e) {
    console.warn("[omnidisc] device list failed", errorText(e));
  } finally {
    devicesLoading = false;
  }
}

export async function setDevice(kind: DeviceKind, id: string | null): Promise<string | null> {
  const key = kind === "input" ? "input_device" : "output_device";
  try {
    await invoke("omnidisc_voice_set_device", { kind, id });
  } catch (e) {
    return errorText(e);
  }
  try {
    await updateSettings({ omnidisc: { voice: { [key]: id } } });
  } catch (e) {
    console.warn("[omnidisc] device preference not saved", errorText(e));
  }
  return null;

View on GitHub (pinned to 8600b91f42)