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

Unspecified addresses exception trying to reproduce audio #29

Open
jfebrerc opened this issue Oct 15, 2022 · 0 comments
Open

Unspecified addresses exception trying to reproduce audio #29

jfebrerc opened this issue Oct 15, 2022 · 0 comments

Comments

@jfebrerc
Copy link

Whenever I try to use the "GetTracksAsync" method, I'm getting this exception: "Exception: IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address. (Parameter 'hostName') (0.0.0.0:2333)".

My lavalink server is setup in a rpi and I'm trying to run the code from my local computer.

This is my code in the Program.cs file

    LavalinkManager lavalinkManager = new LavalinkManager(client, new LavalinkManagerConfig
    {
        RESTHost = "192.168.0.198",
        RESTPort = 2333,
        WebSocketHost = "192.168.0.198",
        WebSocketPort = 2333,
        Authorization = "youshallnotpass",
        TotalShards = 1
    });
    [....]
    client.ShardReady += async(socketManager) =>
    {
        await lavalinkManager.StartAsync();
    };

And I'm using the sample code to run the audio:

LavalinkPlayer player = _lavalinkManager.GetPlayer(Context.Guild.Id) ?? await _lavalinkManager.JoinAsync((Context.User as IGuildUser)?.VoiceChannel);

// Now that we have a player we can go ahead and grab a track and play it
LoadTracksResponse response = await _lavalinkManager.GetTracksAsync($"ytsearch:{query}");
// Gets the first track from the response
LavalinkTrack track = response.Tracks.First();
await player.PlayAsync(track);

This is my application.yml config file and my Lavalink server output.

I tried changing the address from the application.yml file to "192.168.0.198"(rpi's ip), leaving it at "0.0.0.0" and now using the "127.0.0.1" but I'm not sure why I'm getting the exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant