Skip to content

Start the demo even when the SoundCloud playlist fails to load - #1389

Merged
captbaritone merged 1 commit into
masterfrom
demo-soundcloud-fallback
Nov 16, 2026
Merged

captbaritone merged 1 commit into
masterfrom
demo-soundcloud-fallback

Conversation

@captbaritone

Copy link
Copy Markdown
Owner

Any webamp.org link with ?scPlaylist= fails to start: the desktop icons render but Webamp never appears. That includes the /poolside redirect in netlify.toml. In Sentry this is WEBAMP-1T9 (TypeError: Cannot read properties of undefined (reading 'map')), and every recent event has scPlaylist=1040356177, the Poolside playlist.

SoundCloud's API now answers our client id with 401. getPlaylist returned the error body as if it were a playlist, then tracksFromPlaylist threw on playlist.tracks.map before Webamp was constructed.

This makes getPlaylist throw on a non-OK response or one without a tracks array, and main() catches that, logs it, and carries on with the default tracks. The skin and background from the URL still apply. It also removes a @ts-ignore that is no longer needed.

This only keeps the page working. The SoundCloud feature itself is still dead: getting the Poolside tracks back needs a different source, or the scPlaylist param removed from the /poolside redirect.

Steps to reproduce (on webamp.org today)

  1. Open https://webamp.org/poolside (it redirects to /?bg=%2362639f&scPlaylist=1040356177&skinUrl=…).
  2. Expected: Webamp opens with the Poolside skin. Actual: only the desktop icons and background colour render, and the console shows Cannot read properties of undefined (reading 'map').
  3. Optionally, curl -s -o /dev/null -w "%{http_code}" "https://api.soundcloud.com/playlists/1040356177?client_id=T9EbIJ75SnsJK3iX8lOZaDlGIYgQB32G" prints 401.

Test plan

  • Opened the same URL against the dev server: Webamp starts with the Poolside skin, the #62639f background and the default playlist. The console logs Error: SoundCloud playlist request failed: 401 and nothing else from startup.
  • After deploy, open https://webamp.org/poolside and check that Webamp appears.
  • eslint and prettier --check pass. The demo's tsc errors are unchanged: the two existing PNG-import errors in DemoDesktop.tsx.

🤖 Generated with Claude Code

SoundCloud's API now answers our client id with a 401, so getPlaylist
resolved to an error body and tracksFromPlaylist threw reading
`tracks.map`. That stopped the demo from starting at all for any
?scPlaylist= link, including /poolside. Treat a failed or malformed
response as an error, and fall back to the default tracks.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 491 kB

ℹ️ View Unchanged
Filename Size
packages/webamp/built/webamp.bundle.min.js 298 kB
packages/webamp/built/webamp.lazy-bundle.min.js 193 kB

compressed-size-action

@netlify

netlify Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for tourmaline-kringle-c98715 canceled.

Name Link
🔨 Latest commit f148d7e
🔍 Latest deploy log https://app.netlify.com/projects/tourmaline-kringle-c98715/deploys/6afa5363b27c3eea6592733b

@captbaritone
captbaritone merged commit 307a465 into master Nov 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant