-
Notifications
You must be signed in to change notification settings - Fork 68
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
cli: Provide better error message for ChromeDriver version mismatch #679
cli: Provide better error message for ChromeDriver version mismatch #679
Comments
It looks like you used the Chrome executable as a chromedriver, which is why it launched chrome. You should be able to install
|
For what it's worth, passing ( |
Huh, that's weird. Passing |
Doesn't work for me either (mac os ventura, node 19.4.0). I'm passing a path that exists and has the correct version, but axe is trying to use the system browser anwyay:
oddly, these same steps worked perfectly in CI, but they don't work on my machine |
[this comment](dequelabs/axe-core-npm#679 (comment)) showed me how to pin the axe and chromedriver version, to hopefully prevent mismatches. closes #18
Oh yes, you have to install the right version of chromedriver matching your installed version of Chrome, which is 111 so you'll need to install
Yes chromedriver doesn't replace Chrom(e|ium) ... the version just has to match. |
I see the same problem axe https://example.com
Running axe-core 4.6.3 in chrome-headless
Error: SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 109
Current browser version is 111.0.5563.64 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
at Object.throwDecodedError (/usr/local/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/error.js:522:15)
at parseHttpResponse (/usr/local/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/http.js:589:13)
at Executor.execute (/usr/local/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/http.js:514:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
remoteStacktrace: '0 chromedriver 0x0000000106c78fa8 chromedriver + 4886440\n' +
'1 chromedriver 0x0000000106bf6643 chromedriver + 4351555\n' +
'2 chromedriver 0x0000000106844b27 chromedriver + 477991\n' +
'3 chromedriver 0x0000000106876659 chromedriver + 681561\n' +
'4 chromedriver 0x00000001068713bb chromedriver + 660411\n' +
'5 chromedriver 0x000000010686d712 chromedriver + 644882\n' +
'6 chromedriver 0x00000001068b8bd7 chromedriver + 953303\n' +
'7 chromedriver 0x00000001068af3a3 chromedriver + 914339\n' +
'8 chromedriver 0x000000010687957f chromedriver + 693631\n' +
'9 chromedriver 0x000000010687ab1e chromedriver + 699166\n' +
'10 chromedriver 0x0000000106c45b9e chromedriver + 4676510\n' +
'11 chromedriver 0x0000000106c4a91e chromedriver + 4696350\n' +
'12 chromedriver 0x0000000106c5219f chromedriver + 4727199\n' +
'13 chromedriver 0x0000000106c4b81a chromedriver + 4700186\n' +
'14 chromedriver 0x0000000106c1ea62 chromedriver + 4516450\n' +
'15 chromedriver 0x0000000106c6a8c8 chromedriver + 4827336\n' +
'16 chromedriver 0x0000000106c6aa45 chromedriver + 4827717\n' +
'17 chromedriver 0x0000000106c807ef chromedriver + 4917231\n' +
'18 libsystem_pthread.dylib 0x00007ff80e86b259 _pthread_start + 125\n' +
'19 libsystem_pthread.dylib 0x00007ff80e866c7b thread_start + 15\n'
}
Please report the problem to: https://github.com/dequelabs/axe-core-npm/issues/ I installed chrome108 and same with 111 npm install -g chromedriver@108 Still getting the error axe --chromedriver-path $(npm root -g)/chromedriver/bin/chromedriver http://example.com/
Running axe-core 4.6.3 in chrome-headless
Error: SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 108
Current browser version is 111.0.5563.64 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
at Object.throwDecodedError (/usr/local/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/error.js:522:15)
at parseHttpResponse (/usr/local/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/http.js:589:13)
at Executor.execute (/usr/local/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/http.js:514:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
remoteStacktrace: '0 chromedriver 0x0000000103959f38 chromedriver + 4910904\n' +
'1 chromedriver 0x00000001038d9a03 chromedriver + 4385283\n' +
'2 chromedriver 0x000000010351e747 chromedriver + 472903\n' +
'3 chromedriver 0x00000001035503e9 chromedriver + 676841\n' +
'4 chromedriver 0x000000010354b14b chromedriver + 655691\n' +
'5 chromedriver 0x00000001035474a2 chromedriver + 640162\n' +
'6 chromedriver 0x0000000103592460 chromedriver + 947296\n' +
'7 chromedriver 0x0000000103591cbf chromedriver + 945343\n' +
'8 chromedriver 0x0000000103588ee3 chromedriver + 909027\n' +
'9 chromedriver 0x000000010355330c chromedriver + 688908\n' +
'10 chromedriver 0x000000010355488e chromedriver + 694414\n' +
'11 chromedriver 0x00000001039271de chromedriver + 4702686\n' +
'12 chromedriver 0x000000010392bb19 chromedriver + 4721433\n' +
'13 chromedriver 0x000000010393328e chromedriver + 4752014\n' +
'14 chromedriver 0x000000010392c91a chromedriver + 4725018\n' +
'15 chromedriver 0x0000000103900b02 chromedriver + 4545282\n' +
'16 chromedriver 0x000000010394b888 chromedriver + 4851848\n' +
'17 chromedriver 0x000000010394ba05 chromedriver + 4852229\n' +
'18 chromedriver 0x0000000103961e5f chromedriver + 4943455\n' +
'19 libsystem_pthread.dylib 0x00007ff80e86b259 _pthread_start + 125\n' +
'20 libsystem_pthread.dylib 0x00007ff80e866c7b thread_start + 15\n'
}
Please report the problem to: https://github.com/dequelabs/axe-core-npm/issues/ I'm not sure of a fix, but the issue is still around |
🤦 Thank you -- I thought the |
ah ha! I guess I thought that the chromedriver message was saying that axe only supported the noted version, not understanding that axe just needs any version of chromedriver that supports the version of chrome present on the system. I guess I assumed that the chromedriver package included chrome. Installing chromedriver@111 works:
Thanks! |
Thanks @Zidious! @not-my-profile - Steps to Fix/Get Working
Example: axe www.google.com --chromedriver-path /usr/local/bin/chromedriver Getting Fancyaxe www.google.com --chromedriver-path $(where chromedriver) Getting FancierThis asks for you to input the URL after running it. IE you don't have to put the URL between echo -n "URL to check: "
read url
axe "$url" --chromedriver-path "$(where chromedriver)" To-Do for Me
|
@TheBoatyMcBoatFace Just as an FYI, a user can have multiple chromedrivers installed at a time (for example one in global npm and another from /user/local), so just saying |
FYI Github Action's Ubuntu runners may fail since the |
I am on Debian where the latest stable version of chromium is 108.
To be honest i am not sure how to get this working.
@axe-core/puppeteer
works fine since installingpuppeteer
also automatically downloads chromium into~/.cache/puppeteer/chrome/
. However the following doesn't work:it just opens chrome (not in headless mode for some reason) and doesn't open example.com (neither does it say "this chrome instance is remote controlled") ... probably because that chrome version is 111.0.5555.0, which isn't 109? How am I supposed to install Chrome 109?
The text was updated successfully, but these errors were encountered: