Hey all,
I'm getting a strange issue when trying to run phantomJS in my workflow on a CentOS system.
Here is the error it's reporting:
[4mRunning "qunit:all" (qunit) task[24m
Testing http://localhost:8000/tests.html
Running PhantomJS...[31mERROR[39m
[31m>> [39m/home/jenkins/jenkins/workspace/nick_node_te/web-client/client/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs: /home/jenkins/jenkins/workspace/nick_node_te/web-client/client/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs: cannot execute binary file 0 [ '/home/jenkins/jenkins/workspace/nick_node_te/web-client/client/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs: /home/jenkins/jenkins/workspace/nick_node_te/web-client/client/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs: cannot execute binary file' ]
[33mWarning: PhantomJS exited unexpectedly with exit code 126. Use --force to continue.[39m
I can't seem to find any good documentation on this type of crash. Is this usual and/or worthy of a bug report?
It's not a crash at all, [grunt-lib-phantomjs](https://github.com/gruntjs/grunt-lib-phantomjs] is just failing to execute the phantomjs binary because the Obvious/phantomjs wrapper module for Node is failing to update it with executable permissions after downloading it.
This comes up somewhat frequently and usually gets blamed on the unzipping library that Obvious/phantomjs uses. Examples:
Any which way, you will need to take it up with Obvious/phantomjs, or else get grunt-lib-phantomjs to use a newer version of Obvious/phantomjs that may contain a fix for this.
So, does this have to do with my not running 'npm install' before this? Are the permissions not set during the unzipping process?
Thanks for the help too by the way, I'm just a bit confused. Thanks!
Well, you must have done an npm install at least once to get all that stuff installed since the paths are clearly there.
The easy one-time fix is to just do
chmod +x /home/jenkins/jenkins/workspace/nick_node_te/web-client/client/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs
I did run it initially, then committed the modules into the repository, which are then being pushed by source control into this environment.
I just tried the command and then ran the process, but i'm still getting the same error :( -- any other tips? Thanks again for helping with this!
For reference here are my permissions:
-rwxr-x--x. 1 root root 11308856 Sep 26 12:39 phantomjs
But i still get the error. Is this fixable?
In addition, in case any one is interested, here's a link to the question on SO - http://stackoverflow.com/questions/19013918/phantomjs-crash-exit-code-126
Okay, here were the issues:
Closing. Thanks for the help with this!
I'm facing the same issue in Windows environment. I'm using Visual Studio IDE and I'm getting this error after installing a latter version of the xtensa compiler dependencies.
Can anyone help me out??
Thanks in Advance!!
Most helpful comment
Okay, here were the issues:
Closing. Thanks for the help with this!