jagrosh / MusicBot

🎶 A Discord music bot that's easy to set up and run yourself!
https://jmusicbot.com
Apache License 2.0
5.38k stars 2.57k forks source link

[Music not playing] This is how you fix the error #1700

Closed xCastorm closed 1 month ago

xCastorm commented 1 month ago

Bug Description

First

git clone https://github.com/elijahtaylorr/MusicBot.git
cd MusicBot

Then check if maven is installed

mvn -v

If maven isn't installed

sudo apt install maven

Now compile the code

mvn clean install

If you get an error, open the YML file and replace

<dependency>
    <groupId>com.jagrosh</groupId>
    <artifactId>jda-utilities</artifactId>
    <version>3.0.5</version>
    <type>pom</type>
</dependency>

With

<dependency>
    <groupId>com.github.Nagami-Yukki</groupId>
    <artifactId>JDA-Utilities</artifactId>
    <version>1.0</version>
</dependency>

compile again

mvn clean install

Your working jar file is in MusicBot/target.

Steps to Reproduce

1

Expected Result

1

Debug Output

1

Additional Info

No response

Checklist

JMusicBot Version

0.4.3

purnell569 commented 1 month ago

can confirm this works. i did it from windows and then uploaded to unix machine but was the same steps. just for others, with the editing Line 48 <groupId>com.github.Nagami-Yukki</groupId> Line 49 <artifactId>JDA-Utilities</artifactId> Line 50 <version>1.0</version>

Dankius1 commented 1 month ago

can confirm this works. i did it from windows and then uploaded to unix machine but was the same steps. just for others, with the editing Line 48 <groupId>com.github.Nagami-Yukki</groupId> Line 49 <artifactId>JDA-Utilities</artifactId> Line 50 <version>1.0</version>

How exactly do you recreate this on WIndows? I'm stuck at the Maven step, that is if it is even required.

purnell569 commented 1 month ago

can confirm this works. i did it from windows and then uploaded to unix machine but was the same steps. just for others, with the editing Line 48 <groupId>com.github.Nagami-Yukki</groupId> Line 49 <artifactId>JDA-Utilities</artifactId> Line 50 <version>1.0</version>

How exactly do you recreate this on WIndows? I'm stuck at the Maven step, that is if it is even required.

not the easiest steps, but once uve downloaded maven, u have to do the same thing as you wouldve done with java. just a dumbed down step-by-step for peoples (no offence to anyone, just incase some dont get it) windows key type "PC" rightclick "PC" and click to "properties" in the search bar, type "advanced system" and click on "advanced system settings" in advanced tab, click "Environment Variables" In the "system variables" area down the bottom, click on "path" and click "Edit" click "New" and add in: C:\Program Files\apache-maven-3.9.9\bin or wherever youve put maven click okay, and done! image

it takes like 30 seconds, ive just added every single click

xCastorm commented 1 month ago

can confirm this works. i did it from windows and then uploaded to unix machine but was the same steps. just for others, with the editing Line 48 <groupId>com.github.Nagami-Yukki</groupId> Line 49 <artifactId>JDA-Utilities</artifactId> Line 50 <version>1.0</version>

How exactly do you recreate this on WIndows? I'm stuck at the Maven step, that is if it is even required.

On windows install a package manager, like scoop

Open Powershell as an admin type Set-ExecutionPolicy RemoteSigned -Scope CurrentUser then iwr -useb get.scoop.sh | iex Verify your install scoop --version Install maven with scoop Open CMD.exe

scoop install maven

scoop install git

now you can continue with my tutorial

xCastorm commented 1 month ago

Purnell's way works aswell, but a package manager should do those steps for you.

Dankius1 commented 1 month ago

I'm going to save you fellas the trouble and just provide the finalized fixed java file. All respect to you guys, but I got lucky and solved it, but there was really no way to really digest this kind of info you guys provided if you're uninitiated like I am.

https://drive.google.com/file/d/12AnoApPNHNXK0zWeoP3S3ld5zONwqL4b/view?usp=sharing

xCastorm commented 1 month ago

I'm going to save you fellas the trouble and just provide the finalized fixed java file. All respect to you guys, but I got lucky and solved it, but there was really no way to really digest this kind of info you guys provided if you're uninitiated like I am.

https://drive.google.com/file/d/12AnoApPNHNXK0zWeoP3S3ld5zONwqL4b/view?usp=sharing

I gave you a step by step tutorial on how to compile it on windows?

The point of my post was to help people learn to compile it themselves, instead of trusting a random JAR There are already forks with JARs but those are compiled by other people of course. See https://github.com/jagrosh/MusicBot/issues/1694 https://github.com/xPrinny/MusicBot/releases

In future, just ask chatgpt + the instructions to get a better understanding.

UberMentch commented 1 month ago

can confirm this works. i did it from windows and then uploaded to unix machine but was the same steps. just for others, with the editing Line 48 <groupId>com.github.Nagami-Yukki</groupId> Line 49 <artifactId>JDA-Utilities</artifactId> Line 50 <version>1.0</version>

How exactly do you recreate this on WIndows? I'm stuck at the Maven step, that is if it is even required.

On windows install a package manager, like scoop

Open Powershell as an admin type Set-ExecutionPolicy RemoteSigned -Scope CurrentUser then iwr -useb get.scoop.sh | iex Verify your install scoop --version Install maven with scoop Open CMD.exe

scoop install maven

scoop install git

now you can continue with my tutorial

Alternatively, they can set up and use WSL (windows subsystem for linux)

Tako88 commented 1 month ago

I did this process yesterday and it worked with replacing the dependency, but I'm not sure why that's needed? Haven't compiled any Java apps before, so new to me. The original one did seem to exist in one of the repos so kind of confused why it wasn't found.

HKallaste commented 1 month ago

I can't seem to find the right YML file, there's 2 config ones - one in circleci and one in github and neither looks like what you meant. What is it I'm looking for?

Tako88 commented 1 month ago

I can't seem to find the right YML file, there's 2 config ones - one in circleci and one in github and neither looks like what you meant. What is it I'm looking for?

pom.xml in the project root.

pl0xe commented 1 month ago

this works for now, i'm using the snapshot-all jar!

AlmostHuman34 commented 1 month ago

I'm going to save you fellas the trouble and just provide the finalized fixed java file. All respect to you guys, but I got lucky and solved it, but there was really no way to really digest this kind of info you guys provided if you're uninitiated like I am.

https://drive.google.com/file/d/12AnoApPNHNXK0zWeoP3S3ld5zONwqL4b/view?usp=sharing

Did you deleted that? I somehow after all of those commands have 20 pom.xml and none of them had the line mentioned to replace. There is so much hassle recently with this bot that it stops working every few days. For someone not tech savy it's quite complicated.

jagrosh commented 1 month ago

This is out-of-scope for this project. We're working on a fix, which is being tracked in #1670

AlmostHuman34 commented 1 month ago

this works for now, i'm using the snapshot-all jar!

I'm going to save you fellas the trouble and just provide the finalized fixed java file. All respect to you guys, but I got lucky and solved it, but there was really no way to really digest this kind of info you guys provided if you're uninitiated like I am.

https://drive.google.com/file/d/12AnoApPNHNXK0zWeoP3S3ld5zONwqL4b/view?usp=sharing

Stopped working, snapshot has an error now or quits channel again, worked for 2-3 days.

Dankius1 commented 1 month ago

this works for now, i'm using the snapshot-all jar!

I'm going to save you fellas the trouble and just provide the finalized fixed java file. All respect to you guys, but I got lucky and solved it, but there was really no way to really digest this kind of info you guys provided if you're uninitiated like I am. https://drive.google.com/file/d/12AnoApPNHNXK0zWeoP3S3ld5zONwqL4b/view?usp=sharing

Stopped working, snapshot has an error now or quits channel again, worked for 2-3 days.

Strange, I'm using it right now to play a Youtube video no issue. Are you using it with 0.4.3 but with the snapshot jar to launch? That's all I'm using, no other bells and whistles. I know it doesn't work with VPN or flagged IP's. Maybe that is causing your issue? I don't know if generating a new bot token could fix that. Rather inexperienced with Youtube shenanigans constantly breaking this poor bot.

Dankius1 commented 1 month ago

I'm going to save you fellas the trouble and just provide the finalized fixed java file. All respect to you guys, but I got lucky and solved it, but there was really no way to really digest this kind of info you guys provided if you're uninitiated like I am. https://drive.google.com/file/d/12AnoApPNHNXK0zWeoP3S3ld5zONwqL4b/view?usp=sharing

Did you deleted that? I somehow after all of those commands have 20 pom.xml and none of them had the line mentioned to replace. There is so much hassle recently with this bot that it stops working every few days. For someone not tech savy it's quite complicated.

No sorry, I wrapped it in a URL style not realizing that it would try to link it to a project inside github. Can you tell I don't interact with github very much?

AlmostHuman34 commented 1 month ago

this works for now, i'm using the snapshot-all jar!

I'm going to save you fellas the trouble and just provide the finalized fixed java file. All respect to you guys, but I got lucky and solved it, but there was really no way to really digest this kind of info you guys provided if you're uninitiated like I am. https://drive.google.com/file/d/12AnoApPNHNXK0zWeoP3S3ld5zONwqL4b/view?usp=sharing

Stopped working, snapshot has an error now or quits channel again, worked for 2-3 days.

Strange, I'm using it right now to play a Youtube video no issue. Are you using it with 0.4.3 but with the snapshot jar to launch? That's all I'm using, no other bells and whistles. I know it doesn't work with VPN or flagged IP's. Maybe that is causing your issue? I don't know if generating a new bot token could fix that. Rather inexperienced with Youtube shenanigans constantly breaking this poor bot.

I use it with 0.4.3 Like I said, worked for me for a few days then went back to normal issue of disconnecting when bot was about to play a song. Worked fine with local music playing but refuses to use either youtube links or titles from there. My IP perhaps was flagged, I dont use vpn right.