grunt-karma
grunt-karma copied to clipboard
Cannot start PhantomJS Error: spawn EACCES from Jenkins project
We are trying to run a Jenkins project on Linux. In that project unit test cases have to be executed on the Javascript code by a grunt task. For executing unit test cases we are using grunt-karma(0.4.6), karma-phantomjs-launcher(0.1.4) and phantomjs(1.9.7) module. When the grunt task is executed through the jenkins project shell script plugin we are getting the following error messages.
[4mRunning "karma:continuous" (karma) task[24m
[32mINFO [karma]: [39mKarma server started at http://localhost:9058/
[32mINFO [launcher]: [39mStarting browser PhantomJS
[32mINFO [launcher]: [39mCreating temp dir at /tmp/testacular-93143418
[32mINFO [launcher]: [39mProcess PhantomJS exitted with code -1
[31mERROR [launcher]: [39mCannot start PhantomJS
Error: spawn EACCES
[32mINFO [launcher]: [39mTrying to start PhantomJS again.
[32mINFO [launcher]: [39mCreating temp dir at /tmp/testacular-93143418
[32mINFO [launcher]: [39mProcess PhantomJS exitted with code -1
[31mERROR [launcher]: [39mCannot start PhantomJS
Error: spawn EACCES
[[32mINFO [launcher]: [39mTrying to start PhantomJS again.
[32mINFO [launcher]: [39mCreating temp dir at /tmp/testacular-93143418
[32mINFO [launcher]: [39mProcess PhantomJS exitted with code -1
[31mERROR [launcher]: [39mCannot start PhantomJS
Error: spawn EACCES
[33mWarning: Task "karma:continuous" failed. Use --force to continue.[39m
Note:: The project and the grunt test task runs successfully on Windows 7 without any errors.The version of all the npm modules is also the same.
i'm having the same issue, the phantomjs is not being cleared from memory if i try change de phantomjs port works for 1 time, in the second time not work anymore
- Are you running the process with the same user/permission set as the one that you use to install it?
- Could you check if there are any old phantomjs processes running.
- Can you start phantomjs using the same user as the jenkins script runs manually?