grunt-karma icon indicating copy to clipboard operation
grunt-karma copied to clipboard

Cannot start PhantomJS Error: spawn EACCES from Jenkins project

Open deva-tm opened this issue 10 years ago • 2 comments

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.

deva-tm avatar Feb 27 '15 15:02 deva-tm

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

renanborgez avatar Apr 14 '15 19:04 renanborgez

  1. Are you running the process with the same user/permission set as the one that you use to install it?
  2. Could you check if there are any old phantomjs processes running.
  3. Can you start phantomjs using the same user as the jenkins script runs manually?

dignifiedquire avatar May 27 '15 18:05 dignifiedquire