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.49k stars 94 forks source link

Failed to detect an internet connection. #541

Open LeBradshaw opened 1 year ago

LeBradshaw commented 1 year ago

I just installed freyr, and although I do have an internet connection it doesn't seem to be able to reach out. I imagine it has something to do with firewall rules.

image

LeBradshaw commented 1 year ago

image Read through an old ticket and tried disabling the net check, got this.

miraclx commented 1 year ago

A new release is yet to be cut. And the old releases still have now-invalid credentials.

Reinstall freyr using the latest version of the source code.

npm install miraclx/freyr-js
LeBradshaw commented 1 year ago

Okay, tried that but it doesn't seem to have changed anything. Got this during the install, so it could be related. image It still says version 9.0, what should it say?

LeBradshaw commented 1 year ago

image also checked the source instructions and triied the line from there

miraclx commented 1 year ago

It still says version 9.0, what should it say?

0.9.1

Try this instead

$ git clone https://github.com/miraclx/freyr-js
$ cd freyr-js
$ npm install
$ npm link

Now, try using freyr again. It should say 0.9.1

LeBradshaw commented 1 year ago

Thanks for reaching out! Unfortunately, now it says 0.10.0.... and still detects no internet connection. Maybe I should try on a different machine, but I can't help bt wonder what's causing that.

image

miraclx commented 1 year ago

Yeah, I just released 0.10.0. You can npm install that since it's up to date.

As for the network issue, there's still work to be done. Try adding --no-net-check to make sure freyr behaves correctly without the check. And we'll figure out why the check fails.

LeBradshaw commented 1 year ago

Cool! That's great to hear, I've been pretty stoked about this project.

image

here's the --no-net-check, it seems to be executing fine besides the network hitch.

miraclx commented 1 year ago

It hasn't made any network requests yet. It validated the input query and reported that it doesn't support YouTube links.

You have to use either a Spotify, Apple Music, or Deezer link.

LeBradshaw commented 1 year ago

Well how about that!

image

It still fails the net check, but seems to work if you skip it. After this I tried it in a directory that wasn't system32 and it worked beautifully! Fantastic!

LeBradshaw commented 1 year ago

It doesn't work for apple music, about to try Deezer.

image

miraclx commented 1 year ago

Seems like a weird link. Does that open in the browser? It normally doesn't say /song/, it says /album/.

miraclx commented 1 year ago

Apparently so! I just tested it with a custom link

https://music.apple.com/us/song/1699712652 opens a song-specific page, whereas the standard https://music.apple.com/us/album/delresto-echoes-feat-beyonc%C3%A9/1699712635?i=1699712652 highlights the song as part of the album.

I'll open an issue tracking the support of this format.

LeBradshaw commented 1 year ago

Indeed! and I can confirm that trying to download the whole album works fine.

miraclx commented 1 year ago

@LeBradshaw, I've added support for song-type URLs like in your case - https://github.com/miraclx/freyr-js/pull/552.

I'll cut a release as v0.10.1. After which, when you update, it should work just fine.

Thanks for contributing to making freyr more capable!

miraclx commented 1 year ago

As for the network connection issue, I think we should try a few things:

$ curl https://icanhazip.com
107.53.232.145

You should see an IP address, which represents your public IP.

If that works, we can proceed to more involved steps to find out what exactly is up with freyr

$ git clone https://github.com/miraclx/freyr-js
$ cd freyr-js
$ npm install

Now, let's step into an interactive node session to inspect

$ node
> let pip = await import("public-ip");
> pip.publicIp({ onlyHttps: true });
107.53.232.145

You should see the same IP address as earlier.

miraclx commented 1 year ago

Ping @LeBradshaw, whenever you find the time.

LeBradshaw commented 11 months ago

Sorry I didn't notice this! image this is what I get.

LeBradshaw commented 11 months ago

image Here is the IP I pulled, for the record. No issues there.

miraclx commented 11 months ago

Let's put await in front so we get the result of the promise.

$ node
> let pip = await import("public-ip");
> await pip.publicIp({ onlyHttps: true });
43.53.232.125
LeBradshaw commented 11 months ago

much of the same. I feel like I must be doing something wrong. image

Also, I found something really weird. The track "Fly in the freedom" tries to pull from youtube music, but the file it tries to fetch is almost 600 megs. I don't think freyr is at fault, but I wonder what file it's trying to pull. https://music.apple.com/us/album/fly-in-the-freedom/915244168?i=915244220 the rest of the album works fine.

miraclx commented 11 months ago

you forgot the await in front of pip.public...

Thanks for noting that, I'll have a look.

miraclx commented 8 months ago

Looks like it's trying to download this - https://www.youtube.com/watch?v=lH_OmS4nvq8

😅 I didn't write any classifiers for YouTube Music, as I did YouTube which would've filtered this result out.

What you can do, for now.. for this particular track, is to force freyr to use the YouTube source

$ freyr -S youtube https://music.apple.com/us/album/fly-in-the-freedom/915244168?i=915244220
miraclx commented 8 months ago

Just realized the orignal issue may still persist.

@LeBradshaw, can you confirm if freyr works nominally on your end on the latest release?