title: Ubuntu, Selenium, WebDriverManager, Chrome flash open for a second and then it closes
body: <p>I am on Ubuntu. Chrome seems to open for a second and then crashes. So, I basically see a flash of chrome and then I get this message in the console:</p>
  <p>&quot;org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: crashed.
  (chrome not reachable)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
  Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'&quot;</p>
  <p>This is how I have it set up</p>
  <pre><code>WebDriverManager.chromedriver().setup();
  ChromeOptions options = new ChromeOptions();
  options.addArguments(&quot;--no-sandbox&quot;); 
  options.addArguments(&quot;--disable-dev-shm-usage&quot;); 
  driver = new ChromeDriver(options);
  </code></pre>
  <p>This is the class that I am running:</p>
  <pre><code>package com.noorteck.qa.api;
  
  import java.sql.Connection;
  import java.sql.DriverManager;
  import java.sql.SQLException;
  import java.sql.Statement;
  
  import com.noorteck.qa.pages.CommonElementPage;
  import com.noorteck.qa.pages.JobTitlesPage;
  import com.noorteck.qa.pages.LoginPage;
  import com.noorteck.qa.pages.NavigateToPage;
  import com.noorteck.qa.utils.CommonUI;
  import com.noorteck.qa.utils.ReadPropertyData;
  
  public class DBDemo extends CommonUI {
  
      public static void main(String[] args) throws SQLException, ClassNotFoundException {
  
          String url = &quot;jdbc:mysql://localhost:3306&quot;;
          String userName = &quot;root&quot;;
          String password = &quot;Negro434&quot;;
          String exStatus;
          String failedReason = &quot;NULL&quot;;
  
          Class.forName(&quot;com.mysql.cj.jdbc.Driver&quot;);
          Connection con = DriverManager.getConnection(url, userName, password);
  
          Statement stm = con.createStatement();
          prop = ReadPropertyData.getProperties(configFilePath);
  
          openBrowser(prop.getProperty(&quot;browser&quot;));
          navigate(prop.getProperty(&quot;url&quot;));
  
          loginObj = new LoginPage();
          jobTitlesObj = new JobTitlesPage();
          navToPageObj = new NavigateToPage();
          commonElObj = new CommonElementPage();
  
          loginObj.login();
          navToPageObj.navigateToJobTitles();
  
          jobTitlesObj.clickAddIcon();
          jobTitlesObj.enterJobTitleName(&quot;Dev 0&quot;);
          jobTitlesObj.enterJobDescription(&quot;SDETTTTTT&quot;);
          commonElObj.clickSaveButton();
  
          String actualSuccessMessage = commonElObj.getSuccessMessage();
          String expectedSuccessMessage = &quot;Successfully Saved&quot;;
  
          System.out.println(actualSuccessMessage);
  
          boolean outcome = actualSuccessMessage.equalsIgnoreCase(expectedSuccessMessage);
  
          if (outcome == true) {
              exStatus = &quot;PASSED&quot;;
          } else {
              exStatus = &quot;FAILED&quot;;
              failedReason = &quot;[EXP:&quot; + expectedSuccessMessage + &quot;] -- [ACT: &quot; + actualSuccessMessage + &quot;]&quot;;
          }
  
          String query = &quot;INSERT INTO walmart.testresults (project_name, sprint_number, us_number, region, status, failure_reason, date)&quot;
                  + &quot;VALUES ('ntk', 404, 'ntk-404', 'scrum', '&quot; + exStatus + &quot;', '&quot; + failedReason + &quot;', '2021-04-11');&quot;;
  
          stm.executeUpdate(query);
  
          System.out.println(exStatus);
          System.out.println(query);
          apiSoftAssert.assertTrue(outcome);
  
      }
  
  }
  </code></pre>
  <p>I have also played with different combinations of the options. Also  installed chromium and it does the same thing, opens for a fraction of a second and closes.</p>
  <pre><code>options.addArguments(&quot;--no-sandbox&quot;); 
  //options.setBinary(&quot;/snap/bin/chromium&quot;);
  //options.addArguments(&quot;--disable-dev-shm-usage&quot;); 
  //options.addArguments(&quot;--headless&quot;); 
  </code></pre>
  <p>I run ./google-chrome from terminal and opens fine. Any ideas.
  Thank you</p>