Bot keeps becoming unresponsive

PhantomBot Version: 3.0.0 (Revision: fcc08b51)
OS Version: Linux - Ubuntu 16.04
Java Version: 1.8.0_222-8u222-b10-1ubuntu1~16.04.1-b10
Stock PhantomBot: Yes

After some time of being active in Twitch chat, the bot stops responding to commands or posting into twitch chat. It’s still connected to the Twitch chat and shows up in the user list in the Twitch chat and as online on Discord. The Dashboard is also accessible too.

Nothing was posted to the logs around the time of disconnect, only shortly after when it was restarted.

This was the final messages before the problem occured in this instance (I think the loss icons was just the standard Twitch chat visual bug, it wasn’t removed as moderator or anything):

This was in /logs/error 4 hours earlier:

[01-16-2020 @ 15:34:27.115 PST] [init.js:325] Error with Event Handler [ircChannelLeave] Script [./core/permissions.js] Stacktrace [permissions.js:725 > init.js:323 > init.js:643] Exception [TypeError: Cannot read property “0” from undefined]

And this is from after restarting the bot:

[01-16-2020 @ 03:54:37.989 GMT] java.lang.ArrayIndexOutOfBoundsException: 1
at tv.phantombot.twitch.irc.TwitchWSIRCParser.parseLine(
at tv.phantombot.twitch.irc.TwitchWSIRCParser.parseData(
at tv.phantombot.twitch.irc.TwitchWSIRC$

[01-16-2020 @ 03:54:54.227 GMT] (Permission denied)
at Method)
at tv.phantombot.PhantomBot.(
at tv.phantombot.PhantomBot.main(

[01-16-2020 @ 03:55:20.299 GMT] (Permission denied)
at Method)
at tv.phantombot.PhantomBot.(
at tv.phantombot.PhantomBot.main(

Weirdly enough, the restart command doesn’t work either. You have to run stop and then start instead.

I was wondering if updating to the nightly build will fix but concerned about other issues that might come with it.

Thank you for help in advance!

I have been experiencing this as well and also happened when the Twitch chat badges disappear. In my case, it does get removed from moderators from permissions and re-adding it as a caster fixes the issue.

I was able to also locally reproduce the behaviour by re-creating the old test faketwitchmsg and running something like:

faketwitchmsg @badge-info=;badges=premium/1;color=#1E90FF;display-name=BotName;emote-sets=0,300206312;mod=0;subscriber=0;user-type= USERSTATE #emptym

multiple times and then the bot later stops responding. I had to run it ~3 times to get the behaviour. I’m not sure if this is what happens when the badges are missing but it might be.

I also tried hardcoding the bot name in this if statement:

and the bot was no longer going unresponsive so it really seems like the issue. These error messages seem to be console logs so we don’t really see these in the errors logs.

I was also hoping if there can be a long term fix for this

1 Like

Any input on this from the devs?