3urobeat / steam-comment-service-bot

📡 The most advanced Steam Account Manager Bot with mass coordinated comments/likes/favs/follows and plugin support
https://steamcommunity.com/id/3urobeatscommentbot
GNU General Public License v3.0
274 stars 40 forks source link

Updater botobject undefined & config key checker #18

Closed 3urobeat closed 4 years ago

3urobeat commented 4 years ago

Please read the comment for a quick fix if your bot should crash because of this error!

Describe the bug The 12 hour update checker crashes when trying to logOut bots in botobject

Full error [2020-05-01 06:15:35] Starting the automatic updater... /home/pi/Desktop/steam-comment-service-bot-master/updater.js:46 Object.keys(controller.botobject).forEach((e) => { ^

TypeError: Cannot read property 'botobject' of undefined at Timeout.setTimeout [as _onTimeout] (/home/pi/Desktop/steam-comment-service-bot-master/updater.js:46:56) at ontimeout (timers.js:466:11) at tryOnTimeout (timers.js:304:5) at Timer.listOnTimeout (timers.js:267:5)

Additional context Restarting the bot then crashes when trying to check for existing config keys

Full error [2020-05-01 11:58:35] Starting the automatic updater... Updating bot.js... Updating start.js... Updating package.json... Updating package-lock.json... Updating config.json... /home/pi/Desktop/steam-comment-service-bot-master/updater.js:146 if (!Object.keys(config).includes(e)) { ^

TypeError: Cannot convert undefined or null to object at Function.keys () at Object.keys.forEach.e (/home/pi/Desktop/steam-comment-service-bot-master/updater.js:146:49) at Array.forEach () at IncomingMessage.res.on (/home/pi/Desktop/steam-comment-service-bot-master/updater.js:145:53) at IncomingMessage.emit (events.js:185:15) at endReadableNT (_stream_readable.js:1106:12) at process._tickCallback (internal/process/next_tick.js:178:19)

3urobeat commented 4 years ago

Fixed in commit 29e43b3.

FIX IF YOU HAD ALREADY DOWNLOADED 2.6.1 AND YOUR BOT IS CRASHING Open the file updater.js in your bot folder. Click here and copy everything. Delete everything in your updater.js and paste the copied code into it. Save the file and start your bot. You should be good to go.

This issue will stay open for a few days to ensure that everyone read the solution who might have had updated to 2.6.1.

3urobeat commented 4 years ago

I hope everyone who maybe had 2.6.1 installed has no issues anymore. I am closing this issue after 4 days now.