miraclx / freyr-js

A tool for downloading songs from music streaming services like Spotify and Apple Music.
https://git.io/freyr-js
Apache License 2.0
1.53k stars 95 forks source link

Status code 401 when downloading Apple Music #585

Closed nyancatda closed 11 months ago

nyancatda commented 11 months ago

Other issues mentioned that updating the version is enough, but I updated to the latest v0.10.1 and the problem still exists.

Log

    ____
   / __/_______  __  _______
  / /_/ ___/ _ \/ / / / ___/
 / __/ /  /  __/ /_/ / /
/_/ /_/   \___/\__, /_/
              /____/ v0.10.1

freyr - (c) Miraculous Owonubi <omiraculous@gmail.com>
------------------------------------------------------
Checking directory permissions...[done]
[https://music.apple.com/jp/album/************************************]
 [•] Identifying service...[Apple Music]
 [•] Checking authentication...[authenticated]
 Detected [album]
 Obtaining album metadata...(failed: [Request failed with status code 401])
 [i] An error occurred while processing the query
============ Stats ============
 [•] Runtime: [836ms]
 [•] Total queries: [01]
 [•] Total tracks: [00]
     » Skipped: [00]
     ✓ Passed:  [00]
     ✕ Failed:  [00]
 [•] Output directory: [.]
 [•] Total Output size: 0.00 B
 [•] Total Network Usage: 0.00 B
     ♫ Media: 0.00 B
     ➤ Album Art: 0.00 B
 [•] Output bitrate: 320k
===============================
nyancatda commented 11 months ago

Docker version log

Unable to find image 'freyrcli/freyrjs:latest' locally
latest: Pulling from freyrcli/freyrjs
7264a8db6415: Pull complete
38fbaba889fb: Pull complete
827fc3b80fd1: Pull complete
3d7e35ff0498: Pull complete
35eb505a09c3: Pull complete
605981ace7cf: Pull complete
4f4fb700ef54: Pull complete
Digest: sha256:41a2a32629dfd5e536ffdc02279e24a8a193fe83b0e4c9e5de26662b2f26dec4
Status: Downloaded newer image for freyrcli/freyrjs:latest
    ____
   / __/_______  __  _______
  / /_/ ___/ _ \/ / / / ___/
 / __/ /  /  __/ /_/ / /
/_/ /_/   \___/\__, /_/
              /____/ v0.10.1

freyr - (c) Miraculous Owonubi <omiraculous@gmail.com>
------------------------------------------------------
[•] Initializing config file...[done]
Checking directory permissions...[done]
[https://music.apple.com/jp/album/************************************]
 [•] Identifying service...[Apple Music]
 [•] Checking authentication...[authenticated]
 Detected [album]
 Obtaining album metadata...(failed: [Request failed with status code 401])
 [i] An error occurred while processing the query
============ Stats ============
 [•] Runtime: [1.4s]
 [•] Total queries: [01]
 [•] Total tracks: [00]
     » Skipped: [00]
     ✓ Passed:  [00]
     ✕ Failed:  [00]
 [•] Output directory: [.]
 [•] Total Output size: 0.00 B
 [•] Total Network Usage: 0.00 B
     ♫ Media: 0.00 B
     ➤ Album Art: 0.00 B
 [•] Output bitrate: 320k
===============================
miraclx commented 11 months ago

Fixed in #583, duplicate of https://github.com/miraclx/freyr-js/issues/452.

v0.10.2 coming soon.

periode commented 11 months ago

@miraclx the apple music error is quite a roadblock in my project. any idea when we could expect v0.10.2? otherwise i'll build from source directly :)

thanks!

miraclx commented 11 months ago

I was hoping to have https://github.com/miraclx/freyr-js/pull/582 as well, make it v0.11.0, but it's alright, I'll make that patch release today.

periode commented 11 months ago

@miraclx great, thanks! in the long-term, i'm wondering if there could be a way to update developer tokens independently of the binary itself, the way youtube-dl and others do it?

miraclx commented 11 months ago

I would've loved to automate the process, really.. Since we're really just taking the token from music.apple.com, it's not a custom token or anything, which is also why it expires.

I'll open a tracking issue for this. Maybe a kind soul can take it up.

miraclx commented 11 months ago

Filed in https://github.com/miraclx/freyr-js/issues/590.