apachecasperjsslimerjs

Casperjs using Slimerjs as engine error when ran on apache with shell_exec()


I get the following message in the browser but the casperjs script runs fine in the terminal ont the server.

Gecko error: it seems /usr/bin/firefox is not compatible with SlimerJS. See Gecko version compatibility. If version is correct, launch slimerjs with --debug=true to see Firefox error message


Solution

  • The solution to the problem is to install xvfb on the server and then run script with : xvfb-run -a casperjs --engine=slimerjs mycasperjs_script.js The reason for this error is that you need to make slimerjs headless and Mozilla's gecko engine isn't.