tonhowtf/omniget · warning

[player] failed loading rpc music_settings

Error message

[player] failed loading rpc music_settings

What it means

Warning logged when loading persisted music/RPC settings from the backend fails: pluginInvoke('study', <settings:get>) threw before the store could apply heartbeat/show_cover/show_buttons/update_interval_ms values. The store keeps its defaults, so RPC settings reset for the session.

Solutions

  1. Verify the study plugin is initialized before the store loads settings (await backend ready event)
  2. Inspect the caught error; if it is a missing-command error, update the frontend/backend versions to match
  3. Delete or repair the corrupted settings file so get succeeds
  4. Rely on defaults — the code intentionally swallows the error and continues

Example fix

// before
await initPlayerStore();
// after
await backendReady("study");
await initPlayerStore();
Defensive patterns

Strategy: fallback

Validate before calling

null

Type guard

function isSettingsPayload(v: unknown): v is { heartbeat_interval_ms?: number; update_interval_ms?: number; show_cover?: boolean; show_buttons?: boolean } { return typeof v === "object" && v !== null; }

Try / catch

try { const res = await pluginInvoke(...); applySettings(res); } catch (e) { console.warn("using default rpc settings", e); applySettings(DEFAULT_SETTINGS); }

Prevention

When it happens

Trigger: Calling the store's settings loader (at init or after re-login) when the study plugin's settings:get command rejects — plugin missing, backend panic, or corrupted/unreadable settings payload.

Common situations: Fresh install where the plugin backend is not yet ready; corrupted settings file on disk; version mismatch where the command name changed.

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/9b62cd251322a4da. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/study-music/player-store.svelte.ts:820

  private async loadRpcSettings() {
    if (this._rpcSettingsLoaded) return;
    this._rpcSettingsLoaded = true;
    try {
      const res = await pluginInvoke<{
        show_cover?: boolean;
        show_buttons?: boolean;
        update_interval_ms?: number;
      }>("study", "study:music:rpc:music_settings:get", {});
      if (typeof res?.show_cover === "boolean") this._rpcShowCover = res.show_cover;
      if (typeof res?.show_buttons === "boolean") this._rpcShowButtons = res.show_buttons;
      if (typeof res?.update_interval_ms === "number") {
        this._rpcUpdateIntervalMs = MusicPlayerStore.clampRpcInterval(
          res.update_interval_ms,
        );
      }
    } catch (e) {
      console.warn("[player] failed loading rpc music_settings", e);
    }
  }

  getRpcShowCover(): boolean {
    return this._rpcShowCover;
  }

  getRpcShowButtons(): boolean {
    return this._rpcShowButtons;
  }

  getRpcUpdateIntervalMs(): number {
    return this._rpcUpdateIntervalMs;
  }

  async setRpcShowCover(value: boolean) {
    this._rpcShowCover = value;
    try {

View on GitHub (pinned to 8600b91f42)