Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

bitbucket-pipelines got stuck when running karma with chrome

Thien Ho
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 10, 2017

My configuration:

pipelines:
  default:
    - step:
        script: # Modify the commands below to build your repository.
          - apt-get update; apt-get install -y gettext-base;
          - echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/chrome.list
          - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
          - set -x && apt-get update && apt-get install -y xvfb google-chrome-stable
          - wget -q -O /usr/bin/xvfb-chrome https://bitbucket.org/atlassian/docker-node-chrome-firefox/raw/ff180e2f16ea8639d4ca4a3abb0017ee23c2836c/scripts/xvfb-chrome
          - ln -sf /usr/bin/xvfb-chrome /usr/bin/google-chrome
          - chmod 755 /usr/bin/google-chrome
          - npm install
          - ./node_modules/@angular/cli/bin/ng -v
          - ./node_modules/@angular/cli/bin/ng test

Karma can load chrome:

11 03 2017 03:54:35.833:INFO [launcher]: Launching browser Chrome with unlimited concurrency
11 03 2017 03:54:35.907:INFO [launcher]: Starting browser Chrome
11 03 2017 03:54:37.298:INFO [Chrome 57.0.2987 (Linux 0.0.0)]: Connected on socket hJAlQXbKvC-RB_DEAAAA with id 37617343
Chrome 57.0.2987 (Linux 0.0.0): Executed 0 of 80 SUCCESS (0 secs / 0 secs)
Chrome 57.0.2987 (Linux 0.0.0): Executed 1 of 80 SUCCESS (0 secs / 0.94 secs)
Chrome 57.0.2987 (Linux 0.0.0): Executed 2 of 80 SUCCESS (0 secs / 1.503 secs)

but it got stuck at:

Chrome 57.0.2987 (Linux 0.0.0): Executed 80 of 80 SUCCESS (24.216 secs / 24.176 secs)

And I have to stop agent

Does anybody know why?

4 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
aboglioli
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 13, 2017

When you run your test you have to specify that karma should run with --watch=false (it's true by default):

ng test --watch=false
Cristtopher Quintana T.
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 6, 2018

My build time is over... I'll have to wait until next month :( to add --watch=false flag

Like Samuel MA likes this
1 vote
Thien Ho
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 13, 2017

Thanks @Alan Boglioli, or we can use 

--single-run
0 votes
eric_horodyski January 16, 2019

How would you get Bitbucket to cache the Chrome package?

Peter Meir
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 6, 2019

You can always create your own docker image and install chrome there.

The use this image (from the dockerhub) for your pipelines script.

Like # people like this
0 votes
AlexanderKozhevin211 May 2, 2018

works

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events