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 apparently not respecting the --chromedriver-path argument #370

Closed
macbookandrew opened this issue Sep 17, 2021 · 9 comments
Closed
Labels
bug Something isn't working PR A PR has been opened for this issue

Comments

@macbookandrew
Copy link

Product: cli

Expectation: I expect that using the --chromedriver-path to specify a path should work

Actual: It apparently ignores it

Example:

❯ axe https://example.com --chromedriver-path="/usr/local/Caskroom/chromedriver/93.0.4577.63/chromedriver" --show-errors
Running axe-core 4.3.3 in chrome-headless
Error: "session not created: This version of ChromeDriver only supports Chrome version 90\nCurrent browser version is 93.0.4577.82 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
 $s SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 90
Current browser version is 93.0.4577.82 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:517:15)
    at parseHttpResponse (/usr/local/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/http.js:643:13)
    at Executor.execute (/usr/local/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/http.js:569:28)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
Please report the problem to: https://github.com/dequelabs/axe-core-npm/issues/

# To verify chromedriver version:
❯ /usr/local/Caskroom/chromedriver/93.0.4577.63/chromedriver --version
ChromeDriver 93.0.4577.63 (ff5c0da2ec0adeaed5550e6c7e98417dac77d98a-refs/branch-heads/4577@{#1135})

Motivation: I’m just trying to use the CLI 😂


axe-core version: 4.3.3
@axe-core/cli: 4.2.2

- Node version: 16.6.1
- Platform: Mac
@macbookandrew
Copy link
Author

BTW I am getting the same error when I run without the --chromedriver-path flag:

❯ axe https://example.com --show-errors
Running axe-core 4.3.3 in chrome-headless
Error: "session not created: This version of ChromeDriver only supports Chrome version 90\nCurrent browser version is 93.0.4577.82 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
 $s SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 90
Current browser version is 93.0.4577.82 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:517:15)
    at parseHttpResponse (/usr/local/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/http.js:643:13)
    at Executor.execute (/usr/local/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/http.js:569:28)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
Please report the problem to: https://github.com/dequelabs/axe-core-npm/issues/

@ejayaraman
Copy link

ejayaraman commented Oct 24, 2021

I observe the same issue in Mac. Happy to provide steps to reproduce, if required. Thanks.

axe --show-errors https://example.com --chromedriver-path="/usr/local/bin/chromedriver"
Running axe-core 4.3.3 in chrome-headless
Error: "session not created: This version of ChromeDriver only supports Chrome version 93\nCurrent browser version is 95.0.4638.54 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome" 
 $s SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 93
Current browser version is 95.0.4638.54 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    at Object.throwDecodedError (/Users/ej/.nvm/versions/node/v12.16.1/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/error.js:517:15)
    at parseHttpResponse (/Users/ej/.nvm/versions/node/v12.16.1/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/http.js:643:13)
    at Executor.execute (/Users/ej/.nvm/versions/node/v12.16.1/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/http.js:569:28)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Please report the problem to: https://github.com/dequelabs/axe-core-npm/issues/

@Weilinnn
Copy link

Im having the same issue on Mac as well.


axe https://example.com --chromedriver-path="/usr/local/bin/chromedriver" --show-errors
Running axe-core 4.3.4 in chrome-headless
Error: "session not created: This version of ChromeDriver only supports Chrome version 93\nCurrent browser version is 95.0.4638.54 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome" 
 $s SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 93
Current browser version is 95.0.4638.54 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:517:15)
    at parseHttpResponse (/opt/homebrew/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/http.js:643:13)
    at Executor.execute (/opt/homebrew/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/http.js:569:28)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
Please report the problem to: https://github.com/dequelabs/axe-core-npm/issues/

I notice there is a update chromedriver to use v95.x merge. #392 I tried to copy in the file, and npm install it but end up with


 zsh: command not found: axe 

@Zidious Zidious added bug Something isn't working PR A PR has been opened for this issue labels Jan 5, 2022
@Zidious
Copy link
Contributor

Zidious commented Jan 10, 2022

Hello All,

Thanks for submitting this issue. We have recently merged a PR to resolve using a different Chrome Driver version. However, after some investigation it appears your actual Chrome and Chrome driver have to match other wise this error will occur. For example, I have V96 of Chrome installed and I am able to use V96-97 but I cannot use anything prior to V96.

We maintain multiple versions of ChromeDriver. Which version to select depends on the version of Chrome you are using it with. Specifically:

ChromeDriver uses the same version number scheme as Chrome. See https://www.chromium.org/developers/version-numbers for more details. Each version of ChromeDriver supports Chrome with matching major, minor, and build version numbers. For example, ChromeDriver 73.0.3683.20 supports all Chrome versions that start with 73.0.3683. Before a new major version of Chrome goes to Beta, a matching version of ChromeDriver will be released. After the initial release of a new major version, we will release patches as needed. These patches may or may not coincide with updates to Chrome.

Source: chromedriver.chromium.org

@zacharyFolwick
Copy link

This bug is still an issue. Chrome and chromedriver versions match.

@Zidious
Copy link
Contributor

Zidious commented Feb 3, 2022

Hey @zacharyFolwick,

Could you please confirm if you have tried the @next version of axe-core-npm CLI tool as this includes the fix. The merged PR is not yet been put into a stable release yet.

@Zidious
Copy link
Contributor

Zidious commented Apr 19, 2022

Closing due to inactivity. Please feel free to reopen if the issue is still apparent in 4.4.1.

@Zidious Zidious closed this as completed Apr 19, 2022
@ExplorerSunil
Copy link

Its still the same even in 4.7.3. I've downloaded the chrome driver 113 from here: https://chromedriver.chromium.org/downloads and my current google chrome version is 115, but its expecting 113. Whats the point of providing the parameter if the installed browser and driver for testing needs to match anyway. If I downgrade my chrome, then it would be solved automatically.

@Zidious
Copy link
Contributor

Zidious commented Jul 29, 2023

Correct - unfortunately, that is not a limitation of the CLI. Chromedriver requires the Chrome version to match (or be at least +/- 1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR A PR has been opened for this issue
Projects
None yet
Development

No branches or pull requests

6 participants