tonhowtf/omniget · warning
[player] failed saving rpc show_buttons
Error message
[player] failed saving rpc show_buttons
What it means
Same family as show_cover: the show_buttons RPC preference is applied in memory but its persistence call to study:music:rpc:music_settings:set rejects, producing this warning. Buttons still render per the new value for the session.
Solutions
- Ensure the study plugin backend is initialized before changing RPC settings
- Check the caught error for a file-write/permission cause and fix permissions
- Retry the save once the backend responds
- Sync frontend/backend versions so the command exists
Example fix
// before
await pluginInvoke("study", "study:music:rpc:music_settings:set", { show_buttons: value });
// after
if (!(await ensureBackendReady("study"))) return scheduleRetry(() => setRpcShowButtons(value));
await pluginInvoke("study", "study:music:rpc:music_settings:set", { show_buttons: value }); Defensive patterns
Strategy: try-catch
Validate before calling
if (typeof value !== "boolean") return;
Type guard
function isBool(v: unknown): v is boolean { return typeof v === "boolean"; } Try / catch
try { await pluginInvoke("study", "study:music:rpc:music_settings:set", { show_buttons: value }); } catch (e) { console.warn("[player] failed saving rpc show_buttons", e); markSettingsDirty({ show_buttons: value }); } Prevention
- Reuse one shared settings-save helper for all RPC flags
- Retry persistence once backend is ready
- Surface a subtle 'settings not saved' indicator to the user
When it happens
Trigger: Toggling 'show buttons' in Discord RPC settings while the backend settings:set command fails (plugin missing, IPC error, settings write rejected).
Common situations: App started before plugin backend ready; unwritable settings file; version skew between frontend command names and plugin implementation.
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
- [player] failed saving rpc show_cover
- [player] failed saving rpc update_interval_ms
- [music] playlists load failed
- [player] failed loading rpc music_settings
- [player] failed saving spotify heartbeat_interval_ms
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/dd802131eb75fa93.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/study-music/player-store.svelte.ts:855
this._rpcShowCover = value;
try {
await pluginInvoke("study", "study:music:rpc:music_settings:set", {
show_cover: value,
});
} catch (e) {
console.warn("[player] failed saving rpc show_cover", e);
}
this.rpcOnPlaybackChange();
}
async setRpcShowButtons(value: boolean) {
this._rpcShowButtons = value;
try {
await pluginInvoke("study", "study:music:rpc:music_settings:set", {
show_buttons: value,
});
} catch (e) {
console.warn("[player] failed saving rpc show_buttons", e);
}
this.rpcOnPlaybackChange();
}
async setRpcUpdateIntervalMs(ms: number) {
const clamped = MusicPlayerStore.clampRpcInterval(ms);
this._rpcUpdateIntervalMs = clamped;
try {
await pluginInvoke("study", "study:music:rpc:music_settings:set", {
update_interval_ms: clamped,
});
} catch (e) {
console.warn("[player] failed saving rpc update_interval_ms", e);
}
if (this._rpcTimer !== null) {
this.stopRpcLoop();
this.startRpcLoop();
}View on GitHub (pinned to 8600b91f42)