Skip to content

Running ng test fails to start chrome browser #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
danimbrogno opened this issue Jan 25, 2017 · 6 comments
Closed

Running ng test fails to start chrome browser #14

danimbrogno opened this issue Jan 25, 2017 · 6 comments

Comments

@danimbrogno
Copy link

Hi, thanks for the image. I'm having trouble getting ng test to run. Here is my docker-compose.yaml:

version: '2'
services:
  test-web-app:
    image: teracy/angular-cli
    command:
      - ng
      - test
    working_dir: /usr/src
    volumes:
      - "./:/usr/src"

when I run docker-compose run test-web-app

I get the output

Starting virtual X frame buffer: Xvfb.
Executing command ng test
25 01 2017 14:35:22.023:WARN [karma]: No captured browser, open http://localhost:9876/
25 01 2017 14:35:22.047:INFO [karma]: Karma v1.2.0 server started at http://localhost:9876/
25 01 2017 14:35:22.049:INFO [launcher]: Launching browser Chrome with unlimited concurrency
25 01 2017 14:35:22.093:INFO [launcher]: Starting browser Chrome
25 01 2017 14:35:22.406:ERROR [launcher]: Cannot start Chrome

25 01 2017 14:35:23.481:INFO [launcher]: Trying to start Chrome again (1/2).
25 01 2017 14:35:23.581:ERROR [launcher]: Cannot start Chrome

25 01 2017 14:35:23.803:INFO [launcher]: Trying to start Chrome again (2/2).
25 01 2017 14:35:23.927:ERROR [launcher]: Cannot start Chrome

25 01 2017 14:35:24.087:ERROR [launcher]: Chrome failed 2 times (cannot start). Giving up.
@hoatle
Copy link
Member

hoatle commented Jan 25, 2017

thank you for your report, let me check on this.

@hoatle
Copy link
Member

hoatle commented Jan 27, 2017

I'm having this problem angular/angular-cli#4207 (comment) will check back in some days.

@hoatle
Copy link
Member

hoatle commented Jan 29, 2017

@danimbrogno have you configured customLaunchers and used it? https://github.com/teracyhq/angular-boilerplate/blob/082a879c5df3fa0ae6ddc000d84512754b62a642/karma.conf.js#L36

docker-compose run test-web-app (to execute the command: ng test --browsers Chrome_no_sandbox)

@hoatle
Copy link
Member

hoatle commented Jan 31, 2017

under my investigation, it works as expected, so closed now.

If you still need our help, don't hesitate to re-open this issue with your sample project that we could check it out.

@hoatle hoatle closed this as completed Jan 31, 2017
@ghost ghost removed the stag:triage label Jan 31, 2017
@danimbrogno
Copy link
Author

This helped, I can run the command from a /bin/bash shell inside the container and it launches fine and executes the tests. But, when running docker-compose run test-web-app the same problem occurs, although I see in the output that it is using the Chrome_no_sandbox launcher. If you have any immediate suggestions it'd be appreciated. Otherwise I'll keep digging and if I don't get anywhere I'll publish a repo.

@hoatle
Copy link
Member

hoatle commented Feb 6, 2017

@danimbrogno we're going to release v0.1.0 of angular-boilerplate, please give it a try https://github.com/teracyhq/angular-boilerplate unit tests and e2e tests work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants