Skip to main content

API troubleshooting

This is just a brain dump of various problems that have been encountered with the API and their solutions. ## Admin can’t see anything The administrator has most likely dropped out of the admin group in the Groups collection in MongoDB.

Error submitting work requests

If you get something like:
{"type":"NetworkException","message":"Bayeux handshake failure"}
Make sure that the Faye server is running, something like:
nohup node faye-server.js &
This sounds like a problem with the cache - see caching for more details.

Tests aren’t running

Usually means it can’t create a directory in the cache. Try:
sudo mkdir -p /tmp/resources/tmp/tests/test_app/source
sudo chmod -R 777 /tmp/resources
You may also with to do db.dropDatabase(); on your local test database in MongoDB. If a test has crashed, it may have left partial test data in there.

Timezone database is corrupt - this should never happen

Disable xdebug and restart nginx. (not 100% sure this is the cause but it seems to resolve it)

Auto running Kahlan tests

Nodemon does the job:
sudo pnpm install -g nodemon
nodemon -L --exec "bin/kahlan" -e php
Don’t forget the -L flag or it will only detect changes made from WITHIN the VM. If you combine this with using xdescribe for a block of tests, then you can have a nice fast test autorunner!
Back to docs index | API docs index | Next page in recommended reading order >>