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

223 Views Asked by At

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

1

There are 1 best solutions below

0
Barth O'keeffe On BEST ANSWER

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.