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

Error: TypeError: (intermediate value).headless is not a function #991

Closed
1 task done
andreas-pa opened this issue Jan 23, 2024 · 3 comments · Fixed by #992
Closed
1 task done

Error: TypeError: (intermediate value).headless is not a function #991

andreas-pa opened this issue Jan 23, 2024 · 3 comments · Fixed by #992
Labels
PACKAGE: cli PRIORITY: critical Critical priority item; should be worked on immediately QA: required This ticket requires QA signoff TYPE: user bug Bug that was found by a user

Comments

@andreas-pa
Copy link

andreas-pa commented Jan 23, 2024

Product

cli

Product Version

4.8.3

Latest Version

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

Issue Description

Expectation

Run axe command normally.

For example axe https://www.deque.com

Actual

It returns errors :

Running axe-core 4.8.3 in chrome-headless
Error: TypeError: (intermediate value).headless is not a function
    at /Users/.nvm/versions/node/v18.18.2/lib/node_modules/@axe-core/cli/dist/src/lib/webdriver.js:27:54
    at Generator.next (<anonymous>)
    at /Users/.nvm/versions/node/v18.18.2/lib/node_modules/@axe-core/cli/dist/src/lib/webdriver.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/.nvm/versions/node/v18.18.2/lib/node_modules/@axe-core/cli/dist/src/lib/webdriver.js:4:12)
    at startDriver (/Users/.nvm/versions/node/v18.18.2/lib/node_modules/@axe-core/cli/dist/src/lib/webdriver.js:20:33)
    at /Users/.nvm/versions/node/v18.18.2/lib/node_modules/@axe-core/cli/dist/src/bin/index.js:46:47
    at Generator.next (<anonymous>)
    at /Users/.nvm/versions/node/v18.18.2/lib/node_modules/@axe-core/cli/dist/src/bin/index.js:8:71
    at new Promise (<anonymous>)
Please report the problem to: https://github.com/dequelabs/axe-core-npm/issues/

How to Reproduce

Installed Versions :

Chrome : 120.0.6099.234
Chromedriver : 120.0.6099.109
npm : 9.8.1
node : 18.18.2
Mac OS : Sonoma

Also the output of npm list -g axe-core is

npm WARN config dev Please use --include=dev instead.
/Users/.nvm/versions/node/v18.18.2/lib
└─┬ @axe-core/[email protected]
  ├─┬ @axe-core/[email protected]
  │ └── [email protected] deduped
  └── [email protected]

Additional context

If i install the deprecated npm install -g axe-cli which is installing :

npm WARN config dev Please use --include=dev instead.
/Users/.nvm/versions/node/v18.18.2/lib
└─┬ [email protected]
  ├── [email protected]
  └─┬ [email protected]
    └── [email protected] deduped

Everything is working as expected when I am running axe https://www.deque.com

Last but not least, I played with different combination of node ( latest node version for example ) and chrome/chromedriver and still I am can see this issue.

@straker
Copy link
Contributor

straker commented Jan 23, 2024

Thanks for the issue. I can replicate the issue. We'll try to get out a fix as quick as we can.

@straker straker added TYPE: user bug Bug that was found by a user PRIORITY: critical Critical priority item; should be worked on immediately PACKAGE: cli QA: required This ticket requires QA signoff labels Jan 23, 2024
@straker
Copy link
Contributor

straker commented Jan 23, 2024

Found the issue. [email protected] released with a breaking change 10 hours ago which is causing the issue. So anyone who installs after their release will encounter this bug until we can get a new release of @axe-core/cli with a fix (which should happen later today).

@padmavemulapati
Copy link

Verified the issue during the 4.8.5 release, after fix available for [email protected] issue not seeing and working as expected.

Command run:

axe https://www.deque.com

Getting results:

MacBook-Pro:plaaywrightCore dq_user$ axe www.google.com
Running axe-core 4.8.4 in chrome-headless

Testing http://www.google.com ... please wait, this may take a minute.

  Violation of "aria-allowed-attr" with 1 occurrences!
    Ensures an element's role supports its ARIA attributes. Correct invalid elements at:
     - iframe
    For details, see: https://dequeuniversity.com/rules/axe/4.8/aria-allowed-attr

  Violation of "aria-allowed-role" with 1 occurrences!
    Ensures role attribute has an appropriate value for the element. Correct invalid elements at:
     - #APjFqb
    For details, see: https://dequeuniversity.com/rules/axe/4.8/aria-allowed-role

  Violation of "aria-valid-attr-value" with 1 occurrences!
    Ensures all ARIA attributes have valid values. Correct invalid elements at:
     - .ayzqOc
    For details, see: https://dequeuniversity.com/rules/axe/4.8/aria-valid-attr-value

  Violation of "frame-title" with 1 occurrences!
    Ensures <iframe> and <frame> elements have an accessible name. Correct invalid elements at:
     - iframe
    For details, see: https://dequeuniversity.com/rules/axe/4.8/frame-title

  Violation of "presentation-role-conflict" with 1 occurrences!
    Elements marked as presentational should not have global ARIA or tabindex to ensure all screen readers ignore them. Correct invalid elements at:
     - iframe
    For details, see: https://dequeuniversity.com/rules/axe/4.8/presentation-role-conflict

  Violation of "region" with 2 occurrences!
    Ensures all page content is contained by landmarks. Correct invalid elements at:
     - picture
     - #SIvCob
    For details, see: https://dequeuniversity.com/rules/axe/4.8/region

7 Accessibility issues detected.
Testing complete of 1 pages

Please note that only 20% to 50% of all accessibility issues can automatically be detected. 
Manual testing is always required. For more information see:
https://dequeuniversity.com/curriculum/courses/testingmethods

Screen.Recording.2024-03-08.at.4.40.38.PM.mov

Environment:

Label Value
Product axe-core-npm/cli
Version 4.8.5
OS-Details _MAC- Intel Core i7 - 11.6.8 && Windows 11 _
BrowserDetails Chrome Version 122.0.6261.112 && Firefox 123.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PACKAGE: cli PRIORITY: critical Critical priority item; should be worked on immediately QA: required This ticket requires QA signoff TYPE: user bug Bug that was found by a user
Projects
None yet
3 participants