tonhowtf/omniget · warning
[music] playlists load failed
Error message
[music] playlists load failed
What it means
Warning (dev-only, guarded by import.meta.env.DEV) emitted when the playlists store's load() fails to fetch playlists via pluginInvoke('study','study:music:playlists:list'). this.list stays stale/empty and loaded remains false; in production the failure is silent.
Solutions
- Await backend/plugin readiness before the first load()
- Check the caught error for file-read/permission problems on the playlists store and repair the file
- Update frontend and plugin to matching versions
- Note the DEV-only warning: in production add your own error surfacing if you need visibility
Example fix
// before
await playlists.load();
// after
await backendReady("study");
await playlists.load();
if (!playlists.loaded) showPlaylistErrorBanner(); Defensive patterns
Strategy: retry
Validate before calling
if (!playlists.loaded && !playlists.loading) await playlists.load();
Type guard
function isPlaylistList(v: unknown): v is { playlists: Playlist[] } { return typeof v === "object" && v !== null && Array.isArray((v as any).playlists); } Try / catch
try { await playlists.load(); } catch (e) { console.warn("[music] playlists unavailable, using cache", e); this.list = cachedPlaylists ?? []; } Prevention
- Await backend readiness before first load
- Cache the last known playlist list for offline/failure fallback
- Reserialize/repair the playlists file if parsing errors appear in logs
- Don't swallow errors in production builds — add user-visible handling
When it happens
Trigger: Calling load() (directly or via create/deleteOne/addTrack/removeTrack/reorder/update) when the playlists:list backend command rejects — plugin not initialized, backend error reading the playlists file, or IPC failure.
Common situations: Modifying playlists right after app start before the backend is ready; corrupted or unreadable playlists.json; plugin version mismatch removing the list command.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- [player] failed loading rpc music_settings
- [player] failed saving rpc show_buttons
- [player] failed saving rpc show_cover
- [player] failed saving rpc update_interval_ms
- [player] failed saving spotify heartbeat_interval_ms
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/713b7630fa5dbbaa.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/study-music/playlists-store.svelte.ts:31
class PlaylistsStore {
list = $state<Playlist[]>([]);
loaded = $state(false);
loading = $state(false);
async load(force = false) {
if (this.loaded && !force) return;
this.loading = true;
try {
const res = await pluginInvoke<{ playlists: Playlist[] }>(
"study",
"study:music:playlists:list",
);
this.list = res.playlists ?? [];
this.loaded = true;
} catch (e) {
if (import.meta.env.DEV) {
console.warn("[music] playlists load failed", e);
}
} finally {
this.loading = false;
}
}
async create(name: string, description?: string): Promise<number | null> {
try {
const res = await pluginInvoke<{ id: number }>(
"study",
"study:music:playlists:create",
{ name, description: description ?? null },
);
await this.load(true);
return res.id;
} catch (e) {
throw e;
}View on GitHub (pinned to 8600b91f42)