karma-runner / grunt-karma

Grunt plugin for Karma.
MIT License
468 stars 116 forks source link

Cannot start PhantomJS Error: spawn EACCES from Jenkins project #145

Open deva-tm opened 9 years ago

deva-tm commented 9 years ago

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.

Running "karma:continuous" (karma) task
INFO [karma]: Karma server started at http://localhost:9058/
INFO [launcher]: Starting browser PhantomJS
INFO [launcher]: Creating temp dir at /tmp/testacular-93143418
INFO [launcher]: Process PhantomJS exitted with code -1
ERROR [launcher]: Cannot start PhantomJS
    Error: spawn EACCES

INFO [launcher]: Trying to start PhantomJS again.
INFO [launcher]: Creating temp dir at /tmp/testacular-93143418
INFO [launcher]: Process PhantomJS exitted with code -1
ERROR [launcher]: Cannot start PhantomJS
    Error: spawn EACCES
[INFO [launcher]: Trying to start PhantomJS again.
INFO [launcher]: Creating temp dir at /tmp/testacular-93143418
INFO [launcher]: Process PhantomJS exitted with code -1
ERROR [launcher]: Cannot start PhantomJS
    Error: spawn EACCES

Warning: Task "karma:continuous" failed. Use --force to continue.

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.

renanborgez commented 9 years ago

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

dignifiedquire commented 9 years ago

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?