-
Notifications
You must be signed in to change notification settings - Fork 68
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
Cli stuck, does not exit #230
Comments
It seems to happen when the page does not have any errors |
I have the same issue in my CI/CD job. $ axe example.com --chrome-options "no-sandbox" --timer --exit
Running axe-core 4.0.2 in chrome-headless
Testing https://example.com ... please wait, this may take a minute.
Too long with no output (exceeded 10m0s): context deadline exceeded My CI/CD job expires because no output occurs from the axe cli. If I curl the page first into a HTML file: $ curl https://example.com --connect-timeout 10 --output test.html
$ axe file:///axe/test.html --chrome-options "no-sandbox" --timer --exit
Running axe-core 4.0.2 in chrome-headless
Testing file:///axe/test.html ... please wait, this may take a minute.
(node:43) Warning: Label 'page load time' already exists for console.time()
(Use `node --trace-warnings ...` to show where the warning was created)
axe-core execution time: 2.383s
Violation of "color-contrast" with 1 occurrences!
Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds. Correct invalid elements at:
- iframe[title="reCAPTCHA"] .rc-anchor-center-item
For details, see: https://dequeuniversity.com/rules/axe/4.0/color-contrast
1 Accessibility issues detected.
Total test time: 3.021s
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
Exited with code exit status 1 Seems to be an issue with the webdriver reaching out and loading the url. |
@Elte156 I also have a CSP in place so I think we have the exact same issue. If I understand correctly this fix just issue the timeout? |
Correct @marcuslindblom. The PR will at least exit, which presents the opportunity to give error feedback, instead of just hanging. I found that if you use the CSP header that I described in the PR, AXE will be compatible with the rest of your CSP and process the page. |
Ok, setting the CSP to unsafe is not an option for me so I guess I have to wait for an other fix 👍🏻 |
@marcuslindblom I understand. I got around this by having more lenient CSP rule sets in lower environments like local, test, and beta. Then I just test with AXE-cli without issue. The axe puppeteer package mentions this toggle axe-core-npm/packages/cli/src/lib/axe-test-urls.ts Lines 34 to 36 in a9e7921
I believe this is what a strict CSP header ( script-scr ) does not like and will block AXE from continuing.
Are there any more instances where AXE needs to inject itself into the page? |
I use 4.1.4 and when I test my page the cli just hangs with this message.
I tried the verbose flag but nothing happens. Is it possible to debug and see what happens?
The text was updated successfully, but these errors were encountered: