axe-core-npm icon indicating copy to clipboard operation
axe-core-npm copied to clipboard

Error: chrome.setDefaultService is not a function

Open renato-bohler opened this issue 2 years ago • 3 comments

The following error started to happen on my project's pipeline today when running axe CLI:

image

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:

image

But the new one (4.3.1) does not:

image

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

renato-bohler avatar Jul 07 '22 14:07 renato-bohler

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

renato-bohler avatar Jul 07 '22 15:07 renato-bohler

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

michael-siek avatar Jul 08 '22 14:07 michael-siek

I came across the same issue. The PR leading to this is https://github.com/SeleniumHQ/selenium/pull/10796

MarkusJLechner avatar Jul 11 '22 12:07 MarkusJLechner

Validated with [email protected] version, [email protected] and chrome driver(104.0.0), not seeing any error.

padmavemulapati avatar Aug 22 '22 10:08 padmavemulapati

Closing no docs required

michael-siek avatar Aug 24 '22 18:08 michael-siek