ChromeDriver chrome failed to start [duplicate]

て烟熏妆下的殇ゞ 提交于 2019-12-12 02:53:47

问题


I am trying to use the ChromeDriver in Selenium, but Chrome "fails to start." Is there something that might I might be doing wrong? Thank you!
My code:

    public static void main(String[] args) {
         System.setProperty("webdriver.chrome.driver", "C:\\Users\\Bill\\Desktop\\StockBot Workspace\\Files\\chromedriver.exe");
         WebDriver driver = new ChromeDriver();
         driver.get("http://www.google.com");
     }

What is outputted in console:

Starting ChromeDriver 2.12.301325 (962dea43ddd90e7e4224a03fa3c36a421281abb7) on port 50099
Only local connections are allowed.
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: chrome failed to start
  (Driver info: chromedriver=2.12.301325 (962dea43ddd90e7e4224a03fa3c36a421281abb7),platform=Windows NT 10.0 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 707 milliseconds
Build info: version: '2.48.2', revision: '41bccdd', time: '2015-10-09 19:55:52'
System info: host: 'Zeus', ip: '192.168.7.103', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.chrome.ChromeDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:647)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:247)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:142)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:116)
    at Runner.main(Runner.java:7)

回答1:


  1. Uninstall chrome

  2. Remove the chrome folder from the directory C:\Users____\AppData\Local\Google\chrome

  3. Reinstall chrome

I had the same error and this worked for me.

answered Aug 29 '14 at 8:11 on stackoverflow by Paweł Adamski ChromeWebDriver - unknown error: Chrome failed to start: crashed




回答2:


Try uninstalling the chrome browser on your machine. Then delete the chrome user profile.

Re-install chrome and check if it works. Had this problem before, worked for me.



来源:https://stackoverflow.com/questions/36133894/chromedriver-chrome-failed-to-start

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!