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

axe-cli fails with Chrome 98 #450

Closed
acdha opened this issue Feb 11, 2022 · 6 comments
Closed

axe-cli fails with Chrome 98 #450

acdha opened this issue Feb 11, 2022 · 6 comments
Assignees

Comments

@acdha
Copy link

acdha commented Feb 11, 2022

Product: cli

Expectation: CLI runs

Actual:

With a fresh install of Chrome, ChromeDriver, and npm install @axe-core/cli -g today:

cadams@Galatea ~> axe --show-errors http://localhost:8000
Running axe-core 4.4.1 in chrome-headless
Error: "session not created: This version of ChromeDriver only supports Chrome version 96\nCurrent browser version is 98.0.4758.80 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome" 
 $s SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 96
Current browser version is 98.0.4758.80 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    at Object.throwDecodedError (/opt/homebrew/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/error.js:522:15)
    at parseHttpResponse (/opt/homebrew/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/http.js:548:13)
    at Executor.execute (/opt/homebrew/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/http.js:474:28)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
Please report the problem to: https://github.com/dequelabs/axe-core-npm/issues/

Motivation: << Describe why you want the behavior to be changed >>


axe-core version: 4.3.2
@axe-core/[integration]: X.Y.Z

- Node version: v17.4.0
- Platform:  macOS 12.2.1
@acdha
Copy link
Author

acdha commented Feb 11, 2022

It's not clear whether #448 will fix this

@Zidious
Copy link
Contributor

Zidious commented Feb 11, 2022

Hey @acdha,

Thank you for submitting this issue.

If you could locate the ChromeDriver executable, open it and you may need to enable the prompt that will appear under "Allow apps downloaded from"

image

Check the version:

chromedriver --version
ChromeDriver 98.0.4758.80

Edit: if the the above does not succeed, please try to pass the path of the ChromeDriver to the CLI tool:

axe www.google.com --chromedriver-path /usr/local/bin/chromedriver

I have raised an issue: #452 a PR will follow shortly.

@acdha
Copy link
Author

acdha commented Feb 11, 2022

Here's the chromedriver version:

cadams@Galatea ~> chromedriver --version
ChromeDriver 98.0.4758.80 (7f0488e8ba0d8e019187c6325a16c29d9b7f4989-refs/branch-heads/4758@{#972})
cadams@Galatea ~> axe www.google.com --chromedriver-path (which chromedriver) --show-errors
Running axe-core 4.4.1 in chrome-headless
Error: "session not created: This version of ChromeDriver only supports Chrome version 96\nCurrent browser version is 98.0.4758.80 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome" 
 $s SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 96

@padmavemulapati
Copy link

@acdha try install cli with @axe-core/cli@next and do this chromedriver executable in terminal. It will resolve the problem

@Zidious
Copy link
Contributor

Zidious commented Feb 15, 2022

Hey @acdha,

Apologies for the delay, we recently merged a PR to fix the ChromeDriver issue (to use latest for reference see #454). We will be doing a patch release shortly. However we have a canary release available, could you please try installing: npm i @axe-core/cli@4.4.1-alpha.247 -g. This build includes the fix:

image

@padmavemulapati
Copy link

Validated during latest patch release testing for (4.4.1-alpha.252)
It was always installed as a dependency, but now it's using latest instead of us pinning a chromedriver version. Example:
Prior to change:
if a user has Chrome V98, our package was pinned to V95 chromedriver, this would break CLI
New change:
If a user install CLI it will install latest chromedriver (say V99) their browser needs to be fully up to date

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

3 participants