{"record":{"id":"1318504a3692ecec","repo":"tonhowtf/omniget","slug":"n-o-capturei-seu-login-tenta-de-novo","errorCode":null,"errorMessage":"Não capturei seu login. Tenta de novo.","messagePattern":"Não capturei seu login\\. Tenta de novo\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"info","filePath":"src/lib/study-music/soundcloud-store.svelte.ts","lineNumber":253,"sourceCode":"\n  async loginWithWebview(): Promise<void> {\n    const { invoke } = await import(\"@tauri-apps/api/core\");\n    this.error = null;\n    const result = await invoke<{\n      cookies: { name: string; value: string; domain: string; path: string }[];\n      finalUrl: string;\n    }>(\"open_auth_webview\", {\n      request: {\n        url: \"https://soundcloud.com/signin\",\n        title: \"Entrar com SoundCloud\",\n        cookieDomains: [\".soundcloud.com\", \"soundcloud.com\"],\n        successUrlContains: null,\n        waitForCookie: \"oauth_token\",\n        initializationScript: null,\n      },\n    });\n    if (!result?.cookies || result.cookies.length === 0) {\n      throw new Error(\"Não capturei seu login. Tenta de novo.\");\n    }\n    const cookiesJson = JSON.stringify(result.cookies);\n    await pluginInvoke(\"study\", \"study:soundcloud:auth:set_cookies\", {\n      cookies_json: cookiesJson,\n    });\n    await this.refreshStatus();\n    if (this.isLoggedIn) {\n      await this.loadAll();\n    }\n  }\n\n  async loadAll() {\n    if (!this.isLoggedIn) return;\n    this.loading = true;\n    try {\n      const [likedRes, playlistsRes, followingsRes, streamRes] = await Promise.allSettled([\n        pluginInvoke<{ collection?: any[] }>(\"study\", \"study:soundcloud:liked_tracks\", {\n          limit: 50,","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src/lib/study-music/soundcloud-store.svelte.ts#L235-L271","documentation":"Raised by extract_syndication_media when the syndication API response has __typename \"TweetTombstone\" or \"TweetUnavailable\". As with the GraphQL path, the target tweet cannot be served (deleted, suspended, restricted), so the syndication extractor fails fast with \"Post not available\".","triggerScenarios":"Calling extract_syndication_media on a syndication CDN response whose root object's __typename is TweetTombstone or TweetUnavailable — the syndication endpoint returns this shell instead of a tweet with mediaDetails/photos.","commonSituations":"Falling back to the syndication API for tweets already deleted or suspended (e.g. after the GraphQL path failed); cached syndication CDN responses for removed content; syndication endpoint not serving sensitive tweets at all, returning an unavailable shell.","solutions":["Verify the tweet still exists (e.g. via its profile page or GraphQL API) before relying on the syndication path","Treat as a permanent skip and mark the tweet_id unavailable","Bypass any stale CDN cache with cache-busting headers/params if the tweet was recently deleted","Log the typename and fall back to another extraction strategy if one exists"],"exampleFix":"// before\nif typename == \"TweetTombstone\" || typename == \"TweetUnavailable\" {\n    tracing::warn!(\"[twitter] syndication tombstone typename={}\", typename);\n    return Err(anyhow!(\"Post not available\"));\n}\n// after\nif typename == \"TweetTombstone\" || typename == \"TweetUnavailable\" {\n    tracing::warn!(\"[twitter] syndication tombstone typename={}\", typename);\n    return Err(TwitterError::SyndicationUnavailable { typename: typename.to_string() });\n}","handlingStrategy":"fallback","validationCode":"// Probe availability before syndication media extraction\nconst probe = await fetch(syndicationUrl(tweetId), { method: 'HEAD' });\nif (!probe.ok) return skip(tweetId, 'syndication reports unavailable');","typeGuard":"function isSyndicationUnavailable(payload) {\n  return ['TweetTombstone','TweetUnavailable'].includes(payload?.__typename);\n}","tryCatchPattern":"match tweet.extract_syndication_media(id) {\n    Err(e) if e.to_string() == \"Post not available\" => mark_permanently_unavailable(id),\n    other => other,\n}","preventionTips":["Check the tweet still exists via GraphQL before falling back to syndication","Add cache-busting when re-probing recently deleted content to bypass stale CDN entries","Cap retries for tombstoned tweet_ids — the state is usually permanent","Log the syndication __typename to distinguish tombstone vs unavailable"],"tags":["twitter","syndication","tombstone","deleted-content"],"backgroundTag":"resource-not-found","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}