Skip to content

Fix download stem#10

Open
dylanjeffers wants to merge 1 commit intomainfrom
fix-create-stem-archive
Open

Fix download stem#10
dylanjeffers wants to merge 1 commit intomainfrom
fix-create-stem-archive

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

@dylanjeffers dylanjeffers commented Apr 15, 2026

Root cause: In createStemsArchive.ts, the prod branch was following one redirect from sdk.tracks.getTrackDownloadUrl(...) and then rewriting the resulting URL's host to creatornode2.audius.co. That workaround was added in pedalboard commit 6a0ee59 ("Use storeall for archiver") when the old Python API returned a content-node URL directly.

The Go API now handles this itself: v1_track_download.go:53 calls tryFindWorkingUrl, which probes the primary URL and every mirror with Range: bytes=0-1 and returns a 302 to whichever host actually serves the bytes. Rewriting that already-verified host to creatornode2 sent requests to a node that may not hold the file at all → 404 on a file that exists.

Fix: Removed the getRedirectUrl helper, the node-fetch import, and the prod-only host rewrite. node-fetch follows 3xx by default, so we just pass the API URL to downloadFile and let the redirect land on the API's chosen mirror. The comment in the file explains why, so this doesn't get re-introduced.

@dylanjeffers dylanjeffers requested a review from rickyrombo April 15, 2026 00:46
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