tonhowtf/omniget · warning
[omnidisc] mute failed
Error message
[omnidisc] mute failed
What it means
This warning is logged by omnidisc-voice-store's toggleMute when the Tauri IPC command `omnidisc_voice_set_mute` rejects. The store optimistically flips the local `muted` flag, calls the backend, and rolls the flag back if the backend call fails, so UI state stays consistent. It is a non-fatal warning: the app keeps running but the mute did not take effect on the voice backend.
Solutions
- Check the errorText(e) payload in the console to see the backend's error message and fix the root cause there.
- Ensure the voice session is connected/started before toggling mute; gate the button on connection state.
- Verify the `omnidisc_voice_set_mute` command is registered in the Tauri builder and its Rust handler returns Result.
- Test on a machine with a working audio input device; mute may fail when no capture device exists.
- In browser dev mode, expect all invoke() calls to fail; test inside the Tauri app instead.
Example fix
// before
muted = next;
try {
applyStatus(await invoke<VoiceStatusWire>("omnidisc_voice_set_mute", { muted: next }));
} catch (e) {
muted = !next;
console.warn("[omnidisc] mute failed", errorText(e));
}
// after
if (!connected) return; // don't attempt mute without an active voice session
muted = next;
try {
applyStatus(await invoke<VoiceStatusWire>("omnidisc_voice_set_mute", { muted: next }));
} catch (e) {
muted = !next;
notifyUser("Could not change mute: " + errorText(e));
console.warn("[omnidisc] mute failed", errorText(e));
} Defensive patterns
Strategy: try-catch
Validate before calling
// caller-side
if (!get(voiceConnected)) throw new Error("voice session not active"); Type guard
function isTauri(): boolean {
return typeof window !== "undefined" && "__TAURI_INTERNALS__" in window;
} Try / catch
try {
applyStatus(await invoke<VoiceStatusWire>("omnidisc_voice_set_mute", { muted: next }));
} catch (e) {
muted = !next; // roll back optimistic state
console.warn("[omnidisc] mute failed", errorText(e));
} Prevention
- Gate mute/deafen controls on an active voice connection.
- Always roll back optimistic local state in the catch block.
- Test voice commands inside the Tauri app, not a plain browser.
- Log errorText(e) and alert on repeated failures to catch backend regressions early.
When it happens
Trigger: Calling toggleMute() when the Tauri backend command `omnidisc_voice_set_mute` returns an error: backend not running/initialized, voice session not started, audio subsystem failure, or the command rejected with a Rust error (e.g. poisoned mutex, audio device unavailable).
Common situations: Voice session torn down while user clicks the mute button; audio daemon/device disconnected; Tauri command handler panicked or returned Err; running the frontend in a browser (no Tauri IPC) during dev.
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
- [omnidisc] deafen failed
- [omnidisc] stream volume failed
- [omnidisc] voice leave failed
- [omnidisc] volume failed
- [omnidisc] noise suppression failed
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/59b937955a00fa25.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/stores/omnidisc-voice-store.svelte.ts:606
outputError = null;
syncStatsPolling();
}
}
export async function retryVoice(): Promise<boolean> {
const target = session?.channelId;
if (!target) return false;
return joinVoice(target);
}
export async function toggleMute(): Promise<void> {
const next = !muted;
muted = next;
try {
applyStatus(await invoke<VoiceStatusWire>("omnidisc_voice_set_mute", { muted: next }));
} catch (e) {
muted = !next;
console.warn("[omnidisc] mute failed", errorText(e));
}
}
export async function toggleDeafen(): Promise<void> {
const next = !deafened;
deafened = next;
try {
applyStatus(await invoke<VoiceStatusWire>("omnidisc_voice_set_deaf", { deafened: next }));
} catch (e) {
deafened = !next;
console.warn("[omnidisc] deafen failed", errorText(e));
}
}
export function setVolume(userId: string, gain: number) {
loadVolumes();
const clamped = Math.min(2, Math.max(0, Number.isFinite(gain) ? gain : 1));
if (clamped === 1) {View on GitHub (pinned to 8600b91f42)