coach icon indicating copy to clipboard operation
coach copied to clipboard

ERROR: BrowserError: Could not start the browser with 3 tries

Open alienbuild opened this issue 5 years ago • 18 comments

I've made a node app using webcoach to return JSON data for a bunch of urls stored in a text file. Everything works fine on my windows pc but on unix I get the error: ERROR: BrowserError: Could not start the browser with 3 tries I've ensured both Chrome and Firefox are installed and up to date and nothing is blocking the browsers from what I can see.

Full error can be seen here: error

Repo for the app I created is here: https://github.com/alienbuild/node-espionagex

Run with 'node app.js -u all'

alienbuild avatar Feb 08 '19 20:02 alienbuild

Hi @alienbuild usually when it can't start it's a mismatch between Firefox/Geckodriver and Chrome/Chromedriver. Geckodriver/Chromedriver should automatically be installed by latest version, can you verify that you run a recent version of Firefox/Chrome?

Best Peter

soulgalore avatar Feb 08 '19 21:02 soulgalore

Hi @soulgalore Thanks for the quick reply. They're both latest versions installed on a new setup.

alienbuild avatar Feb 08 '19 21:02 alienbuild

Latest released or latest in apt-get? :)

google-chrome --version
firefox --version

Just want to verify :)

soulgalore avatar Feb 08 '19 21:02 soulgalore

Else do you run --headless or do you use xvfb or do you have a screen on your machine?

soulgalore avatar Feb 08 '19 21:02 soulgalore

@soulgalore @alienbuild I did the following and it helped me fix this issue hope this helps you.

  • First, I downgraded the webcoach version to 3.4.0

  • Then I downgraded my google-chrome version to 75.0.3770.100

  • Then I passed --no-sandbox flag after exec -a "$0" "$HERE/chrome" "$@" in /opt/google/chrome/google-chrome

That's it. :)

satyadityasharma avatar Jul 16 '19 13:07 satyadityasharma

@soulgalore Same issue here. I'm also running the latest versions of chrome and ss.io, running with --headless option, inside a debian:buster-slim-based docker container. (issue also happens the same without the --headless tag)

Any idea?

# Versions
root@96e5b2015900:/app# google-chrome --version
Google Chrome 79.0.3945.88 
root@96e5b2015900:/app# node_modules/.bin/sitespeed.io --version
11.9.3

# Sample run
root@cf22baf6fcab:/app# node_modules/.bin/sitespeed.io https://github.com/sitespeedio/coach/issues/329 --headless
[2019-12-21 00:52:26] INFO: Versions OS: linux 4.9.184-linuxkit nodejs: v11.15.0 sitespeed.io: 11.9.3 browsertime: 7.8.3 coach: 4.3.0
[2019-12-21 00:52:27] INFO: Running tests using Chrome - 3 iteration(s)
[2019-12-21 00:52:28] INFO: Browser failed to start, trying 2 more time(s): unknown error: Chrome failed to start: exited abnormally
  (chrome not reachable)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[2019-12-21 00:52:29] INFO: Browser failed to start, trying 1 more time(s): unknown error: Chrome failed to start: exited abnormally
  (chrome not reachable)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[2019-12-21 00:52:30] INFO: Browser failed to start, trying 0 more time(s): unknown error: Chrome failed to start: exited abnormally
  (chrome not reachable)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[2019-12-21 00:52:30] ERROR: BrowserError: Could not start the browser with 3 tries
    at SeleniumRunner.start (/app/node_modules/sitespeed.io/node_modules/browsertime/lib/core/seleniumRunner.js:85:13)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
[2019-12-21 00:52:30] ERROR: No data to collect
[2019-12-21 00:52:31] INFO: Browser failed to start, trying 2 more time(s): unknown error: Chrome failed to start: exited abnormally
  (chrome not reachable)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[2019-12-21 00:52:32] INFO: Browser failed to start, trying 1 more time(s): unknown error: Chrome failed to start: exited abnormally
  (chrome not reachable)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[2019-12-21 00:52:33] INFO: Browser failed to start, trying 0 more time(s): unknown error: Chrome failed to start: exited abnormally
  (chrome not reachable)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[2019-12-21 00:52:33] ERROR: BrowserError: Could not start the browser with 3 tries
    at SeleniumRunner.start (/app/node_modules/sitespeed.io/node_modules/browsertime/lib/core/seleniumRunner.js:85:13)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
[2019-12-21 00:52:33] ERROR: No data to collect
[2019-12-21 00:52:34] INFO: Browser failed to start, trying 2 more time(s): unknown error: Chrome failed to start: exited abnormally
  (chrome not reachable)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[2019-12-21 00:52:35] INFO: Browser failed to start, trying 1 more time(s): unknown error: Chrome failed to start: exited abnormally
  (chrome not reachable)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[2019-12-21 00:52:36] INFO: Browser failed to start, trying 0 more time(s): unknown error: Chrome failed to start: exited abnormally
  (chrome not reachable)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[2019-12-21 00:52:36] ERROR: BrowserError: Could not start the browser with 3 tries
    at SeleniumRunner.start (/app/node_modules/sitespeed.io/node_modules/browsertime/lib/core/seleniumRunner.js:85:13)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
[2019-12-21 00:52:36] ERROR: No data to collect
[2019-12-21 00:52:37] INFO: HTML stored in /app/sitespeed-result/github.com/2019-12-21-00-52-26

leonardoraele avatar Dec 21 '19 00:12 leonardoraele

Hi @leonardoraele does it work with Firefox? Chromedriver is very picky with Chrome version, they need to match exact, wonder if that's the problem. What Chrome version are you using?

soulgalore avatar Dec 21 '19 10:12 soulgalore

@soulgalore The installed google chrome version is 79.0.3945.88. I don't have firefox installed in this image. How can I know what version of google chrome sitespeed.io expects?

leonardoraele avatar Dec 26 '19 17:12 leonardoraele

Hi @leonardoraele if you are using the latest, its 79. The way to see it is which Chromedriver version: https://github.com/sitespeedio/browsertime/blob/master/package.json#L9

Are you run headless with xvfb does that work?

Best Peter

soulgalore avatar Dec 26 '19 20:12 soulgalore

@soulgalore Tried to run with xvfb, but got the same result.

> google-chrome --version
Google Chrome 79.0.3945.88
> sitespeed.io --version
11.9.3
> xvfb-run sitespeed.io https://www.github.com --headless
[2019-12-26 21:17:41] INFO: Versions OS: linux 4.9.184-linuxkit nodejs: v11.15.0 sitespeed.io: 11.9.3 browsertime: 7.8.3 coach: 4.3.0
[2019-12-26 21:17:41] INFO: Running tests using Chrome - 3 iteration(s)
[2019-12-26 21:17:42] INFO: Browser failed to start, trying 2 more time(s): unknown error: Chrome failed to start: exited abnormally
  (chrome not reachable)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[2019-12-26 21:17:43] INFO: Browser failed to start, trying 1 more time(s): unknown error: Chrome failed to start: exited abnormally
  (chrome not reachable)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[2019-12-26 21:17:44] INFO: Browser failed to start, trying 0 more time(s): unknown error: Chrome failed to start: exited abnormally
  (chrome not reachable)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[2019-12-26 21:17:44] ERROR: BrowserError: Could not start the browser with 3 tries
    at SeleniumRunner.start (/app/node_modules/sitespeed.io/node_modules/browsertime/lib/core/seleniumRunner.js:85:13)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
[2019-12-26 21:17:44] ERROR: No data to collect

leonardoraele avatar Dec 26 '19 21:12 leonardoraele

Note: The issue only happens when using chrome. It works fine for me with -b firefox. (using firefox 71.0)

leonardoraele avatar Dec 30 '19 17:12 leonardoraele

I have the same issue on both docker distribution and npm package install

Google Chrome 118.0.5993.88 Mozilla Firefox 118.0.2 webcoach 7.0.0

vasilvestre avatar Oct 19 '23 07:10 vasilvestre

Hi @vasilvestre can you share how you run and what OS you are using so I can see if I can reproduce it? Thanks

soulgalore avatar Oct 19 '23 08:10 soulgalore

I use both webcoach https://www.domain.fr and docker run sitespeedio/coach:latest https://www.domain.fr/

Seems like a duplicate of https://github.com/sitespeedio/coach/issues/365 (maybe closing similar issue would be better for bug history)

vasilvestre avatar Oct 19 '23 08:10 vasilvestre

Ah sorry that is my fault, that image hasn't been built in ages. I try to redirect people to use sitespeed.io directly but I see that I haven't updated the readme (and some other docs).

soulgalore avatar Oct 19 '23 10:10 soulgalore

Ah sorry that is my fault, that image hasn't been built in ages. I try to redirect people to use sitespeed.io directly but I see that I haven't updated the readme (and some other docs).

I also use sitespeed.io but I don't see recommendation. That's why I'm using coach directly, maybe I've missed it ?

vasilvestre avatar Oct 19 '23 10:10 vasilvestre

I see. If you click the Coach tab in the sitespeed.io result, then you need to click the "show/hide details" button to see the extra information. I'll try to make that more visible in upcoming releases.

coach

soulgalore avatar Oct 20 '23 07:10 soulgalore

Ooooh thank you !

vasilvestre avatar Oct 20 '23 07:10 vasilvestre