Skip to content
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

ERROR: BrowserError: Could not start chrome with 3 tries #3895

Closed
kluslulu opened this issue Jun 28, 2023 · 15 comments
Closed

ERROR: BrowserError: Could not start chrome with 3 tries #3895

kluslulu opened this issue Jun 28, 2023 · 15 comments

Comments

@kluslulu
Copy link

kluslulu commented Jun 28, 2023

Could not start chrome with 3 tries

Hi,soulgalore

I installed sitespeed.io globally by npm about two or three months ago.
Everything is ok until the day before yesterday, the command line told me that chrome failed to start:
image
I thought maybe my chrome version didn't match, so I commissioned a colleague with the same chrome version as me to run it again, it's totally fine in his computer.
I'm confused and didn't find some effective solution.
I would appreciate it if you could give me some advice.

Here is some information about my environment:

  • sitespeed.io version: 26.0.0
  • node version: 14.19.0
  • chrome version: 114.0.5735.133(arm64)
  • canary chrom version: 117.0.5857.0(arm64)
  • OS: macOS Monterey v12.1 MacBookPro Apple M1 Pro

Looking forward to your reply
Thank you

@soulgalore
Copy link
Member

Hi @kluslulu thanks for creating the issue! So Chrome version should not matter since we use the switch to turn off that check (and I hope that there are no breaking changes, that rarely happens).

The easiest way to debug is to turn on the Chromedriver log, then I think we can get more/better info on what's going on.

Can you try adding: --browsertime.chrome.enableChromeDriverLog true to your run and then in your result folder look for a file named chromedriver-1.log.gz unpack it and check if you can see any more details, or if you can share the file with me.

Thanks
Peter

@kluslulu
Copy link
Author

Thanks for your replay @soulgalore
I followed your suggestion to run ‘sitespeed.io https://www.sitespeed.io/ -b chrome --browsertime.chrome.enable ChromeDriverLog true’.
The following is the generated log file :
chromedriver.log

Thanks

@soulgalore
Copy link
Member

Hi @kluslulu hmm it just says Chromedriver 105 and nothing more. Can you upgrade to latest sitespeed.io (it will upgrade Chromedriver) and see how that works?

Best
Peter

@kluslulu
Copy link
Author

kluslulu commented Jun 28, 2023

Hi @soulgalore
Thanks for your patient reply ~

I saw that the version of the changelog has reached 28.1.0
image

But I check all the versions through the npm command line: 'npm view sitespeed.io versions', the highest version is 26.0.0.
image

And my local version is already the latest version
image

Installed v28.0.1 directly and thrown an exception:
image

Installed the latest version and goes to v26.0.0:
image

Isn’t the highest version of sitespeed.io 26.0.0?

Thanks~

@soulgalore
Copy link
Member

I wonder if you have some proxy or something for npm? When I look locally on my machine:

❯ npm view sitespeed.io versions
[
  '3.0.0-alpha',    '3.0.0-alpha-2',  '3.0.0-alpha-3',  '3.0.0-alpha-4',
  '3.0.0-alpha-5',  '3.0.0-alpha-6',  '3.0.0-alpha-7',  '3.0.0-alpha-8',
  '3.0.0-beta',     '3.0.0-beta-10',  '3.0.0-beta-2',   '3.0.0-beta-3',
  '3.0.0-beta-4',   '3.0.0-beta-5',   '3.0.0-beta-6',   '3.0.0-beta-7',
  '3.0.0-beta-8',   '3.0.0-beta-9',   '3.0.0',          '3.0.1',
  '3.0.2',          '3.0.3',          '3.0.4',          '3.0.5',
  '3.1.0',          '3.1.1',          '3.1.2',          '3.1.3',
  '3.1.4',          '3.1.5',          '3.1.6',          '3.1.7',
  '3.1.8',          '3.1.9',          '3.1.10',         '3.1.11',
  '3.1.12',         '3.2.0',          '3.2.1',          '3.2.2',
  '3.2.3',          '3.2.4',          '3.2.5',          '3.2.6',
  '3.2.7',          '3.2.8',          '3.2.9',          '3.2.10',
  '3.3.0',          '3.3.1',          '3.3.2',          '3.3.3',
  '3.4.0',          '3.4.1',          '3.5.0',          '3.6.0',
  '3.6.1',          '3.6.2-canary',   '3.6.2-canary2',  '3.6.2-canary3',
  '3.6.2-canary4',  '3.6.2',          '3.6.3',          '3.7.0',
  '3.7.1',          '3.7.2',          '3.8.0',          '3.8.1',
  '3.9.0',          '3.9.1',          '3.10.0',         '3.11.0',
  '3.11.1',         '3.11.2',         '3.11.3',         '3.11.4',
  '3.11.5',         '3.11.6',         '3.11.7',         '3.11.8',
  '4.0.0-alpha.1',  '4.0.0-alpha.2',  '4.0.0-alpha.3',  '4.0.0-alpha.4',
  '4.0.0-alpha.5',  '4.0.0-beta.1',   '4.0.0-beta.2',   '4.0.0-beta.3',
  '4.0.0-beta.4',   '4.0.0-beta.5',   '4.0.0-beta.6',   '4.0.0',
  '4.0.1',          '4.0.2',          '4.0.3',          '4.0.4',
  '4.0.5',          '4.0.6',          '4.0.7',          '4.1.0',
  '4.1.1',          '4.1.2',          '4.1.3',          '4.2.0',
  '4.2.1',          '4.3.0',          '4.3.1',          '4.3.2',
  '4.3.3',          '4.3.4',          '4.3.5',          '4.3.6',
  '4.3.7',          '4.3.8',          '4.3.9',          '4.4.0',
  '4.4.1',          '4.4.2',          '4.5.0',          '4.5.1',
  '4.6.0',          '4.6.1',          '4.7.0',          '5.0.0',
  '5.1.0',          '5.1.1',          '5.2.0',          '5.2.1',
  '5.3.0',          '5.4.0',          '5.4.1',          '5.4.2',
  '5.4.3',          '5.4.4',          '5.4.5',          '5.5.0',
  '5.6.0',          '5.6.1',          '5.6.2',          '5.6.3',
  '5.6.4',          '5.6.5',          '6.0.0',          '6.0.1',
  '6.0.2',          '6.0.3',          '6.1.0',          '6.1.1',
  '6.1.2',          '6.1.3',          '6.2.0',          '6.2.1',
  '6.2.2',          '6.2.3',          '6.3.0',          '6.3.1',
  '6.3.2',          '6.3.3',          '6.3.4',          '6.3.5',
  '6.4.0',          '6.4.1',          '6.5.0',          '6.5.1',
  '6.5.2',          '6.5.3',          '6.5.4',          '7.0.0-alpha.1',
  '7.0.0-alpha.2',  '7.0.0-alpha.3',  '7.0.0-alpha.4',  '7.0.0-alpha.5',
  '7.0.0-beta.1',   '7.0.0',          '7.0.1',          '7.0.2',
  '7.0.3',          '7.1.0',          '7.1.1',          '7.1.2',
  '7.1.3',          '7.2.0',          '7.2.1',          '7.2.2',
  '7.2.3',          '7.3.0',          '7.3.4',          '7.3.5',
  '7.3.6',          '7.4.0',          '7.5.0',          '7.5.1',
  '7.5.2',          '7.6.0',          '7.6.1',          '7.6.2',
  '7.6.3',          '7.7.0',          '7.7.1',          '7.7.2',
  '7.7.3',          '8.0.0',          '8.0.1',          '8.0.2',
  '8.0.3',          '8.0.4',          '8.0.5',          '8.0.6',
  '8.1.0',          '8.1.1',          '8.2.0',          '8.2.1',
  '8.2.2',          '8.2.3',          '8.3.0',          '8.4.0',
  '8.5.0',          '8.5.1',          '8.6.0',          '8.6.1',
  '8.6.2',          '8.6.3',          '8.6.4',          '8.6.5',
  '8.7.0',          '8.7.1',          '8.7.2',          '8.7.3',
  '8.7.4',          '8.7.5',          '8.8.0',          '8.8.1',
  '8.8.2',          '8.8.3',          '8.9.0',          '8.10.0',
  '8.10.1',         '8.11.0',         '8.11.1',         '8.11.2',
  '8.12.0',         '8.13.0',         '8.14.0',         '8.15.0',
  '8.15.1',         '8.15.2',         '9.0.0',          '9.1.0',
  '9.2.0',          '9.2.1',          '9.3.0',          '9.3.1',
  '9.3.2',          '9.3.3',          '9.3.4',          '9.4.0',
  '9.5.0',          '9.6.0',          '9.7.0',          '9.8.0',
  '9.8.1',          '10.0.0-alpha.1', '10.0.0-alpha.2', '10.0.0-alpha.3',
  '10.0.0-beta.1',  '10.0.0',         '10.0.1',         '10.0.2',
  '10.0.3',         '10.1.0',         '10.1.1',         '10.2.0',
  '10.3.0',         '10.3.1',         '10.3.2',         '11.0.0',
  '11.1.0',         '11.2.0',         '11.3.0',         '11.4.0',
  '11.5.0',         '11.5.1',         '11.6.0',         '11.7.0',
  '11.7.1',         '11.7.2',         '11.8.0',         '11.8.1',
  '11.9.0',         '11.9.1',         '11.9.2',         '11.9.3',
  '12.0.0-alpha.1', '12.0.0-alpha.2', '12.0.0-alpha.3', '12.0.0-beta.1',
  '12.0.0',         '12.0.1',         '12.1.0',         '12.2.0',
  '12.2.1',         '12.2.2',         '12.2.3',         '12.3.0',
  '12.3.1',         '12.4.0',         '12.5.0',         '12.5.1',
  '12.6.0',         '12.7.0',         '12.7.1',         '12.8.0',
  '12.8.1',         '12.9.0',         '12.9.1',         '12.10.0',
  '12.10.1',        '12.10.2',        '12.11.0',        '13.0.0',
  '13.0.1',         '13.0.2',         '13.0.3',         '13.1.0',
  '13.1.1',         '13.2.0',         '13.3.0',         '13.3.1',
  '13.3.2',         '14.0.0',         '14.1.0',         '14.2.0',
  '14.2.1',         '14.2.2',         '14.2.3',         '14.3.0',
  '14.3.1',         '14.3.2',         '14.4.0',         '15.0.0-alpha.1',
  '15.0.0-alpha.2', '15.0.0-alpha.3', '15.0.0',         '15.1.0',
  '15.2.0',         '15.3.0',         '15.4.0',         '15.4.1',
  '15.5.0',         '15.5.1',         '15.6.0',         '15.6.1',
  '15.6.2',         '15.6.3',         '15.6.4',         '15.7.0',
  '15.7.1',         '15.7.2',         '15.7.3',         '15.7.4',
  '15.8.0',         '15.9.0',         '16.0.0-beta.1',  '16.0.0-beta.2',
  '16.0.0',         '16.0.1',         '16.0.2',         '16.1.0',
  '16.2.0',         '16.2.1',         '16.3.0',         '16.3.1',
  '16.3.2',         '16.4.0',         '16.5.0',         '16.6.0',
  '16.7.0',         '16.7.1',         '16.8.0',         '16.8.1',
  '16.9.0',         '16.9.1',         '16.9.2',         '16.10.0',
  '16.10.1',        '16.10.2',        '16.10.3',        '17.0.0-alpha.1',
  '17.0.0-alpha.2', '17.0.0-alpha.3', '17.0.0',         '17.0.1',
  '17.1.0',         '17.1.1',         '17.2.0',         '17.3.0',
  '17.3.1',         '17.4.0',         '17.5.0',         '17.6.0',
  '17.7.0',         '17.8.0',         '17.8.1',         '17.8.2',
  '17.8.3',         '17.9.0',         '17.10.0',        '18.0.0',
  '18.0.1',         '19.0.0',         '19.1.0',         '19.2.0',
  '19.3.0',         '19.4.0',         '19.4.1',         '19.4.2',
  '19.5.0',         '19.6.0',         '20.0.0',         '20.1.0',
  '20.2.0',         '20.3.0',         '20.3.1',         '20.4.0',
  '20.4.1',         '20.4.2',         '20.5.0',         '20.6.0',
  '20.6.1',         '20.6.2',         '21.0.0',         '21.0.1',
  '21.1.0',         '21.2.0',         '21.2.1',         '21.2.2',
  '21.3.0',         '21.4.0',         '21.5.0',         '21.6.0',
  '21.6.1',         '22.0.0',         '22.1.0',         '22.1.1',
  '22.1.2',         '23.0.0',         '23.0.1',         '23.1.0',
  '23.2.0',         '23.3.0',         '23.4.0',         '23.5.0',
  '23.5.1',         '23.5.2',         '23.6.0',         '23.6.1',
  '23.7.0',         '24.0.0',         '24.1.0',         '24.2.0',
  '24.3.0',         '24.4.0',         '24.5.0',         '24.5.1',
  '24.6.0',         '24.7.0',         '24.8.0',         '24.8.1',
  '24.9.0',         '25.0.0',         '25.1.0',         '25.1.1',
  '25.2.0',         '25.2.1',         '25.3.0',         '25.3.1',
  '25.3.2',         '25.4.0',         '25.5.0',         '25.5.1',
  '25.6.0',         '25.7.0',         '25.7.1',         '25.7.2',
  '25.7.3',         '25.8.0',         '25.8.1',         '25.8.2',
  '25.8.3',         '25.9.0',         '25.9.1',         '25.10.0',
  '25.11.0',        '26.0.0',         '26.0.1',         '26.1.0',
  '27.0.0-alpha.1', '27.0.0-alpha.2', '27.0.0-alpha.3', '27.0.0-alpha.4',
  '27.0.0-alpha.6', '27.0.0-alpha.7', '27.0.0-beta.1',  '27.0.0-beta.2',
  '27.0.0-beta.3',  '27.0.0-beta.4',  '27.0.0-beta.5',  '27.0.0-beta.6',
  '27.0.0-beta.7',  '27.0.0-beta.8',  '27.0.0-beta.9',  '27.0.0',
  '27.1.0',         '27.2.0',         '27.3.0',         '27.3.1',
  '27.4.0',         '27.4.1',         '27.5.0',         '27.5.1',
  '27.6.0',         '27.6.1',         '27.6.2',         '27.6.3',
  '27.6.4',         '27.6.5',         '27.7.0',         '27.8.0',
  '27.9.0',         '27.9.1',         '27.9.2',         '27.9.3',
  '28.0.0-beta.1',  '28.0.0-beta.2',  '28.0.0',         '28.1.0'
]

And on https://www.npmjs.com/package/sitespeed.io?activeTab=versions I can also see the latest versions.

@kluslulu
Copy link
Author

kluslulu commented Jun 28, 2023

Yes,you are right:
I upgraded my node version: 14.19.1 -> 19.8.1, and the versions is the same with yours!
image

Now I installed sitespeed.io28.0.1 successfully and generated a new log file:
chromedriver.log

And the command line told me another error:
image

Thanks for your patience~

@soulgalore
Copy link
Member

Hi @kluslulu do you have any extensions installed for Chrome? If you have, can you try running with --browsertime.chrome.args disable-extensions to disable them?

@kluslulu
Copy link
Author

kluslulu commented Jun 29, 2023

Hi @soulgalore:

I tried this but still didn't work, and thrown a new exception:

image

[2023-06-29 10:52:21] INFO: Versions OS: darwin 21.2.0 nodejs: v19.8.1 sitespeed.io: 28.1.0 browsertime: 17.11.2 coach: 7.2.1
[2023-06-29 10:52:21] INFO: Running tests using Chrome - 1 iteration(s)
[2023-06-29 10:52:23] INFO: chrome failed to start, trying 2 more time(s): disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=114.0.5735.198)
[2023-06-29 10:52:24] INFO: chrome failed to start, trying 1 more time(s): disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=114.0.5735.198)
[2023-06-29 10:52:25] INFO: chrome failed to start, trying 0 more time(s): disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=114.0.5735.198)
[2023-06-29 10:52:25] ERROR: BrowserError: Could not start chrome with 3 tries
at SeleniumRunner.start (file:///Users/user/.nvm/versions/node/v19.8.1/lib/node_modules/sitespeed.io/node_modules/browsertime/lib/core/seleniumRunner.js:86:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Iteration.run (file:///Users/user/.nvm/versions/node/v19.8.1/lib/node_modules/sitespeed.io/node_modules/browsertime/lib/core/engine/iteration.js:116:7)
at async Engine.runByScript (file:///Users/user/.nvm/versions/node/v19.8.1/lib/node_modules/sitespeed.io/node_modules/browsertime/lib/core/engine/index.js:304:20)
at async analyzeUrl (file:///Users/user/.nvm/versions/node/v19.8.1/lib/node_modules/sitespeed.io/lib/plugins/browsertime/analyzer.js:196:19)
at async BrowsertimePlugin.processMessage (file:///Users/user/.nvm/versions/node/v19.8.1/lib/node_modules/sitespeed.io/lib/plugins/browsertime/index.js:162:26)
[2023-06-29 10:52:25] ERROR: No data to collect
[2023-06-29 10:52:25] ERROR: Caught error from Browsertime TypeError: Cannot read properties of undefined (reading 'alias')
at BrowsertimePlugin.processMessage (file:///Users/user/.nvm/versions/node/v19.8.1/lib/node_modules/sitespeed.io/lib/plugins/browsertime/index.js:175:40)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2023-06-29 10:52:25] INFO: HTML stored in /Users/user/sitespeed-result/www.sitespeed.io/2023-06-29-10-52-21
Error: Errors while running:
TypeError: Cannot read properties of undefined (reading 'alias')
at start (file:///Users/user/.nvm/versions/node/v19.8.1/lib/node_modules/sitespeed.io/bin/sitespeed.js:146:15)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at runNextTicks (node:internal/process/task_queues:64:3)
at process.processImmediate (node:internal/timers:449:9)
at async file:///Users/user/.nvm/versions/node/v19.8.1/lib/node_modules/sitespeed.io/bin/sitespeed.js:178:1

Thanks~

@kluslulu
Copy link
Author

Hi @soulgalore :
I asked my colleagues who has the same OS and the same version of sitespeed.io to use sitespeed.io and without any problems.
I think this issue is more on using the environment of me.

I will check it carefully by myself and update here if I have a conclusion in the future.

Thanks for your help and patience, Peter~

@soulgalore
Copy link
Member

I think maybe it's a Chromedriver bug, looking at flathunters/flathunter#357 it seems others get the same problem as you on your Mac. I couldn't find any matching bugs at https://bugs.chromium.org/p/chromedriver/issues/list but if you have time, I can create simple test case just using Selenium/Chromedriver, and if you get the same problem there, it's easy to create a bug report and easier for the Chromedriver team to reproduce.

@kluslulu
Copy link
Author

I think maybe it's a Chromedriver bug, looking at flathunters/flathunter#357 it seems others get the same problem as you on your Mac. I couldn't find any matching bugs at https://bugs.chromium.org/p/chromedriver/issues/list but if you have time, I can create simple test case just using Selenium/Chromedriver, and if you get the same problem there, it's easy to create a bug report and easier for the Chromedriver team to reproduce.

Oh, I will be happy to cooperate with you to run your test cases.
I would appreciate it.

Thanks

@soulgalore
Copy link
Member

Thanks @kluslulu can you try this repo: https://github.com/soulgalore/selenium-test

Clone it, then run npm install and run node chrome.cjs. It will use the new Selenium built in support for downloading Chromedriver. It will run with only default switches so it would be interesting to see if it works for you.

@kluslulu
Copy link
Author

kluslulu commented Jun 30, 2023

Thanks @kluslulu can you try this repo: https://github.com/soulgalore/selenium-test

Clone it, then run npm install and run node chrome.cjs. It will use the new Selenium built in support for downloading Chromedriver. It will run with only default switches so it would be interesting to see if it works for you.

Thanks @soulgalore
I tried to run it and it throws an exception:
image
Applicable driver not found; attempting to install with Selenium Manager (Beta)
/Users/user/workspace/selenium-test/node_modules/selenium-webdriver/lib/error.js:524
let err = new ctor(data.message)
^

WebDriverError: disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=114.0.5735.198)
at Object.throwDecodedError (/Users/user/workspace/selenium-test/node_modules/selenium-webdriver/lib/error.js:524:15)
at parseHttpResponse (/Users/user/workspace/selenium-test/node_modules/selenium-webdriver/lib/http.js:601:13)
at Executor.execute (/Users/user/workspace/selenium-test/node_modules/selenium-webdriver/lib/http.js:529:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
remoteStacktrace: '0 chromedriver 0x00000001008aff48 chromedriver + 4226888\n' +
'1 chromedriver 0x00000001008a84f4 chromedriver + 4195572\n' +
'2 chromedriver 0x00000001004ecd68 chromedriver + 281960\n' +
'3 chromedriver 0x00000001004d45c0 chromedriver + 181696\n' +
'4 chromedriver 0x00000001004d578c chromedriver + 186252\n' +
'5 chromedriver 0x00000001004c56b8 chromedriver + 120504\n' +
'6 chromedriver 0x00000001004c52c4 chromedriver + 119492\n' +
'7 chromedriver 0x000000010054fa20 chromedriver + 686624\n' +
'8 chromedriver 0x000000010054f164 chromedriver + 684388\n' +
'9 chromedriver 0x000000010051bf1c chromedriver + 474908\n' +
'10 chromedriver 0x000000010051cef4 chromedriver + 478964\n' +
'11 chromedriver 0x000000010087159c chromedriver + 3970460\n' +
'12 chromedriver 0x00000001008756f0 chromedriver + 3987184\n' +
'13 chromedriver 0x000000010087b5b4 chromedriver + 4011444\n' +
'14 chromedriver 0x00000001008762fc chromedriver + 3990268\n' +
'15 chromedriver 0x000000010084e1c0 chromedriver + 3826112\n' +
'16 chromedriver 0x0000000100892088 chromedriver + 4104328\n' +
'17 chromedriver 0x00000001008921e0 chromedriver + 4104672\n' +
'18 chromedriver 0x00000001008a1f28 chromedriver + 4169512\n' +
'19 libsystem_pthread.dylib 0x0000000188e89240 _pthread_start + 148\n' +
'20 libsystem_pthread.dylib 0x0000000188e84024 thread_start + 8\n'
}

selenium-test.mp4

@soulgalore
Copy link
Member

Did this got fixed? It seems like a Selenium/driver issue. I would try to run the latest version of sitespeed.io and see if it works.

@soulgalore
Copy link
Member

Always try with the latest version and make sure you run latest stable versions of the browsers.

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

No branches or pull requests

2 participants