axe-core-npm
axe-core-npm copied to clipboard
Error: chrome.setDefaultService is not a function
The following error started to happen on my project's pipeline today when running axe CLI:

After a little bit of investigation, I've found out that the culprit is apparently version 4.3.1 of selenium-webdriver (published ~3 hours ago). The previous version (4.3.0) does contain the setDefaultService function:

But the new one (4.3.1) does not:

If that's not a bug on their side, this should be published as a breaking change (5.0.0), but in the meantime, using version 4.3.0 (exact) is probably going to fix this issue on axe's side.
axe-core version: 4.4.2
@axe-core/4.4.3
- Node version: v17.9.0
- Platform: Linux
Just for future reference, I was able to work around this issue by adding this on the Dockerfile we're using, after installing @axe-core/cli globally:
RUN cd $(npm list -g | head -n 1)/node_modules/@axe-core/cli && npm install [email protected] --save-exact
Hey @renato-bohler,
I saw that selenium webdriver did infact create a breaking change when upgrading from version 4.3.0 -> 4.3.1 by removing that function. I should have a PR here shortly to pin to use selenium webdriver 4.3.0
I came across the same issue. The PR leading to this is https://github.com/SeleniumHQ/selenium/pull/10796
Validated with [email protected] version, [email protected] and chrome driver(104.0.0), not seeing any error.
Closing no docs required