freyr-js icon indicating copy to clipboard operation
freyr-js copied to clipboard

Failed to detect an internet connection.

Open LeBradshaw opened this issue 2 years ago • 24 comments

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 avatar Jul 12 '23 00:07 LeBradshaw

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

LeBradshaw avatar Jul 12 '23 01:07 LeBradshaw

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

miraclx avatar Jul 12 '23 01:07 miraclx

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 avatar Jul 12 '23 01:07 LeBradshaw

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

LeBradshaw avatar Jul 12 '23 01:07 LeBradshaw

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

miraclx avatar Aug 07 '23 20:08 miraclx

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

LeBradshaw avatar Aug 08 '23 01:08 LeBradshaw

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.

miraclx avatar Aug 08 '23 01:08 miraclx

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.

LeBradshaw avatar Aug 08 '23 01:08 LeBradshaw

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.

miraclx avatar Aug 08 '23 01:08 miraclx

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 avatar Aug 08 '23 01:08 LeBradshaw

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

image

LeBradshaw avatar Aug 08 '23 01:08 LeBradshaw

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

miraclx avatar Aug 08 '23 01:08 miraclx

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.

miraclx avatar Aug 08 '23 01:08 miraclx

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

LeBradshaw avatar Aug 08 '23 01:08 LeBradshaw

@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 avatar Aug 08 '23 03:08 miraclx

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 avatar Aug 08 '23 04:08 miraclx

Ping @LeBradshaw, whenever you find the time.

miraclx avatar Aug 19 '23 04:08 miraclx

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

LeBradshaw avatar Sep 17 '23 01:09 LeBradshaw

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

LeBradshaw avatar Sep 17 '23 01:09 LeBradshaw

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

miraclx avatar Sep 17 '23 09:09 miraclx

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.

LeBradshaw avatar Sep 18 '23 01:09 LeBradshaw

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

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

miraclx avatar Sep 18 '23 02:09 miraclx

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 avatar Jan 01 '24 21:01 miraclx

Just realized the orignal issue may still persist.

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

miraclx avatar Jan 01 '24 22:01 miraclx