I've been stuck for days because of this issue and can't seem to find a solution. I can't get the chromedriver to work on my machine, no matter what I do. I've tried pretty much every setup I could possibly imagine. To list a few:
- Chrome 64 bits, Python 64 bits
- Chrome 32 bits, Python 32 bits
- Chrome 64 bits, Python 32 bits
- Chrome 32 bits, Python 64 bits
I've also tried different versions of Chrome with their corresponding chromedriver versions. I've tried different prior versions of selenium, and that is, on every previously mentioned setups.
For an actual context, here's my current setup:
- Windows 10 Professional x64
- Python 3.6.3 64 bits
- Selenium 3.7.0
- Google Chrome 62.0.3202.75 64 bits
- Chromedriver 2.33
I will not post my code as no matter which code I use, it fails. Even the simplest most basic code that launches a chromedriver will not work. Also, it works on my colleague's machine. So to give some context, here's a code snippet I've tried that doesn't work:
from selenium import webdriver
webdriver.Chrome(executable_path="bin/chromedriver.exe")
I've also tried to add the chromedriver to my PATH
and launching the chromedriver with no arguments but this doesn't work either.
The error I'm getting is this one:
selenium.common.exceptions.WebDriverException: Message: unknown error: chrome failed to start
(Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 10.0.15063 x86_64)
And here's the log that gets generated if I launch the driver with the verbose/logging parameters:
[1.979][INFO]: COMMAND InitSession {
"capabilities": {
"alwaysMatch": {
"browserName": "chrome",
"goog:chromeOptions": {
"args": [ ],
"extensions": [ ]
},
"platformName": "any"
},
"firstMatch": [ {
} ]
},
"desiredCapabilities": {
"browserName": "chrome",
"goog:chromeOptions": {
"args": [ ],
"extensions": [ ]
},
"platform": "ANY",
"version": ""
}
}
[1.985][INFO]: Populating Preferences file: {
"alternate_error_pages": {
"enabled": false
},
"autofill": {
"enabled": false
},
"browser": {
"check_default_browser": false
},
"distribution": {
"import_bookmarks": false,
"import_history": false,
"import_search_engine": false,
"make_chrome_default_for_user": false,
"show_welcome_page": false,
"skip_first_run_ui": true
},
"dns_prefetching": {
"enabled": false
},
"profile": {
"content_settings": {
"pattern_pairs": {
"https://*,*": {
"media-stream": {
"audio": "Default",
"video": "Default"
}
}
}
},
"default_content_setting_values": {
"geolocation": 1
},
"default_content_settings": {
"geolocation": 1,
"mouselock": 1,
"notifications": 1,
"popups": 1,
"ppapi-broker": 1
},
"password_manager_enabled": false
},
"safebrowsing": {
"enabled": false
},
"search": {
"suggest_enabled": false
},
"translate": {
"enabled": false
}
}
[1.989][INFO]: Populating Local State file: {
"background_mode": {
"enabled": false
},
"ssl": {
"rev_checking": {
"enabled": false
}
}
}
[2.004][INFO]: Cannot switch to US keyboard layout - some keys may be interpreted incorrectly
[2.004][INFO]: Launching chrome: "C:Program Files (x86)GoogleChromeApplicationchrome.exe" --disable-background-networking --disable-browser-side-navigation --disable-client-side-phishing-detection --disable-default-apps --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension="C:UsersOLIVIE~1.VERAppDataLocalTempscoped_dir9668_31484internal" --log-level=0 --metrics-recording-only --no-first-run --password-store=basic --remote-debugging-port=12606 --safebrowsing-disable-auto-update --test-type=webdriver --use-mock-keychain --user-data-dir="C:UsersOLIVIE~1.VERAppDataLocalTempscoped_dir9668_609" data:,
[2.035][INFO]: RESPONSE InitSession unknown error: chrome failed to start
[2.035][DEBUG]: Log type 'driver' lost 0 entries on destruction
[2.035][DEBUG]: Log type 'browser' lost 0 entries on destruction
I've had a look at pretty much every similar questions I could find, like this one, and this one for example, and none of the solutions I've came across helped, it's always the same error I get. I've been having the same error with the dozen of different setups I've tried.
A few months ago I remember I successfully ran the chromedriver for another project on the same machine.
I think I've provided all the necessary information, but don't hesitate to ask me in comments if I forgot something.
Thanks
See Question&Answers more detail:
os