tonhowtf/omniget · warning
[study-music] sc error:
Error message
[study-music] sc error:
What it means
SoundCloud track playback/lookup failed inside the study-music player and the YoutubeError-style error component was mounted. In a $effect it calls resolve(error) to map the raw error into a display object and logs the raw value with console.warn.
Solutions
- Inspect the logged raw error to identify resolve vs network vs auth failure
- Retry resolving the track (stream URLs expire)
- Fall back to opening the track in the browser via the provided button
- Skip the track (player auto-skip on error if enabled)
Example fix
// before
$effect(() => {
void resolve(error);
console.warn("[study-music] sc error:", error);
});
// after
$effect(() => {
const resolved = resolve(error);
if (resolved.retryable) console.warn("[study-music] sc error (retryable):", error);
}); Defensive patterns
Strategy: fallback
Validate before calling
if (!track?.permalink_url || !track.id) throw new Error("invalid soundcloud track"); Type guard
function isResolvableScTrack(t: unknown): t is ScTrack {
return !!t && typeof t === "object" && "id" in t && typeof (t as ScTrack).permalink_url === "string";
} Try / catch
try {
await scPlayer.play(track);
} catch (e) {
console.warn("[study-music] sc error:", e);
showFallbackLink(track.permalink_url); // open in browser
skipToNextTrack();
} Prevention
- Enable auto-skip-on-error in player settings
- Refresh stream URLs before playback
- Validate track metadata before attempting playback
- Provide an open-in-browser fallback for unplayable tracks
When it happens
Trigger: A SoundCloud source fails to resolve or stream (bad track URL, removed/private track, API rate limit or auth failure), and the player store renders SoundCloudError with the raw error prop.
Common situations: Deleted or region-blocked SoundCloud tracks, expired stream URLs, network failures, or SoundCloud API client-id changes breaking resolution.
Related errors
- [study-music] yt error:
- [player] failed loading player settings
- [player] refresh_url failed
- [player] spotify heartbeat resync failed
- [sc-download-store] listen bulk failed
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/616f09de6db48f29.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/study-music-components/SoundCloudError.svelte:32
try {
const res = await studySoundcloudHumanizeError({ error: err });
humanized = res.humanized;
} catch {}
}
async function openInSoundcloud() {
if (!trackUrl) return;
try {
const { openUrl } = await import("@tauri-apps/plugin-opener");
await openUrl(trackUrl);
} catch {
window.open(trackUrl, "_blank", "noopener,noreferrer");
}
}
$effect(() => {
void resolve(error);
console.warn("[study-music] sc error:", error);
});
</script>
<div class="sc-error" role="alert">
<div class="icon" aria-hidden="true">
<svg viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" />
<line x1="12" y1="9" x2="12" y2="13" />
<line x1="12" y1="17" x2="12.01" y2="17" />
</svg>
</div>
<div class="body">
<p class="kicker">SoundCloud</p>
<p class="msg">{humanized}</p>
<p class="hint">Tentamos outras qualidades antes de mostrar esse aviso.</p>
<div class="actions">
{#if onRetry}
<button type="button" class="btn primary" onclick={onRetry}>Tentar de novo</button>View on GitHub (pinned to 8600b91f42)