tonhowtf/omniget · warning
[soundcloud] me failed:
Error message
[soundcloud] me failed:
What it means
Warning from SoundcloudStore.refreshStatus when fetching the authenticated user's profile via study:soundcloud:me fails while status.has_oauth is true and user_id was null. Status flags remain, but this.profile stays unset and user_id is not backfilled, so UI may show a partially-authenticated state.
Solutions
- Re-authenticate via loginWithWebview to obtain fresh OAuth cookies
- Check network connectivity and SoundCloud API status
- Inspect the caught error: 401 means cookies are stale — clear them and log in again
- Retry refreshStatus after a transient network/API failure
Example fix
// before
console.warn("[soundcloud] me failed:", e);
// after
console.warn("[soundcloud] me failed:", e);
if (isAuthError(e)) { await this.clearOAuthCookies(); this.status = { ...this.status, has_oauth: false }; } Defensive patterns
Strategy: try-catch
Validate before calling
if (!status.has_oauth) return; // nothing to refresh
Type guard
function looksLikeScUser(v: unknown): v is { id: string; username?: string; avatar_url?: string } { return typeof v === "object" && v !== null && typeof (v as any).id === "string"; } Try / catch
try { const me = await pluginInvoke<any>("study", "study:soundcloud:me"); this.profile = mapUser(me); } catch (e) { console.warn("[soundcloud] me failed:", e); if (isUnauthorized(e)) await this.logout(); } Prevention
- Treat has_oauth cookies as untrusted until /me succeeds
- Prompt re-login on 401/403 instead of silently keeping a half-authenticated state
- Check SoundCloud API status on repeated failures
- Refresh status only when network is available
When it happens
Trigger: refreshStatus (triggered by loginWithWebview or logout) detecting has_oauth cookies but the study:soundcloud:me call rejecting — expired/invalid OAuth cookies, SoundCloud API 401/403, or network failure.
Common situations: SoundCloud session expired between logins; cookies present but revoked server-side; offline or SoundCloud API outage; bot/abuse protection returning 403 to the /me endpoint.
Related errors
- a autorização do Trakt expirou de vez. Conecte a conta de…
- Access denied (403). The video may be private or…
- acesso negado (HTTP ). Capture os cookies da sua conta no…
- aria2c falhou
- chunk de assinatura do X nao encontrado
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/9e64f348f6042a53.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/study-music/soundcloud-store.svelte.ts:183
async refreshStatus() {
try {
let s = await pluginInvoke<AuthStatus>("study", "study:soundcloud:auth:refresh");
this.status = s;
if (!s.has_oauth) {
const hydrated = await this.tryHydrateFromCookieManager();
if (hydrated) {
s = await pluginInvoke<AuthStatus>("study", "study:soundcloud:auth:refresh");
this.status = s;
}
}
if (s.has_oauth && s.user_id == null) {
try {
const me = await pluginInvoke<any>("study", "study:soundcloud:me");
this.profile = mapUser(me);
if (this.profile) this.status = { ...this.status, user_id: this.profile.id };
} catch (e) {
console.warn("[soundcloud] me failed:", e);
}
} else if (s.user_id) {
try {
const me = await pluginInvoke<any>("study", "study:soundcloud:me");
this.profile = mapUser(me);
} catch {
/* ignore */
}
}
} catch (e) {
this.error = e instanceof Error ? e.message : String(e);
}
}
async tryHydrateFromCookieManager(): Promise<boolean> {
try {
const { invoke } = await import("@tauri-apps/api/core");
const accounts = await invoke<{ domain: string; accounts: { slug: string }[] }>(View on GitHub (pinned to 8600b91f42)