LakeYS / Discord-Trivia-Bot

TriviaBot: Play trivia in Discord! Powered by discord.js and OpenTDB, with 24 categories and three modes of play.
Apache License 2.0
84 stars 39 forks source link

"Eval on index: " displays in the console and the client never connects #101

Closed LakeYS closed 6 years ago

LakeYS commented 6 years ago

I have only encountered this issue on rare occasions and it usually goes away after a restart, however users have reported it happening every time they start up the bot, preventing them from being able to use it.

Disabling console input/eval on index.js appears to fix the issue for users that encounter it repeatedly. So far this has only been recorded on Windows systems, so it is possible that this is Windows-specific.

When using mutiple shards, a blank line is inputted in the console and the particular shard does not spawn correctly.

A workaround for this has been put in place; eval is now disabled by default for both the index and shards. Note that this is only a workaround and the root issue has yet to be resolved.

EDIT 1: Some obvervations so far; I have only observed this occurring consistently on Windows 10, and as far as I can tell it only occurs on Windows systems. The allow-eval workaround applies to all data checks, but testing shows that the one in index.js can be left on without issue. This means that an easy fix would be to not accept input on shards at all.

EDIT 2: More observations: Disabling eval on index does not help. The issue does not occur in fallback mode.