Acknowledged

makeWebRequest fails on patreon audio content download

I'm getting error 0 when trying to download audio content from patreon servers on device (Fenix 7 Pro). It's working fine in the simulator, but not on device.

I've verified that it is a https url, and there shouldn't be any issues with the certificate, as the artwork (image) download just before succeeds.

The media encoding seems correct (mp3 file), and if I log the download url, it's valid for download on the computer later.

My request options look like this:

		var options = {
			:method => Communications.HTTP_REQUEST_METHOD_GET,
			:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_AUDIO,
			:headers => {
				"Content-Type" => Communications.REQUEST_CONTENT_TYPE_URL_ENCODED,
			},
			:mediaEncoding => Utils.mimeToEncoding(episode[Episode.MIME_TYPE]),
			:fileDownloadProgressCallback => method(:onDownloadProgress)
		};


Out of respect for the content creator, I won't post the full content URLs here (but I can provide it to garmin representatives via DM for debugging), but they look like this (with redacted hashes):
The audio url, that fails on device:
https://c10.patreonusercontent.com/4/patreon-media/p/post/108392616/c302f7883bbc448eb2b32aaa3f4d5134/eyJhIjoxLCJwIjoxfQ%3D%3D/1.mp3?token-time=1725235200&token-hash=<hash-redacted>%3D

The image url that succeeds:
https://c10.patreonusercontent.com/4/patreon-media/p/campaign/8278829/b47426688d39440c9af3392914c867df/eyJoIjoxMDgwLCJ3IjoxMDgwfQ%3D%3D/2.png?token-time=2145916800&token-hash=<hash-redacted>%3D

Fetching the audio url from a computer with curl, the headers looks like this:

HTTP/2 200
date: Sun, 25 Aug 2024 09:21:48 GMT
content-type: audio/mpeg
content-length: 81094529
cf-ray: 8b8a83961a5e5f01-ARN
cf-cache-status: HIT
accept-ranges: bytes
access-control-allow-origin: https://www.patreon.com
age: 1946819
cache-control: public, max-age=31536000
content-disposition: attachment; filename="Le Grifon 03; Too Many Stars.mp3"; filename*=utf-8''Le%20Grifon%2003%3B%20Too%20Many%20Stars.mp3
etag: W/4/patreon-media/p/post/108392616/<hash-redacted>%3D%3D/1
expires: Mon, 25 Aug 2025 09:21:48 GMT
vary: Accept-Encoding
access-control-allow-headers: Content-Type, Range, Content-Length
content-security-policy: default-src 'none'; media-src https://c10.patreonusercontent.com
x-powered-by: Express
set-cookie: __cf_bm=<hash-redacted> path=/; expires=Sun, 25-Aug-24 09:51:48 GMT; domain=.patreonusercontent.com; HttpOnly; Secure; SameSite=None
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=<hash-redacted>%2F<hash-redacted>8%<hash-redacted>"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare

Been trying to speculate what might be the cause of the issue. Only theory I have so far is that the URL is very long (211 characters), and that might be the culprit?

Parents Comment Children
No Data