jagrosh/MusicBot

[Bug Report] Jmusic-0.4.0 jar file - a java exception has occured

itsCrummy opened this issue · 17 comments

Bug Description

  • a java exception has occured when clicking the 0.4.0 file

Steps to Reproduce

download the latest, then attempt to run it after setting up the file

Expected Result

to load up the music bot

Debug Output

cannot get bot to load - just has a the following thing in the image below
image

Additional Info

No response

Checklist

same here

I believe this is because we have upgraded to Java 11 in version 0.4.0 & you're using Java 8 at the moment. Can you check if you have Java 8 & if you do, upgrade to 11?

seems to work with AdoptOpenJDK x64 11 which can be handily installed via ninite dot com

I believe this is because we have upgraded to Java 11 in version 0.4.0 & you're using Java 8 at the moment. Can you check if you have Java 8 & if you do, upgrade to 11?

that was the reason why - its fixed now thanks

Can you expand on how to update Java? I downloaded version 11 (11.0.22) and confirmed it is the version I am using by typing java -version into the cmd, but I am still getting the error when trying to run the bot.

With just that screenshot it's a bit hard to debug. For anyone still running into this issue, can you share the output of running both java -version and java -jar JMusicBot-0.4.0.jar on the command line

Not sure how helpful this is, but here is my output:
CMDOutputMusicBot

Can you navigate to the folder (cd .. to move up a directory, cd directoryname to move into a directory) that contains the jar; that particular error is just saying that the jar isn't in the folder you're running the command from

Okay, got this
image
image

I went and turned off "Pubic Bot" in the Developer Dashboard, and the bot is now running. But it only opens when stared from the cmd. When I close it and attempt to just open it by clicking the executable, I get the "A Java Exception has occurred" error.

Since when did it change that public mode has to be turned off? I ran into the same problem that the bot didn't start after the update. I only found out the error after starting the bot manually with Java -jar. I had always included it in the autostart of the virtual machine.

With just that screenshot it's a bit hard to debug. For anyone still running into this issue, can you share the output of running both java -version and java -jar JMusicBot-0.4.0.jar on the command line

the issue was because i didnt know i needed Java 11 Lmao - and i dont run it via CMD - but i downloaded Java 11 and it worked so :)

I also encountered this bug. If I have the bot with 'Pubic Bot' on JMuiscBot, it crashes after loading in the user list.

openjdk version "11.0.22" 2024-01-16
OpenJDK Runtime Environment (build 11.0.22+7-post-Debian-1deb11u1)
OpenJDK 64-Bit Server VM (build 11.0.22+7-post-Debian-1deb11u1, mixed mode, sharing)

Please keep in mind that the issue we are tracking is a java exception occurring. This happens immediately upon double-clicking the jar in a desktop environment.

I have the same problem. I have java 21 installed and 4.0 jar fails to start.

@GogoDG public mode has to be turned off in 4.0 idk why they changed. Very disappointed

From this commit comment:

JMusicBot documentation has always instructed users to mark their bots as private. This update is the first update that actually enforces the instructions. The people complaining about this change are likely the vocal minority.

  • JMusicBot's internals are not optimized for running publicly; there are many design patterns within the code that are designed for ease-of-use or ease-of-maintenance that do not scale well to large numbers of servers.

  • The support server frequently has cases of users asking how to remove their bot from someone's server, and the root issue in most of these cases is that they didn't realize that their bot could be added by anyone.

  • (Hopefully this is not as much of an issue as it has been in the past) People have attempted to pass JMusicBot off as their own bot; some have even attempted to get their bot verified (running a bot that they potentially had zero idea how the internals worked).

  • This change does not prevent the bot owner from adding it to servers.

  • This check only occurs at startup; it is still possible to temporarily make it public if the bot owner isn't able to add it to a server that someone else would be able to.