Skip to content
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

selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally #12

Closed
shapetheLOLa opened this issue Jul 3, 2017 · 20 comments

Comments

@shapetheLOLa
Copy link

instapy is running perfectly, however I'm having trouble starting profilecrawl. Heres the output after trying to start it :

Traceback (most recent call last): File "crawl_profile.py", line 18, in <module> browser = webdriver.Chrome('./assets/chromedriver', chrome_options=chrome_options) File "/home/jwkoch/.local/lib/python2.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__ desired_capabilities=desired_capabilities) File "/home/jwkoch/.local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 98, in __init__ self.start_session(desired_capabilities, browser_profile) File "/home/jwkoch/.local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 188, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/home/jwkoch/.local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 256, in execute self.error_handler.check_response(response) File "/home/jwkoch/.local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 4.4.0-83-generic x86_64)

You got any hints/ideas?

@timgrossmann
Copy link
Collaborator

@shapetheLOLa Hmm... this is really weird. Sounds like it's either the wrong chrome driver for your system or your droplet hasn't got enough power (RAM)

@shapetheLOLa
Copy link
Author

shapetheLOLa commented Jul 3, 2017

Im using the same chromedriver as in instapy, I've just copied it to the other location.

Not sure what you mean by droplet and enough RAM tho. The Linux server has plenty

@tcvieira
Copy link
Contributor

tcvieira commented Jul 3, 2017

@shapetheLOLa
On the log looks like it´s using selenium webdriver from python2.7
"/home/jwkoch/.local/lib/python2.7/site-packages/selenium/webdriver/chrome/webdriver.py"
Try install selenium for python3
pip3 install selenium
and run with python3

@shapetheLOLa
Copy link
Author

Oh sorry, yea but same error there. I've just tried it with python 2.7 after 3 didnt work.
I've also tried using a later chromedriver version.

Here is the output
⇒ python3.5 crawl_profile.py Traceback (most recent call last): File "crawl_profile.py", line 18, in <module> browser = webdriver.Chrome('./assets/chromedriver', chrome_options=chrome_options) File "/home/jwkoch/.local/lib/python3.5/site-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__ desired_capabilities=desired_capabilities) File "/home/jwkoch/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 98, in __init__ self.start_session(desired_capabilities, browser_profile) File "/home/jwkoch/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 188, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/home/jwkoch/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 256, in execute self.error_handler.check_response(response) File "/home/jwkoch/.local/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.30.477691 (6ee44a7247c639c0703f291d320bdf05c1531b57),platform=Linux 4.4.0-83-generic x86_64)

@tcvieira
Copy link
Contributor

tcvieira commented Jul 5, 2017

@shapetheLOLa
Have you tried this stackoverflow question ?
Are you running as root?

@shapetheLOLa
Copy link
Author

This won't help, will it? the chromedriver is in the assets folder, not /opt/google or /opt/.

I've tried putting it there and put a link to the assets folder, still no luck

@Jayphen
Copy link
Contributor

Jayphen commented Aug 23, 2017

I had this problem. You need to make sure it's running as headless.

In crawl_profile.py, add
chrome_options.add_argument('--headless')

below the other similar add_argument lines

@0xc0392b
Copy link

0xc0392b commented Dec 27, 2017

I also had this problem, even though I was starting chrome in headless mode. For those who come across this in the future, I found adding "--no-sandbox" to the chrome startup arguments solved the problem.
E.g. chrome_options.add_argument('--no-sandbox')

@k1ltr0
Copy link

k1ltr0 commented Feb 10, 2018

for some reason, wasnt working with chromedriver 2.29, had to update to 2.35 and worked

@djlowes
Copy link

djlowes commented Mar 7, 2018

Following on from @k1ltr0 - I have just had to update to v2.36 from 2.33 after receiving this error message. It's working fine now.

@r8w9a5k
Copy link

r8w9a5k commented Apr 16, 2018

Hello,
I got 2 identical Dell computers with both win10.
First one can run selenium via simple python code

from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://www.google.cz')

Second pc cannot run it. I tried to do everything I read on the internet but still getting error:

selenium.common.exceptions.WebDriverException: Message: unknown error: chrome failed to start
(Driver info: chromedriver=2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7),platform=Windows NT 10.0.16299 x86_64)

I tried to add chrome_options.add_argument('--headless') and chrome_options.add_argument('--no-sandbox') + I set Path variable and still getting this error.

Do you know how to solve it?

@happyhq
Copy link

happyhq commented Apr 16, 2018

@r8w9a5k which your version of python?

@happyhq
Copy link

happyhq commented Apr 16, 2018

@r8w9a5k
I meet the same problem。before,I think it‘s the version of python。But NOT。
it ’s the veriosn of chrome。
Please choice the right version of chrome and chromedriver。
You can see from https://sites.google.com/a/chromium.org/chromedriver/。

@r8w9a5k
Copy link

r8w9a5k commented Apr 16, 2018

@happyhq I am using python 3.6.1 and latest chromedriver 2.3.7

@r8w9a5k
Copy link

r8w9a5k commented Apr 17, 2018

@happyhq Today I tried to run that on python 3.6.5 and chromedriver 2.3.7 with both 32bit or 64 bit and it still doesn't work. I am really angry why two indetical Dell computers differs.

@happyhq
Copy link

happyhq commented Apr 17, 2018

@r8w9a5k

Please choice the right version of chrome and chromedriver。
You can see from https://sites.google.com/a/chromium.org/chromedriver/。

@happyhq
Copy link

happyhq commented Apr 17, 2018

@r8w9a5k Maybe the version of chrome is too old.

@r8w9a5k
Copy link

r8w9a5k commented Apr 17, 2018

@happyhq Version of Chrome browser is the latest. Chromedriver is also up to date. I tried lower versions but error is still same.

@r8w9a5k
Copy link

r8w9a5k commented Apr 18, 2018

@happyhq I solved my problem. I used procmon to trace what's going on with chromedriver.exe and I found out that the problem was in admin rights. I simply checked to run my IDLE and chromedriver as administrator and now it works just fine.

@timmoh
Copy link
Collaborator

timmoh commented Jun 21, 2018

@timgrossmann can be closed
@shapetheLOLa please close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants