axe-cli
axe-cli copied to clipboard
Running axe on Amazon Linux not finding Chrome
Hello -- I've been trying to upgrade to the new version of axe-cli but installing it on Amazon Linux does not seem to find the chrome driver. I have tried various things to install headless chrome to no avail.
This is the error I get: `bash-4.2# axe https://www.nj.com Running axe-core 3.1.2 in chrome-headless /root/.nvm/versions/node/v6.11.5/lib/node_modules/axe-cli/node_modules/selenium-webdriver/lib/promise.js:2626 throw error; ^
WebDriverError: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 4.9.125-linuxkit x86_64)
at WebDriverError (/root/.nvm/versions/node/v6.11.5/lib/node_modules/axe-cli/node_modules/selenium-webdriver/lib/error.js:27:5)
at Object.checkLegacyResponse (/root/.nvm/versions/node/v6.11.5/lib/node_modules/axe-cli/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse (/root/.nvm/versions/node/v6.11.5/lib/node_modules/axe-cli/node_modules/selenium-webdriver/lib/http.js:509:13)
at doSend.then.response (/root/.nvm/versions/node/v6.11.5/lib/node_modules/axe-cli/node_modules/selenium-webdriver/lib/http.js:441:30)
at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: WebDriver.createSession()
at Function.createSession (/root/.nvm/versions/node/v6.11.5/lib/node_modules/axe-cli/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
at Function.createSession (/root/.nvm/versions/node/v6.11.5/lib/node_modules/axe-cli/node_modules/selenium-webdriver/chrome.js:761:15)
at createDriver (/root/.nvm/versions/node/v6.11.5/lib/node_modules/axe-cli/node_modules/selenium-webdriver/index.js:170:33)
at Builder.build (/root/.nvm/versions/node/v6.11.5/lib/node_modules/axe-cli/node_modules/selenium-webdriver/index.js:642:16)
at startDriver (/root/.nvm/versions/node/v6.11.5/lib/node_modules/axe-cli/lib/webdriver.js:33:27)
at testPages (/root/.nvm/versions/node/v6.11.5/lib/node_modules/axe-cli/lib/axe-test-urls.js:11:10)
at Object.
Running Chrome/axe on AWS is tricky.
I haven't had luck with axe-cli
, but suggest axe-puppeteer
instead. This also gives us the benefit of being able to script "actions" before/after running an accessibility analysis.
As far as Chrome, it's generally expected that you "bring your own" (especially in a lambda environment). For this, I use chrome-aws-lambda
. It's got basically everything you'll need packaged up into a single npm install
able thing.
Hi Stephen,
Thank you for the quick reply. I will try out your options and hopefully I will have some luck.
Thanks, --simi
From: Stephen Mathieson [email protected] Reply-To: dequelabs/axe-cli [email protected] Date: Thursday, January 31, 2019 at 9:15 AM To: dequelabs/axe-cli [email protected] Cc: Simi Asaro [email protected], Author [email protected] Subject: Re: [dequelabs/axe-cli] Running axe on Amazon Linux not finding Chrome (#84)
Running Chrome/axe on AWS is tricky.
I haven't had luck with axe-cli, but suggest axe-puppeteerhttps://github.com/dequelabs/axe-puppeteer instead. This also gives us the benefit of being able to script "actions" before/after running an accessibility analysis.
As far as Chrome, it's generally expected that you "bring your own" (especially in a lambda environment). For this, I use chrome-aws-lambdahttps://github.com/alixaxel/chrome-aws-lambda. It's got basically everything you'll need packaged up into a single npm installable thing.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/dequelabs/axe-cli/issues/84#issuecomment-459359243, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABsCJgp9Wr4IlEd3xROIytV0tUH8QFnUks5vIvqLgaJpZM4aa9cP.
I've tried it on Ubuntu as well, but I keep getting this error:
root@1c99a09bbfbe:~# axe https://www.nj.com Running axe-core 3.1.2 in chrome-headless /usr/local/lib/node_modules/axe-cli/node_modules/selenium-webdriver/lib/promise.js:2626 throw error; ^
WebDriverError: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 4.9.125-linuxkit x86_64)
at Object.checkLegacyResponse (/usr/local/lib/node_modules/axe-cli/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse (/usr/local/lib/node_modules/axe-cli/node_modules/selenium-webdriver/lib/http.js:509:13)
at doSend.then.response (/usr/local/lib/node_modules/axe-cli/node_modules/selenium-webdriver/lib/http.js:441:30)
at
From what I read here: https://stackoverflow.com/questions/53073411/selenium-webdriverexceptionchrome-failed-to-start-crashed-as-google-chrome-is
But the location of chrome is in the right place: root@1c99a09bbfbe:~# which google-chrome /usr/bin/google-chrome
Any suggestions on how to fix this???
Use webdriver-manager.
Same error on Ubuntu even trying with webdriver-manager too.
Thanks to @michael-siek, we think it might be related to this issue: https://github.com/SeleniumHQ/selenium/issues/4961. A few comments suggest that adding --no-sandbox
when we start chromedriver will fix the problem. I'll go ahead and make a pr to do so and hopefully it will fix this issue.
Scratch that, we already have a way you can do this without a pr. You can use the --chrome-options flag to add --no-sandbox
. That should hopefully fix it for you.
$ axe --chrome-options="no-sandbox" www.deque.com
CC: @simi823 @giuliastro