Sometimes things go wrong, and you’ll get the “Sorry! The code lost its mind while executing a command…” message or the Sad Picard screen on the web portal. This article will help you diagnose the problem.
If the information below doesn’t help you, you can always ask for help on the Ares Forums or Discord.
Table of Contents
The first place to check is the game log. Most errors will add an entry in the log file telling exactly what the problem is. You have several options for checking the log:
aresmush/game/logs
directory. You can use a unix terminal text editor like nano to open them, or FTP them to your PC.debuglog
command will show you only the most recent log entries.Once you have the log file open, search for ERROR
. You’ll see some code stuff that may look like gibberish:
2018-02-20 04:21:39 ERROR - Error in Web Request: client= error=private method `select' called for nil:NilClass backtrace=[
"/home/ares/aresmush/plugins/arescentral/web/get_players_handler.rb:13:in `block in handle'",
"/home/ares/.rvm/gems/ruby-2.4.1/gems/ohm-3.0.3/lib/ohm.rb:123:in `block (2 levels) in each'",
"/home/ares/aresmush/plugins/arescentral/web/get_players_handler.rb:11:in `handle'",
"/home/ares/aresmush/engine/aresmush/commands/dispatcher.rb:125:in `block (2 levels) in on_web_request'",
"/home/ares/aresmush/engine/aresmush/commands/dispatcher.rb:119:in `each'"]
The first line is the one that gives the specific error (in this case - an object was nil
when it shouldn’t have been). The remaining lines help identify what the code was doing at the time (in this case - inside the /players web handler).
Check the list of common issues below to see if your error matches any of those. If not, you can always ask for help.
All major browsers have tools built in to help developers debug their Javascript. This can help you diagnose web issues.
In Chrome, the dev tools are under View -> Developer -> Developer Tools. In other browsers, look for a “Developer” menu (or do a Google search for “(yourbrowser) developer tools”).
For help troubleshooting your custom web code, see Debugging Custom Web Requests.
The configuration files use YAML, and there are several common issues that can result from trouble with your game configuration. Often you’ll see an error message like “Error reading YAML from fs3combat.yml…”, but any error that happens right after you changed your game configuration should make you suspect a YAML problem. See Troubleshooting YAML for more details.
Sometimes you’ll see an error in the logs like “Couldn’t start the game: error=no acceptor (port is in use or requires root privileges)”. This usually means:
nslookup YOURHOSTNAME
returns the correct IP address. It can take up to 24 hours for a new DNS record to be visible to the droplet, and Ares won’t work until that happens.If none of that helps, ask for help. There are some other unusual configuration issues that can cause that issue.
Sometimes you’ll get a ‘connection refused’ error in your MU client or a ‘This site can’t be reached’ error in your web browser. When this happens, there are a few things to check:
If your game can’t connect to the database you’ll see an error like: “Error connecting to database. Check your database configuration.” Here are a few things to try:
service redis-server status
./etc/redis/redis.conf
. The last few lines typically look like this, with a password matching what’s in secrets.yml. aof-rewrite-incremental-fsync yes
# Generated by CONFIG REWRITE
requirepass YOURPASSWORD
If you get a ‘page not found’ error for your web portal, here are some things to check:
service nginx status
.website/deploy
command from the client and see if there are any errors.If none of that helps, ask for help and we can walk you through checking your web server configuration.
Sometimes you’ll get a Sad Picard message saying the web portal can’t connect to the game.
Web portal errors are reported with the Sad Captain Picard screen saying “Oops! Something went wrong with the website.” Most of the time, problems on the web portal are actually problems in the web request on the game side. You’ll see those errors in the game log and troubleshoot them in the same way you would any other game error. Occasionally, though, the problem will be in the web portal Javascript code.
If you get a warning saying “The website is not receiving live updates from the game”, it means that the websocket connection allowing real-time updates between the web page and the game isn’t working. Regular page requests will be fine, but ‘live’ updates like scene poses or alerts about new mail messages won’t come through.
If you are using HTTPS for your web portal, a common reason for getting “The website is not receiving live updates from the game” is that your security certificate has expired. If this happens, you will see a ERR_CERT_DATE_INVALID
in the browser developer tools.
Shutting down and restarting the game engine usually fixes this. If not, just go to the aresmush directory and re-run bin/certs <your domain name>
.
Sometimes you’ll do an upgrade and you’ll see mismatched versions between the game and the web portal (on the bottom of all portal pages):
AresMUSH game v0.70, portal v0.69
The web portal and game engine always have to have the same version. If they don’t, you will get unpredictable errors.
There are several possible causes:
website/deploy
command in-game or by running bin/deploy
from the ares-webportal directory on the server shell. This will tell you if you missed any weird errors when the website was published.A successful website deploy will end with a list of files, like this:
Built project successfully. Stored in "dist/".
File sizes:
- dist/assets/ares-webportal-5d9f5985e1460779a552cf47f222971d.css: 143.77 KB (23.25 KB gzipped)
- dist/assets/ares-webportal-7d7c53430414e59c856937e57e284827.js: 894.15 KB (98.25 KB gzipped)
etc.
You may see the approval welcome message or roster claim message not appearing, and a key error in the log:
error=key{position} not found
error=key{faction} not found
This means your welcome messages are configured to use a group that doesn’t exist. Probably you changed your groups from the default (position/faction) and just need to update the messages in idle config and chargen config.
When using includes, sometimes your wiki page will say: “There was a problem including (some include page).”
Sometimes you get this strange error: Error loading include (some include page) : malformed format string - %;
That means there’s a stray “%” somewhere in your include page. You need to make all raw %’s into %% so they are formatted appropriately.
When you deploy the web portal, you may see any or all of the following warnings that you can safely ignore.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
fsevents is an optional dependency for one of the javascript libraries we use. Its absence doesn’t affect anything.
Could not start watchman
Watchman is an optional tool for local debugging; it doesn’t apply to your server.
WARNING: Node v11.0.0 is not tested against Ember CLI on your platform. We recommend that you use the most-recent "Active LTS" version of Node.js. See https://git.io/v7S5n for details.
If you’re using 11.0, it’s been extensively tested for Ares and works just fine. If you’ve got some other weird version of node you might want to use 12.x, which is the LTS version.
audited 218632 packages in 30.459s
found 69 vulnerabilities (11 low, 26 moderate, 32 high)
run `npm audit fix` to fix them, or `npm audit` for details
The NPM audit warnings come from off-the-shelf javascript libraries. We do our best to keep up with security issues, but most of these come out of EmberJS and its dependencies and are not Ares-specific. Others apply to features Ares isn’t using, so we don’t need to worry about them.
For tricky issues - especially during development - it can be helpful to run the game in Debug Mode.