-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRASH ON $start A (Raspian) #39
Comments
The error doesn't seem to be coming directly from my code, which makes me suspect that one of the deps has an update that is causing this, or I'm incorrectly calling one of the deps and its triggering this. If providing your |
This contains the file generated by npm upon install. |
@KawaiiFiveO Since you've got the bot installed locally, can you do the following:
I have discord.io pinned at a specific release because of previous bugs with it, and this looks like its the same category. Pinning to latest (ie. what the above does) seems to fix locally for me. Please let me know if that works for you. If that doesn't work, I'll considering switching the codebase over to discord.js instead of discord.io. I've been using discord.js for new projects lately and it has been a lot more stable. |
NPM seems to be very confused on which version to install. |
That's very strange, especially given that On the readme for discord.io, it does say that you can get true latest by installing Really, though, it seems like the right strategy—as I mentioned before—is to just switch from discord.io to discord.js. I use the .js one in other projects and it works fine. I've created #41 and will try to set aside some time sooner rather than later (this weekend, or hopefully earlier) to take a look and start migrating code. Updates on that will be posted to said bug. Sorry for the inconvenience, I'm hopeful that this migration will solve your issue. |
I've now fully migrated the bot to the new framework, discord.js. @KawaiiFiveO could you please install the latest version of the bot ( |
Indeed it does, that's disappointing. Out of curiosity, what version of node are you running? |
Originally I was using latest stable (12.18.1). I just tried updating to current (14.4.0) and now the problem is different. I reinstalled the bot using the npm method instead of manually and the problem still occurred. |
That's strange, I'm not sure what to make of that, especially if your logs have nothing. Well, if you can revert back to Node 12.18.1, there's one more thing I can think of that might yield additional information: have you tried different games? |
Also, when you ran the games using |
Also also (sorry stream of consciousness as I flip through the code), can you double-check that the game file is in the right place as specified in the |
I got the bot to work. Apparently the error thrown will occur whenever the location of the game file is invalid. I tried several methods to direct the program to the game file before finding the one that worked (place the game in the same directory and just entering the name of the file). Thank you for helping. More questions: |
Hooray! I'm glad you've got it working now. That being said, I think this probably brings up a point that maybe I should, in the actual code, double-check the file paths are valid, so I can give a better error than this barely-meaningful error. I've created #43 to address this. To answer your questions: Is it possible to add multiple games to the config?Totally! The {
"api": {
"discord": {
"token": "[bot token goes here]"
}
},
"games": [
{
"name": "exampleName",
"prettyName": "Example Name",
"path": "/tmp/foobar.z5"
},
{
"name": "secondGame",
"prettyName": "Second Game",
"path": "/tmp/secondGame.z5"
},
],
"settings": {
"commandPrefix": "$",
"commentPrefix": "//"
}
} Is there a way to kill the bot when it's running in the background?Strange, the bot is specifically built to clean itself up when someone tries to kill it (code). I've tested killing the bot before and it seems to clean up the child process correctly. Perhaps the way you are killing it doesn't trigger Node's There also isn't a way to kill it via Discord.True, that might be a good feature to add. #44 opened. |
I have the bot running as a background process using |
Fair enough, I'll still probably add the feature (since it's pretty easy to do so) at some point. In the meantime, I'm going to close this bug in favor of the followup bugs I created. Feel free to reopen it if you have any other questions or problems. |
Direct copy of #34 comment
Experiencing same issue. dfrotz is installed normally, can be used to play the game from any location.
Bot works until starting a game and entering a command, crashes with the same "throw er, unhandled error event".
Running Raspbian (Debian variant). All packages reinstalled and updated with npm wherever possible.
2020-06-18T15_37_36_232Z-debug.log
The text was updated successfully, but these errors were encountered: