Can't enable modules

Just upgraded to the latest Phantombot, and I can’t enable modules. If I try to toggle it on the page (i.e. raffles) it just doesn’t do anything. If I try to enable it from the “modules” page it says it saved, but after refreshing it’s disabled again

I use MySQL for the DB, and login details are correct. Also the entire bot folder has 0777 permissions (while testing) so I don’t think it’s permissions.

Also my viewers aren’t receiving points/hours for watching.

PhantomBot Version: 3.0.0
        OS (Linux, Windows, OSX) Linux (Debian 8.11)
        Java Version: 1.8.0_171-8u171-b11-1~bpo8+1-b11
        Browser (for Web Panel): 1.0.0

are there any error logs in the logs folder if so can you upload them here or paste the error here?

No error logs. I have a few from before I upgraded (bot-old folder), but one is relating to beta-panel

“ ./web/beta-panel/js (No such file or directory)”

one day had this error “org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (panelHandler.js#62)”

and tens of mysql errors

"[05-19-2019 @ 23:35:18.793 GMT] [CreateConnection()] Failure to Connect to MySQL: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server."

all within about 2 seconds though (I possibly restarted MySQL while working on something)

The Beta Panel was removed from the current release, ensure that all of the Beta Panel items are removed.

While we provide PhantomBot with the ability to connect to MySQL, we do not provide support for it directly. Unfortunately, we do not have the resources available to do so.

Also, try enabling/disabling from chat once. That will isolate if it is the Control Panel or not first. The suspect item to me about the Control Panel is the error about the beta-panel file, which is not normal in the stock 3.0.0 build.

You might try using SQLite as the storage mechanism briefly, and see if the issue persists. Be sure to reference the error logs and any logs in the browser console.


If you don’t have any customized files in the bot install, it might be best to just backup the config folder, delete the entire bot, re-unzip the latest version, then paste the config back in

sorry, those errors were from the old version I had installed.

I currently have the new version (3.0.0) and copied my DB/config files over, so basically a fresh install.

is the panel supposed to say 1.0.0 btw? I can see references to 1.2.0 on Google

I can try disabling MySQL and see if it works though

edit: it works if I disable mysql as datastore, but now there is no data. can I convert mysql to non-mysql?

OK so I converted the MySQL DB dump to sqlite, and it has been set up successfully with SQlite

Still can’t enable modules though. Is something in the DB corrupted?

Try a fresh SQLite db from scratch just to see if it works

I did

I switched back from MySQL to SQLite, and everything worked, but all the data was gone since it was an empty DB. Now I have the DB full of data, but it’s not working :grimacing:

Not sure what could be causing modules to not stay enabled though.

I guess I could manually import all the points, hours, etc into a new DB (losing custom commands isn’t really a problem since I don’t have that many) but I’d rather not as I don’t know anything about SQLite

I would say try DROP phantombot_modules; then restart the bot and attempt to turn on your modules again. If you do a SELECT * FROM phantombot_modules; afterwards, you should see the value column have the string true for the ones you turned on

1 Like

That appears to have worked PogChamp

Edit: OK now the problem is everything is enabled, and if I disable it, it stays enabled :confused:

Edit #2: I can manually change modules to true/false using sqlite3, so for some reason the control panel or phantombot itself isn’t updating the DB

Edit #3: Is it !module disable/enable 8ball to enable/disable a module in chat? If so, that does nothing. no response from the bot, and no error log

You have to actually type the script path. Such as !module disable ./systems/pointSystem.js

Script paths are relative to the PhantomBot/scripts directory

Hmm it’s still not working then. phantombot just ignores it

still no idea what caused it, but I ended up creating a new database, and transferring the time and points over which seems to be working