FountainJS / generator-fountain-webapp

Yeoman 'fountain' generator to start a webapp
http://fountainjs.io
MIT License
963 stars 67 forks source link

Chrome problem with Travis CI #175

Closed picheli20 closed 7 years ago

picheli20 commented 7 years ago

Hey Guys,

I'm trying to integrate the Travis-CI into my project, but with the pre-created files is not working.

I'm facing the following error:

Karma v1.3.0 server started at http://localhost:9876/
Launching browser Chrome with unlimited concurrency
Starting browser Chrome
Cannot start Chrome

Trying to start Chrome again (1/2).
Cannot start Chrome

Trying to start Chrome again (2/2).
Cannot start Chrome

Chrome failed 2 times (cannot start). Giving up.

I did same research about this issue and I was not able to figure out what is the problem.

Any sugestion to solved this using Chrome? I changed to PhantomJS to not be blocked.

Also with the problem?

If anyone is facing this error, to not be blocked also I suggest you change to PhantomJS is this steps:

1) You have to install karma-phantomjs-launcher

2) Add the require for PhatomJS of conf/karma.conf.js

plugins: [
      ...
      require('karma-phantomjs-launcher'),
      ...
]

3) Add this if before the config.set(configuration); to change only when the travis is running

 if (process.env.TRAVIS) {
     configuration.browsers = ['PhantomJS'];
}
Swiip commented 7 years ago

To use Chrome on Travis, you have to simulate a X server with xvbf. You can search with Google, there si lots of tuto about it.