-1
  • tests are performed in ubuntu machine (cli)

<<< FAILURE!

org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Both google-chrome and chromedriver are installed under /usr/bin/

Code sample:

System.setProperty("webdriver.chrome.driver",
"/usr/bin/chromedriver");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.setBinary(System.getProperty("user.dir") + "/usr/bin/chromedriver");
chromeOptions.addArguments("--no-sandbox");
chromeOptions.addArguments("--disable-dev-shm-usage");
chromeOptions.addArguments("--headless");
WebDriver driver = new ChromeDriver();
driver.get("file:///" + destFilePath);
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Wasim
  • 11
  • 2

1 Answers1

0

I found a workaround by starting chrome at --no-sandbox mode (which is not the best practice). So it's a permission issue.

Vel Guru
  • 394
  • 1
  • 3
  • 16