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 cannot find Chrome version 115.0.5790.102 (Official Build) (x86_64) #774

Open
1 task done
zoltan-dulac opened this issue Jul 25, 2023 · 12 comments
Open
1 task done

Comments

@zoltan-dulac
Copy link

Product

cli

Product Version

4.7.3

Latest Version

  • I have tested the issue with the latest version of the product

Issue Description

Expectation

I am trying to run axe on a new OSX laptop. However, it keeps telling me Error: WebDriverError: unknown error: cannot find Chrome binary. I am running Chrome Version 115.0.5790.102 (Official Build) (x86_64). I have the correct Chromedriver installed for that version.

Actual

Here is a copy/paste of my terminal session (with XXXXXXX obfuscating my username on my laptop):

$ axe --chromedriver-path=node_modules/chromedriver/bin/chromedriver https://www.useragentman.com
Running axe-core 4.7.2 in chrome-headless
Error: WebDriverError: unknown error: cannot find Chrome binary
    at Object.throwDecodedError (/Users/XXXXXX/.nvm/versions/node/v20.4.0/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/error.js:524:15)
    at parseHttpResponse (/Users/XXXXXX/.nvm/versions/node/v20.4.0/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/http.js:601:13)
    at Executor.execute (/Users/XXXXXX/.nvm/versions/node/v20.4.0/lib/node_modules/@axe-core/cli/node_modules/selenium-webdriver/lib/http.js:529:28)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  remoteStacktrace: '0   chromedriver                        0x0000000109aafa58 chromedriver + 4991576\n' +
    '1   chromedriver                        0x0000000109aa6fa3 chromedriver + 4956067\n' +
    '2   chromedriver                        0x0000000109659607 chromedriver + 443911\n' +
    '3   chromedriver                        0x00000001096874b7 chromedriver + 631991\n' +
    '4   chromedriver                        0x000000010968664c chromedriver + 628300\n' +
    '5   chromedriver                        0x00000001096cf24c chromedriver + 926284\n' +
    '6   chromedriver                        0x00000001096ce5af chromedriver + 923055\n' +
    '7   chromedriver                        0x00000001096c5633 chromedriver + 886323\n' +
    '8   chromedriver                        0x00000001096916f9 chromedriver + 673529\n' +
    '9   chromedriver                        0x00000001096928de chromedriver + 678110\n' +
    '10  chromedriver                        0x0000000109a6b8a9 chromedriver + 4712617\n' +
    '11  chromedriver                        0x0000000109a708b4 chromedriver + 4733108\n' +
    '12  chromedriver                        0x0000000109a77799 chromedriver + 4761497\n' +
    '13  chromedriver                        0x0000000109a7160a chromedriver + 4736522\n' +
    '14  chromedriver                        0x0000000109a4487c chromedriver + 4552828\n' +
    '15  chromedriver                        0x0000000109a8fc08 chromedriver + 4860936\n' +
    '16  chromedriver                        0x0000000109a8fd87 chromedriver + 4861319\n' +
    '17  chromedriver                        0x0000000109a9fedf chromedriver + 4927199\n' +
    '18  libsystem_pthread.dylib             0x00007ff8119d81d3 _pthread_start + 125\n' +
    '19  libsystem_pthread.dylib             0x00007ff8119d3bd3 thread_start + 15\n'
}
Please report the problem to: https://github.com/dequelabs/axe-core-npm/issues/


How to Reproduce

See above.

Additional context

No other context.

@straker
Copy link
Contributor

straker commented Jul 25, 2023

Thanks for the issue. What is the path to your Chrome binary? Chromedriver requires Chrome to be installed into specific paths in order to find it. If it's not located at one of these paths then you'll need to add the path to the binary into your global path.

@zoltan-dulac
Copy link
Author

@straker Thanks for the response. The funny thing is, it is in /Applications/Google\ Chrome.app/Contents/MacOS, just like in that doc (I did check but forgot to mention). I didn't install it in an odd way. I am wondering if it has something to do with the security settings on the machine ... maybe the OS is blocking the launching of headless Chrome?

@zoltan-dulac
Copy link
Author

zoltan-dulac commented Jul 28, 2023

@straker I found out what the problem is. With version 115 and higher, chromedriver is included in Google Chrome For Testing:

https://googlechromelabs.github.io/chrome-for-testing/

The problem with the default path for OSX (i.e. /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome) is not valid anymore. It should be /Applications/Google\ Chrome\ for\ Testing.app/Contents/MacOS/Google\ Chrome\ for\ Testing.

Is there a way to change this default in axe-core-npm?

@straker
Copy link
Contributor

straker commented Jul 31, 2023

I didn't realize Chrome for Testing included chromedriver. At the moment there isn't a way to change the path, but #704 would allow an option to change it. I'll see about getting it merged.

@straker
Copy link
Contributor

straker commented Jul 31, 2023

It looks like this issue is being fixed in Chrome for Testing and they will use the Chrome binary path by default GoogleChromeLabs/chrome-for-testing#30. From the chrome bug tracker the fix should be released sometime soon.

@zoltan-dulac
Copy link
Author

Sorry ... didn't mean to close earlier .. reopened. (^_^);;;

In response to your comment about Chrome for Testing included chromedriver: I am not sure if you know, but it seems this is the only get chromedriver as well.

I appreciate you digging on this. Thanks for looking into it. Hopefully Chrome for Testing fixes this soon.

@straker
Copy link
Contributor

straker commented Aug 3, 2023

@zoltan-dulac looks like chromedriver 115 now has the fix. Would you mind testing it on your end and seeing if it works? GoogleChromeLabs/chrome-for-testing#30 (comment)

@anagritsay
Copy link

Hello, I still have the same issue related with the webdriver. The Chrome version and webriver version matches. Also, I have installed axe-core/cli the latest 4.7.3 version but it runs the version 4.7.2 anyway

@straker
Copy link
Contributor

straker commented Aug 7, 2023

Looks like chromedriver on npm still installs 115.0.5790.102 and not 115.0.5790.170 which includes the fix. Looks like there's a pr in chromedriver for it.

@straker
Copy link
Contributor

straker commented Aug 8, 2023

chromedriver npm released and is now using 115.0.5790.170. Tested and it uses the Chrome binary correctly.

@anagritsay
Copy link

anagritsay commented Aug 9, 2023

Hello, I don't have any changes. There is still the same error. And it is running the version 4.7.2, but I am using the version 4.7.3 in the package.json in devDependencies "@axe-core/cli": "^4.7.3". Sending the print screen

Screenshot 2023-08-09 at 10 46 30

I checked the chromedriver version and it is: chromedriver@115.0.0, which is compatible with the current browser Chrome version 115.0.5790.170

@straker
Copy link
Contributor

straker commented Aug 9, 2023

How are you running the cli? If you've installed chromedriver v115 then you can use the --chromepath option to use the version you've installed.

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