Abbiamo impostato un server Jenkins CI che esegue il Karma con targeting PhantomJS. Stiamo eseguendo i nostri test attraverso Grunt. Jenkins, Grunt e Phantom stanno correndo correttamente, e Karma sembra partire bene, ma Karma non può catturare Phantom. I nostri script funzionano localmente (OSX) bene. Lo stesso errore esiste tramite bash o tramite Jenkins:Karma non può acquisire PhantomJS
Running "karma:jenkins-unit" (karma) task
[2013-07-03 11:03:12.168] [WARN] config - urlRoot normalized to "/__karma/"
DEBUG [reporter]: Using reporter "dots".
DEBUG [reporter]: Using reporter "junit".
DEBUG [reporter]: Using reporter "coverage".
INFO [karma]: Karma server started at http://localhost:8084/__karma/
INFO [launcher]: Starting browser PhantomJS
DEBUG [launcher]: Creating temp dir at /tmp/testacular-7720703
DEBUG [launcher]: phantomjs /tmp/testacular-7720703/capture.js
INFO [karma]: To run via this server, use "karma run --runner-port 9104"
...
WARN [launcher]: PhantomJS have not captured in 60000 ms, killing.
DEBUG [launcher]: Process PhantomJS exitted with code 0
DEBUG [launcher]: Cleaning temp dir /tmp/testacular-7720703
INFO [launcher]: Trying to start PhantomJS again.
DEBUG [launcher]: Creating temp dir at /tmp/testacular-7720703
DEBUG [launcher]: phantomjs /tmp/testacular-7720703/capture.js
WARN [launcher]: PhantomJS have not captured in 60000 ms, killing.
DEBUG [launcher]: Process PhantomJS exitted with code 0
DEBUG [launcher]: Cleaning temp dir /tmp/testacular-7720703
INFO [launcher]: Trying to start PhantomJS again.
DEBUG [launcher]: Creating temp dir at /tmp/testacular-7720703
DEBUG [launcher]: phantomjs /tmp/testacular-7720703/capture.js
WARN [launcher]: PhantomJS have not captured in 60000 ms, killing.
DEBUG [launcher]: Process PhantomJS exitted with code 0
DEBUG [karma]: PhantomJS failed to capture, aborting the run.
DEBUG [launcher]: Disconnecting all browsers
DEBUG [launcher]: Killing PhantomJS
DEBUG [launcher]: Cleaning temp dir /tmp/testacular-7720703
Warning: Task "karma:jenkins-unit" failed. Use --force to continue.
Il nostro server è CentOS 6.4.
Qui ci sono le versioni che abbiamo in esecuzione: grugnito-cli v0.1.9 grugnito v0.4.1 nodo 0.10.12 e 0.8.25. phantomjs 1.9.1 karma 0.8.6
Qualsiasi aiuto sarebbe molto apprezzato!
Ho una configurazione completamente diversa da te, ma quando ho ottenuto l'errore 'PhantomJS non riuscito a catturare', si è scoperto che localhost non era mappato su 127.0.0.1. Questo è qualcosa che può causare questo errore. – mcv