python linux selenium: chrome not reachable

python linux selenium: chrome not reachable

Adding some chrome options helped!

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument(--no-sandbox)
chrome = webdriver.Chrome(/usr/local/bin/chromedriver, chrome_options=chrome_options)

If youre using docker and getting this error I have the solution!

The cause of the problem is chrome running out of memory as documented here.

You have to add the flag –shm-size=2g to the docker run command.

python linux selenium: chrome not reachable

It is not enough to install chrome. You should have chrome web driver installed.
You can refer this link for details on installation of chromedriver

How install chrome webdriver

Leave a Reply

Your email address will not be published. Required fields are marked *