Stream alert not working


#1

PhantomBot Version: 2.4.1
OS Version: Linux
Java Version: 1.8.0
Browser and Version (for Panel Support): 1.1
Stock PhantomBot: Yes

Let us know what help you need:

The bot is not announcing when I go live and not updating its game status either.

If a feature is not working, please provide console output, output from chat, logs, some sort of additional information to help us troubleshoot and provide assistance as needed:

Error:

[05-29-2018 @ 17:52:48.253 EST] [init.js:308] (hook.call, PubSubModerationTimeout, ./discord/core/moderation.js) JavaException: java.lang.NullPointerException: null
[05-29-2018 @ 18:42:20.964 EST] [init.js:308] (hook.call, PubSubModerationTimeout, ./discord/core/moderation.js) JavaException: java.lang.NullPointerException: null
[05-29-2018 @ 19:17:34.218 EST] [init.js:308] (hook.call, PubSubModerationTimeout, ./discord/core/moderation.js) JavaException: java.lang.NullPointerException: null
[05-29-2018 @ 19:21:35.791 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-29-2018 @ 19:25:09.353 EST] [init.js:308] (hook.call, twitter, ./discord/handlers/twitterHandler.js) JavaException: java.lang.NullPointerException: null
[05-29-2018 @ 19:26:03.323 EST] [init.js:308] (hook.call, twitter, ./discord/handlers/twitterHandler.js) JavaException: java.lang.NullPointerException: null
[05-29-2018 @ 19:26:31.253 EST] [init.js:308] (hook.call, twitchOffline, ./discord/handlers/streamHandler.js) JavaException: java.lang.NullPointerException: null
[05-29-2018 @ 20:17:08.189 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-29-2018 @ 21:23:56.755 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-29-2018 @ 21:44:07.654 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-29-2018 @ 22:07:23.602 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-29-2018 @ 22:27:47.041 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-29-2018 @ 22:40:29.765 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-29-2018 @ 23:00:11.473 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-29-2018 @ 23:10:56.649 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-29-2018 @ 23:28:18.321 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-30-2018 @ 00:00:35.727 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-30-2018 @ 00:05:08.502 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-30-2018 @ 00:36:11.521 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-30-2018 @ 02:06:34.690 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-30-2018 @ 02:13:46.871 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-30-2018 @ 02:38:07.042 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-30-2018 @ 02:55:46.460 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-30-2018 @ 03:09:31.318 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-30-2018 @ 03:33:44.912 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-30-2018 @ 03:40:57.159 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-30-2018 @ 03:45:05.010 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-30-2018 @ 03:57:58.960 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-30-2018 @ 04:58:38.784 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-30-2018 @ 06:08:29.745 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-30-2018 @ 07:06:02.273 EST] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null
[05-30-2018 @ 07:17:22.745 EST] [init.js:308] (hook.call, twitchOnline, ./discord/handlers/streamHandler.js) JavaException: java.lang.NullPointerException: null

#2

Hi - can you get the information about the version of Linux and Java from when the bot boots?

[05-30-2018 @ 15:23:01.012 GMT] The working directory is: /usr/local/opt/iobot
[05-30-2018 @ 15:23:01.016 GMT] Detected Java 1.8.0_102 running on Linux 4.8.13-100.fc23.x86_64 (amd64)
[05-30-2018 @ 15:23:01.019 GMT] Enabling Script Reloading

Also, can you show if the bot is connecting properly - was this an upgrade or a fresh install? Was the bot previously working?

Thanks!


#3

Bot connects properly and works but just doesn’t post when stream live


#4

Okay so bot is online and connected to discord but no commands work


#5

[ERROR] [init.js:308] (hook.call, ircPrivateMessage, ./discord/custom/channelmodes.js) JavaException: java.lang.NullPointerException: null

Found this error on startup (channelmodes is a custom script)


#6

Try without your custom script, a script that has bad code can break other things as well.


#7

Nope nothing


#8

Can you try with a fresh install of PhantomBot that doesn’t have any custom scripts.


#9
[06-01-2018 @ 11:15:40.245 EST] [init.js:308] (hook.call, twitchOnline, ./discord/handlers/streamHandler.js) JavaException: java.lang.NullPointerException: null
[06-01-2018 @ 11:16:14.130 EST] [init.js:308] (hook.call, twitter, ./discord/handlers/twitterHandler.js) JavaException: java.lang.NullPointerException: null
[06-01-2018 @ 11:20:58.545 EST] [init.js:308] (hook.call, PubSubModerationTimeout, ./discord/core/moderation.js) JavaException: java.lang.NullPointerException: null
[06-01-2018 @ 11:21:11.674 EST] [init.js:308] (hook.call, PubSubModerationBan, ./discord/core/moderation.js) JavaException: java.lang.NullPointerException: null
[06-01-2018 @ 11:53:12.285 EST] [init.js:308] (hook.call, PubSubModerationBan, ./discord/core/moderation.js) JavaException: java.lang.NullPointerException: null
[06-01-2018 @ 13:13:59.095 EST] [init.js:308] (hook.call, twitchBits, ./discord/handlers/bitsHandler.js) JavaException: java.lang.NullPointerException: null
[06-01-2018 @ 13:22:39.349 EST] [init.js:308] (hook.call, twitchBits, ./discord/handlers/bitsHandler.js) JavaException: java.lang.NullPointerException: null
[06-01-2018 @ 15:23:54.812 EST] [init.js:308] (hook.call, twitchBits, ./discord/handlers/bitsHandler.js) JavaException: java.lang.IllegalArgumentException: Title or content cannot be null/empty.
[06-01-2018 @ 15:24:49.466 EST] [init.js:308] (hook.call, twitchBits, ./discord/handlers/bitsHandler.js) JavaException: java.lang.IllegalArgumentException: Title or content cannot be null/empty.
[06-01-2018 @ 15:46:57.981 EST] [init.js:308] (hook.call, twitchBits, ./discord/handlers/bitsHandler.js) JavaException: java.lang.NullPointerException: null
[06-01-2018 @ 16:00:49.678 EST] [init.js:308] (hook.call, PubSubModerationBan, ./discord/core/moderation.js) JavaException: java.lang.NullPointerException: null
[06-01-2018 @ 16:01:21.820 EST] [init.js:308] (hook.call, PubSubModerationUnBan, ./discord/core/moderation.js) JavaException: java.lang.NullPointerException: null
[06-01-2018 @ 16:21:59.452 EST] [init.js:308] (hook.call, twitchOffline, ./discord/handlers/streamHandler.js) JavaException: java.lang.NullPointerException: null

Still nope


#10

Can you ZIP your PhantomBot folder and send it to me? You can remove your botlogin from it, but I’ll need the DB.


#11

Everything seems to be working correctly on my end with the version you sent.


#12

Well it’s not working for me… So what to do


#13

It’s something with your specific setup, I tested on Windows, could you also try that?


#14

I’m running a Linux server so testing on Windows isn’t really possible


#15

I am running in Fedora and CentOS and never have seen this. I would like to see the core-error and error logs and any stacktraces. If there are null data items being returned, especially within the Discord4J library, that is due to missing data. If the error logs have nothing, would need to give you a more comprehensive debug version of at least one script to dump more information to see what is missing.


#16

I will send it all to you via DM


#17

The first thing I think I am seeing is file permission issues and a missing directory (like earlier PhantomBot may have failed to create the directory):


[06-02-2018 @ 18:36:19.977 GMT] [lambda$doBackupSQLiteDB$3()@PhantomBot.java:2419] Failed to clean up database backup directory: Parameter 'directory' is not a directory: ./dbbackup

[06-02-2018 @ 18:36:23.137 GMT] java.io.FileNotFoundException: PhantomBot.themodguyy.pid (Permission denied)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at tv.phantombot.PhantomBot.<init>(PhantomBot.java:646)
        at tv.phantombot.PhantomBot.main(PhantomBot.java:2277)

This could be a corrupted database or file permission issue; looking at the SQLite3 code, this means that the database is not open (cannot be open, is not open, etc):

[06-02-2018 @ 22:05:54.492 GMT] java.sql.SQLException: statement is not executing
        at org.sqlite.core.CoreStatement.checkOpen(CoreStatement.java:50)
        at org.sqlite.jdbc3.JDBC3Statement.getResultSet(JDBC3Statement.java:133)
        at org.sqlite.jdbc3.JDBC3PreparedStatement.executeQuery(JDBC3PreparedStatement.java:82)

Can you show me what user is running the bot via launch.sh then show me the owners of the various files and directories?

Other issues are the JVM (Java Virtual Machine) appears to be losing the Java objects like the reference to DiscordAPI and others. In non-technical terms – something is being either removed during runtime or something is getting lost during runtime. I am not sure what Linux distribution you are using but, I assume you have OpenJDK rather than Oracle Java. I would migrate to Oracle Java per your hosting company and per the instructions for your particular Linux distribution.

We should start with file permissions at least. Then look at what distribution of Java after that.

Cheers


#18

Can you show me what user is running the bot via launch.sh then show me the owners of the various files and directories?

How do i do this? Are you on discord? It would be much easier to communicate there…


#19

When I see permission errors, I always tell the user to chown their bot directory.

As your bot user, go to your bot’s local directory and type sudo chown -R botuser:botuser . while the bot is off.


#20

done that twice already