-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. #324
Comments
Do the logs show any specific message detailing the problem? |
What is the status of this issue? Has it been resolved and can it be closed? |
Fixed it by making sure to chmod +x the .sh files |
Hey all Unfortunately I'm also encountering the same issue on both I built the docker image and ran the container on an M1 ARM Macbook Pro. So far this this the only machine that i've tested on and most of my friends and work mates also use this machine so i'm not able to test this out on a x86/linux/amd64 machine.I would appreciate if anyone could take the time to let me know if they are also facing the same issue as well! I've already tried changing the I am hoping to completely rely on docker fully and not have to install any dependencies locally on my machine. Any help, explanation and advice would be appreciated! I've been thinking about this problem for days now. |
Do the Chrome logs show any specific message detailing the problem? Could you post them here please? |
Thank you for your reply @ppodgorsek. Hoping this would help those who encounter this issue as well. So i've managed to make it work. The issue lies with webdriver not being able to communicate with chrome as i'm running an M1 Arm mac. You cannot use the official selenium or chrome image. you have to use the arm64 compatible image from the link below To solve this, what i did was to run a standalone # in shell/terminal
# Run Selenium Server with Chromium in standalone mode
docker run --name seleniarm-chromium --rm -it -p 4444:4444 -p 5900:5900 -p 7900:7900 --shm-size 3g seleniarm/standalone-chromium:latest
After wards in my test, i have a condition that if i'm running my test locally on chrome, i will connect to that arm64 chromium selenium server. Else, i'll just rely on firefox running in the docker container. // test.robot
*** Settings ***
Library SeleniumLibrary
*** Variables ***
${BROWSER} %{E2E_BROWSER}
${ENV} %{APP_ENV}
*** Test Cases ***
Determine mode
IF "${BROWSER}" == 'chrome' and "${ENV}" == 'testing'
${chrome_options} = Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
Call Method ${chrome_options} add_argument headless
Call Method ${chrome_options} add_argument disable-gpu
${options} Call Method ${chrome_options} to_capabilities
${orig timeout} = Set Selenium Timeout 15 seconds
Open Browser https://www.google.com browser=${BROWSER} remote_url=http://172.17.0.2:4444 desired_capabilities=${options}
ELSE
Open Browser https://www.yahoo.com ${BROWSER}
END
Capture SS
Capture Page Screenshot
Close Browser # in shell/terminal
#Run e2e test
docker run --rm --platform linux/amd64 --name e2e-test --env-file .env.testing \
-v `pwd`/e2e/reports:/opt/robotframework/reports:Z \
-v `pwd`/e2e:/opt/robotframework/tests:Z \
ppodgorsek/robot-framework:latest This whole M1 Arm mac unable to run webdriver/chromium issue is documented in the links below
This workflow is working for me. Would it be possible for users to choose to download selenium NOT using the official docker image but from the |
A few notes for those that run into this, and clarifications from what are above:
Hope this helps. |
After Selecting BROWSER=chrome getting error. Need help on it
Visit Google | FAIL |
WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/lib/chromium/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Thanks in advance..!!
The text was updated successfully, but these errors were encountered: