Before I begin: I know there are a billion posts about Selenium not working, and various solutions to try. I believe I've tried everything, but forgive me if I am missing something. I'm hitting my head against a wall and would appreciate help.
Here are some steps I have taken:
I downloaded the chromedriver for selenium (Ubuntu, Python) and used chmod 755
and also chmod 777
to make the driver executable. Afterwords, I started the chromedriver with ./chromedriver
.
I've tried various options for Selenium, including manually adding the port that the chromedriver is running on
from selenium import webdriver
options = webdriver.ChromeOptions()
options.binary_location = "/home/myname/projects/myproject/chromedriver"
options.add_argument("--remote-debugging-port=9515")
chrome_driver_binary = '/home/myname/projects/myproject/chromedriver'
driver = webdriver.Chrome(chrome_driver_binary, options = options)
driver.get('http://www.ubuntu.com/')
I've tried options suggested in other posts, like these:
options.add_argument('--no-sandbox')
options.add_argument('--headless')
options.add_argument('--disable-dev-shm-usage')
options.add_argument("--disable-setuid-sandbox")
I've made sure that I am using a chromedriver that is compatable with my version of Chrome.
Nothing has seemed to work. I keep getting this error:
WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
(chrome not reachable)
(The process started from chrome location /home/myname/projects/myproject/chromedriver is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
I'd sincerely appreciate someone else's interpretation of this problem.