Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constantly get "Request failed with status code 403" #681

Open
poweronoff opened this issue Jul 19, 2024 · 10 comments
Open

Constantly get "Request failed with status code 403" #681

poweronoff opened this issue Jul 19, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@poweronoff
Copy link

poweronoff commented Jul 19, 2024

I run freyr on mac in the version v0.10.3.

Since a few weeks, I get the following error message:

...
[•] Identifying service...[Apple Music]
 [•] Checking authentication...[authenticated]
 Detected [track]
.......
....
| ➤ Collating sources...
    |  ➤ [•] YouTube Music...[success, found 1 source]
    | ➤ Awaiting audiofeeds...[done]
    | [✓] Got album art
Failed to get raw media stream [An error occurred while collecting and parsing information from the URL: Request failed with status code 403]
...

It seems that one of the services responses with 403 (unauthorised), but I have no idea which of them and if there are any credentials needed.

@Panic1811
Copy link

Having same issue

@miguelmllr
Copy link

Same issue here

@miraclx
Copy link
Owner

miraclx commented Jul 20, 2024

Interesting, I'll block out some time to look into this as I'm unfortunately unable to reproduce it.

From those partial logs, it looks like we can access YouTube Music

|  ➤ [•] YouTube Music...[success, found 1 source]

and YouTube just fine

| ➤ Awaiting audiofeeds...[done]

So It's downloading the track from the URL sourced from YouTube that fails, which is a manual implementation.

Can any of you provide any tracks I can test with?

I just tried spotify:track:6aLsBnxshrEmFAmoPu57d6 and it seemed to work:

$ freyr spotify:track:6aLsBnxshrEmFAmoPu57d6 --no-net-check
    ____
   / __/_______  __  _______
  / /_/ ___/ _ \/ / / / ___/
 / __/ /  /  __/ /_/ / /
/_/ /_/   \___/\__, /_/
              /____/ v0.10.3

freyr - (c) Miraculous Owonubi <[email protected]>
------------------------------------------------------
Checking directory permissions...[done]
[spotify:track:6aLsBnxshrEmFAmoPu57d6]
 [•] Identifying service...[Spotify]
 [•] Checking authentication...[unauthenticated]
 [Spotify Login]
  [•] Logging in...[done]
 Detected [track]
 Obtaining track metadata...[done]
  ➤ Title: American Sun
  ➤ Album: American Sun
  ➤ Artist: Fire From The Gods
  ➤ Year: 2019
  ➤ Playtime: 03:38
 [•] Collating...
 • [03 American Sun]
    | ➤ Collating sources...
    |  ➤ [•] YouTube Music...[success, found 5 sources]
    | ➤ Awaiting audiofeeds...[done]
    | [✓] Got album art
    | [✓] Got raw track file
    | [•] Post Processing...
 [•] Download Complete
 [•] Embedding Metadata...
  • [✓] 03 American Sun
[•] Collation Complete
============ Stats ============
 [•] Runtime: [16.3s]
 [•] Total queries: [01]
 [•] Total tracks: [01]
     » Skipped: [00]
     ✓ Passed:  [01]
     ✕ Failed:  [00]
 [•] Output directory: [.]
 [•] Total Output size: 8.94 MB
 [•] Total Network Usage: 3.72 MB
     ♫ Media: 3.53 MB
     ➤ Album Art: 187.11 KB
 [•] Output bitrate: 320k
===============================

@miraclx
Copy link
Owner

miraclx commented Jul 20, 2024

as I'm unfortunately unable to reproduce it.

Hold that thought, I just tried the track reported in #680 and that failed

$ freyr https://music.apple.com/us/album/im-sorry-im-not-sorry-ep/1491795443
    ____
   / __/_______  __  _______
  / /_/ ___/ _ \/ / / / ___/
 / __/ /  /  __/ /_/ / /
/_/ /_/   \___/\__, /_/
              /____/ v0.10.3

freyr - (c) Miraculous Owonubi <[email protected]>
------------------------------------------------------
Checking directory permissions...[done]
[https://music.apple.com/us/album/im-sorry-im-not-sorry-ep/1491795443]
 [•] Identifying service...[Apple Music]
 [•] Checking authentication...[unauthenticated]
 [Apple Music Login]
  [•] Logging in...[done]
 Detected [album]
 Obtaining album metadata...[done]
  ➤ Album Name: I'm Sorry, I'm Not Sorry
  ➤ Artist: Sody
  ➤ Tracks: 4
  ➤ Type: Album
  ➤ Year: 2020
  ➤ Genres: Singer/Songwriter, Music
 [•] Collating [I'm Sorry, I'm Not Sorry]...
  [•] Inquiring tracks...[done]
   • [01 What We Had]
      | ➤ Collating sources...
      |  ➤ [•] YouTube Music...[success, found 3 sources]
      | ➤ Awaiting audiofeeds...[done]
      | [✓] Got album art
      | [✕] Failed to get raw media stream [An error occurred while collecting and parsing information from the URL: Request failed with status code 403]
   • [02 Reason To Stay]
      | ➤ Collating sources...
      |  ➤ [•] YouTube Music...[success, found 4 sources]
      | ➤ Awaiting audiofeeds...[done]
      | [✓] Got album art
      | [✕] Failed to get raw media stream [An error occurred while collecting and parsing information from the URL: Request failed with status code 403]
   • [03 Nothing Ever Changes]
      | ➤ Collating sources...
      |  ➤ [•] YouTube Music...[success, found 1 source]
      | ➤ Awaiting audiofeeds...[done]
      | [✓] Got album art
      | [✕] Failed to get raw media stream [An error occurred while collecting and parsing information from the URL: Request failed with status code 403]
   • [04 Love's a Waste]
      | ➤ Collating sources...
      |  ➤ [•] YouTube Music...[success, found 2 sources]
      | ➤ Awaiting audiofeeds...[done]
      | [✓] Got album art
      | [✕] Failed to get raw media stream [An error occurred while collecting and parsing information from the URL: Request failed with status code 403]
 [•] Download Complete
 [•] Embedding Metadata...
  • [✕] 01 What We Had [apple_music:track:1491795452] (failed: Error downloading raw audio [An error occurred while collecting and parsing information from the URL: Request failed with status code 403])
  • [✕] 02 Reason To Stay [apple_music:track:1491795455] (failed: Error downloading raw audio [An error occurred while collecting and parsing information from the URL: Request failed with status code 403])
  • [✕] 03 Nothing Ever Changes [apple_music:track:1491795607] (failed: Error downloading raw audio [An error occurred while collecting and parsing information from the URL: Request failed with status code 403])
  • [✕] 04 Love's a Waste [apple_music:track:1491795614] (failed: Error downloading raw audio [An error occurred while collecting and parsing information from the URL: Request failed with status code 403])
[•] Collation Complete
============ Stats ============
 [•] Runtime: [19.1s]
 [•] Total queries: [01]
 [•] Total tracks: [04]
     » Skipped: [00]
     ✓ Passed:  [00]
     ✕ Failed:  [04]
 [•] 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
===============================

looking into it

@miraclx miraclx added the bug Something isn't working label Jul 20, 2024
@miraclx
Copy link
Owner

miraclx commented Jul 21, 2024

It looks like this is due to YouTube changing its client source extractor behavior, of which youtube-dl has been updated to match.

The fix here is to reinstall freyr, which will pull the latest version of youtube-dl.

And if you have a local clone of freyr, all you have to do is:

$ cd freyr-js
$ npm uninstall youtube-dl-exec --no-save && npm install

@poweronoff
Copy link
Author

Reinstallation of the youtube-dl-exec helped. Thanks, mate @miraclx

@tobeehh
Copy link

tobeehh commented Aug 7, 2024

same issue in the docker version, unfortunately.

@casrhub
Copy link

casrhub commented Aug 7, 2024

Awesome, reinstallation worked for me, thanks for explaining the problem @miraclx

@dannykorpan
Copy link

same issue in the docker version, unfortunately.

Use the image freyrcli/freyrjs-git:master instead.

@puff-dayo
Copy link

Use the image freyrcli/freyrjs-git:master instead.

Thanks, that fixed it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants