xlash123 / KHUx-Discord-Bot

A Discord bot that will aid players in getting information about the mobile game Kingdom Hearts Union X.
12 stars 7 forks source link

Bot won't start up #41

Closed BladeofRagna closed 5 years ago

BladeofRagna commented 5 years ago

Restarted my computer a few days ago and forgot to reload the bot again. Trying to use it now ends up with it crashing right away without any notice and can't copy down what it's displaying before the crash. Feel like this was a similar issue in the past though i can't seem to find any solutions this time 'round.

Bot Version is up to date, as is Java.

xlash123 commented 5 years ago

Open a terminal in the same directory and start the bot using java -jar khuxbot.jar run, of course replacing khuxbot.jar with the file name. This should let you see the error that is happening. Post that error log here and I can help.

BladeofRagna commented 5 years ago

Still crashes no matter what I do. D:

xlash123 commented 5 years ago

That sucks. Without an error log, I can’t do much. Tell me what Java version your running (run java -version). Also, try deleting the config.properties file in the config folder (take note of your salt count if you want to keep that). Reenter your bot token upon startup if it gets that far.

BladeofRagna commented 5 years ago

java version "1.8.0_211" I can delete the config and run that there and putting in my bot token works as well. When looking closer just before it crashes, it seems to crash after initialization right after loading the keyblade data.

xlash123 commented 5 years ago

Can you run it with the command I gave you before and copy and past the output of the program here? Also, what OS are you running?

BladeofRagna commented 5 years ago

Running bot version: 1.11.0 New update available. Download at - https://github.com/xlash123/KHUx-Discord-Bot/releases Initializing... Created Starlight Created Treasure Trove Created Lady Luck Created Three Wishes Created Olympia Created Divine Rose Created Moogle O' Glory Created Sleeping Lion Created Counterpoint Created Stroke of Midnight Created Fenrir Created Darkgnaw Created Missing Ache Created Fairy Stars Created Diamond Dust Exception in thread "main" java.lang.UnsupportedOperationException: JsonNull at com.google.gson.JsonElement.getAsString(JsonElement.java:192) at xlash.bot.khux.keyblades.KeybladeDeserilizer.deserialize(KeybladeDeserilizer.java:48) at xlash.bot.khux.keyblades.KeybladeDeserilizer.deserialize(KeybladeDeserilizer.java:1) at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69) at com.google.gson.Gson.fromJson(Gson.java:888) at com.google.gson.Gson.fromJson(Gson.java:953) at com.google.gson.Gson.fromJson(Gson.java:926) at xlash.bot.khux.keyblades.KeybladeHandler.updateKeybladeData(KeybladeHandler.java:71) at xlash.bot.khux.keyblades.KeybladeHandler.(KeybladeHandler.java:33) at xlash.bot.khux.KHUxBot.initialize(KHUxBot.java:156) at xlash.bot.khux.KHUxBot.(KHUxBot.java:128) at xlash.bot.khux.KHUxBot.main(KHUxBot.java:99)

OK!! I got this using Windows PowerShell (Rather than CMD) and this is what popped up. (No idea why that was such a headache to do LOL)

xlash123 commented 5 years ago

Awesome! I can work with this. I’ll try to have the fix up by tomorrow. Until then, the hosted version is still operating.

Kujaku93 commented 5 years ago

Having the same issue actually. Not sure what happened other than maybe a discord update. Crashes on launch on both my computer and laptop. Thanks for making this bot btw, Awesome tool :D

xlash123 commented 5 years ago

Nope. It was due to the new Keyblade and the fact that KHUXTracker hasn't finished gathering all of the data for it yet. The bot was reading invalid data and crashed. I have fixed this in the latest release 1.11.1 and have taken some extra precaution so that this doesn't happen again.