0

Update: This is not a duplicate qns as none of the solutions at Selenium: WebDriverException:Chrome failed to start: crashed as google-chrome is no longer running so ChromeDriver is assuming that Chrome has crashed worked for me

I had my Java application packaged as a runnable JAR for running Selenium tests.

Previously, I had an error when starting the application, "Failed to create a Chrome process", however I had it "resolved" (or so I believe...) after following the solution in this thread

However, I am facing another error now,

Chrome failed to start: Crashed 
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location ..... is no longer running, so ChromeDriver is assuming that Chrome has crashed)

Here's a snippet of my code and options used.

System.setProperty("webdriver.chrome.driver", "C:\\.......\\chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("useAutomationExtension", false);
options.setBinary("C:\\.......\\chrome.exe");
options.addArguments("--disable-dev-shm-usage"); 
options.addArguments("start-maximized"); 
options.addArguments("disable-infobars"); 
options.addArguments("--disable-extensions"); 
options.addArguments("--disable-gpu"); 
options.addArguments("--no-sandbox"); 
browser = new ChromeDriver(options);

What else could I be missing?

More details

- Using combination of chromedriver.exe (76.0.3809.126) and chrome.exe (76.0.3809.132) 
- Selenium 3.141.59
Works when running from eclipse on development pc

Hope to hear from you guys soon. thanks!

Ronaldo
  • 263
  • 5
  • 18
  • This looks like version incompatibility of chrome driver and chrome browser.Please check that link and use latest version. https://chromedriver.chromium.org/downloads – KunduK Oct 02 '19 at 06:27
  • @KunduK , I used the same combination of chromedriver.exe (76.0.3809.126) and chrome.exe (76.0.3809.132) when running from eclipse on another pc and it works though... – Ronaldo Oct 02 '19 at 06:31
  • What selenium versions are you using? – KunduK Oct 02 '19 at 06:32
  • @KunduK , I'm using selenium 3.141.59 – Ronaldo Oct 02 '19 at 06:33
  • @DebanjanB none of the solutions at https://stackoverflow.com/questions/53073411/selenium-webdriverexceptionchrome-failed-to-start-crashed-as-google-chrome-is worked for me – Ronaldo Oct 02 '19 at 07:19
  • I would update to the latest chromedriver and chrome versions. If it still crashes, try without setting any of the ChromeOptions. You've got some odd ones there... why no sandbox? Why disable gpu? (usually that would be for headless...) Disable-infobars is also unnecessary and I think no longer supported. I've noticed some options can cause crashes since they switched over to W3C conformance... though I don't see those anymore with v77 driver. – pcalkins Oct 02 '19 at 20:10

0 Answers0