Phantombot no longer online in Discord

PhantomBot Version: 3.0.0
OS Version: Linux (on Raspberry Pi 3)
Java Version: 1.8.0_40-internal-b04
Browser and Version (for Panel Support): 1.00, Chrome, Template version 2.4.0
Stock PhantomBot: Yes

Let us know what help you need:

Until today, my bot was on my Discord server, online and working properly. I had everything setup properly on the botlogin.txt (I am correctly using the client_id to add the bot and also using the token in botlogin.txt (As I said, it all worked fine until today).

I recently updated Discord to the latest version, and I think that might be the culprit as to why Phantombot no longer wants to connect. I tried to kick him from the server, give him a new oauth / client id and token…but to no avail. Is this a Phantombot or a Discord problem?

It is important to note I do have access to the web panel and the bot still works in chat on Twitch. It just no longer works on Discord.

I’m open to any feedback!

Check the stack trace and error logs, and when the bot boots see if it indicates that it authenticates with Discord. My guess is the authentication is failing for a reason, especially if you never see it login.

Hi IllusionaryOne. I am getting an error in the logs. Here it is:

[06-04-2019 @ 21:10:39.791 GMT-04:00] [init.js:325] Error with Event Handler [twitchHosted] Script [./discord/handlers/hostHandler.js] Stacktrace [hostHandler.js:120 > init.js:323 > init.js:601] Exception [JavaException: jaon: java.lang.NullPointerException: null]

Another log, just the day before also gave me this one:

[06-03-2019 @ 17:04:24.853 GMT-04:00] [init.js:325] Error with Event Handler [ow] Script [./discord/handlers/followHandler.js] Stacktrace [followHandler.js:60 > init.js:323 > init.js:580] Exception [JavaException: java.lang.NullPointerException: null]

I get this error when starting the bot:

Jun 05 21:39:52 raspberrypi[21345]: [06-05-2019 @ 21:39:52.701 GMT] [ERROR] [connect()] Failed to authenticate with Discord: [DiscordException] Exception (NullPointerException) occurred while logging in: null

Just for kicks, I tried deleting the Discord “app” for the bot and readding it as a fresh new bot. I followed the steps here Discord Integration Setup, but it still didn’t seem to work. I still receive the error displayed above. Something tells me something broke in the latest Discord patch that makes Phantombot not work anymore.

I have no issues with Discord on 3 production bots that I run, all 3 are connecting fine to Discord. My development bot is also connecting without issue.

The follower and host handlers error are due to not being able to connect to Discord.

The authentication error is what it says - there is an authentication failure. I have seen the Pi have authentication errors with several services in the past. This may be a Raspberry Pi issue. Ensure that you are using the Oracle version of Java 8.

So you know that I am not just making up the lack of connectivity issues on my side, this is my bot announcing streams:

Is there a particular reason why my Raspberry Pi would suddenly update the Java version though? I’ve been running Oracle 8 the entire time (as far as I know?), but it suddenly stops working now? It seems strange to suddenly update without pushing it, especially on a Pi.

As a reference, I just checked the java version on the pi console, here is what I got:

openjdk version “1.8.0_40-internal”
OpenJDK Runtime Environment (build 1.8.0_40-internal-b04)
OpenJDK Zero VM (build 25.40-b08, interpreted mode)

EDIT Welp…I just realised that OpenJDK is NOT Oracle…So I guess I’ll go do that now. Still find it weird that it used to work flawlessly until today.

EDIT 2 And look at that! After updating my Java to the Oracle version and updating my Raspberry Pi. It all worked out!

Thanks for the help IllusionaryOne!

1 Like

Don’t ask me why OpenJDK has issues but I know it has issues with SSL certificates and connectivity. It could be that Discord did update some certificates with the client update and that broke the OpenJDK that was working before. I have seen OpenJDK fail connectivity to Twitch and GitHub and other services, so it is the first thing I take a guess at. It could also be because you updated your Pi and that may have updated root certificates.

Glad it is working now and cheers!

i run openjdk with ssl totaly fine :slight_smile:

╭─[hecodes2much as root in ~ at Wed Jun 05, 21:09] 
╰─[ǂ] java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b03-0ubuntu1.19.04.2-b03)
OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode)

Revision 212, not 40, and we have seen items come up on Raspberry Pi specifically. I am guessing that isn’t Pi because it’s 64-bit :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.