Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebDriverException: unknown error: Chrome failed to start: exited abnormally #4961

Closed
PascalGit1 opened this issue Oct 26, 2017 · 11 comments
Closed

Comments

@PascalGit1
Copy link

OS:
Linux
Selenium Version: 3.5.3
Browser: Chrome driver V2.33 , chrome version 62.03

I'm running Selenium tests from jenkins on a linux machine. For this i'm using the latest chromedriver, when I run my tests about 90% will succeed but maybe 1 in 10 of the tests it will randomly fail with the following error:

Error:

Starting ChromeDriver 2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4) on port 24178
Only local connections are allowed.
Failure in before hook:EsizeCucumberTest.setupTest()
Message: org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
  (Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 3.10.0-693.2.2.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.05 seconds
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
System info: host: 'ehgd-bld-l04.esizedc.com', ip: '10.3.162.21', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-693.2.2.el7.x86_64', java.version: '1.8.0_144'
Driver info: driver.version: ChromeDriver
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
	at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
	at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
	at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$24(ProtocolHandshake.java:359)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:362)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:136)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:255)
	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:237)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:138)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:178)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:167)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:124)
	at nl.esize.cucumber.helper.LinuxDriverHelper.getDriver(LinuxDriverHelper.java:39)
	at nl.esize.cucumber.helper.DriverHelper.setUp(DriverHelper.java:29)
	at nl.esize.cucumber.EsizeCucumberTest.setupTest(EsizeCucumberTest.java:36)
	at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at cucumber.runtime.Utils$1.call(Utils.java:40)
	at cucumber.runtime.Timeout.timeout(Timeout.java:16)
	at cucumber.runtime.Utils.invoke(Utils.java:34)
	at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
	at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:224)
	at cucumber.runtime.Runtime.runHooks(Runtime.java:212)
	at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:202)
	at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:40)
	at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102)
	at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
	at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
	at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95)
	at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at cucumber.api.junit.Cucumber.run(Cucumber.java:100)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)

      org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
        (Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 3.10.0-693.2.2.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
      Command duration or timeout: 60.05 seconds
      Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
      System info: host: 'ehgd-bld-l04.esizedc.com', ip: '10.3.162.21', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-693.2.2.el7.x86_64', java.version: '1.8.0_144'
      Driver info: driver.version: ChromeDriver
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
      	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
      	at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
      	at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
      	at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$24(ProtocolHandshake.java:359)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
      	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
      	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      	at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
      	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:362)
      	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:136)
      	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
      	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
      	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
      	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:255)
      	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:237)
      	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:138)
      	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:178)
      	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:167)
      	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:124)
      	at nl.esize.cucumber.helper.LinuxDriverHelper.getDriver(LinuxDriverHelper.java:39)
      	at nl.esize.cucumber.helper.DriverHelper.setUp(DriverHelper.java:29)
      	at nl.esize.cucumber.EsizeCucumberTest.setupTest(EsizeCucumberTest.java:36)
      	at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at cucumber.runtime.Utils$1.call(Utils.java:40)
      	at cucumber.runtime.Timeout.timeout(Timeout.java:16)
      	at cucumber.runtime.Utils.invoke(Utils.java:34)
      	at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
      	at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:224)
      	at cucumber.runtime.Runtime.runHooks(Runtime.java:212)
      	at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:202)
      	at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:40)
      	at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102)
      	at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
      	at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
      	at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95)
      	at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at cucumber.api.junit.Cucumber.run(Cucumber.java:100)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)

When rerunning the same test it will usually succeed the 2nd try so im not sure how i can reproduce this consitantly. I have a maven project and it is setup like the follow:

Driver class:

	public static WebDriver getDriver(BrowserType browser) {
		WebDriver driver = null;
		switch (browser) {
		case CHROME:
			System.setProperty(PROPERTY_DRIVER_CHROME, PATH_DRIVER_CHROME);
			System.setProperty("webdriver.chrome.logfile", "C:/Programs/eclipse Neon/workspace/cucumber/logs/chromedriver.log");
			System.setProperty("webdriver.chrome.verboseLogging", "true");
			driver = new ChromeDriver();
			break;
		case FF:
		default:
			FirefoxOptions options = new FirefoxOptions();
			options.setLogLevel(Level.WARNING);


			System.setProperty(PROPERTY_DRIVER_FIREFOX, PATH_DRIVER_FIREFOX);
			driver = new FirefoxDriver(options);
			break;
		}
		return driver;
	}

Pom.xml dependencies:

	<dependencies>
		<!-- https://mvnrepository.com/artifact/javax.mail/mail -->
		<dependency>
			<groupId>javax.mail</groupId>
			<artifactId>mail</artifactId>
			<version>1.5.0-b01</version>
		</dependency>


		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-htmlunit-driver</artifactId>
			<version>2.52.0</version>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
		</dependency>

		<dependency>
			<groupId>info.cukes</groupId>
			<artifactId>cucumber-java</artifactId>
			<version>1.2.5</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>info.cukes</groupId>
			<artifactId>cucumber-picocontainer</artifactId>
			<version>1.2.5</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>info.cukes</groupId>
			<artifactId>cucumber-junit</artifactId>
			<version>1.2.5</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-java</artifactId>
			<version>3.5.3</version>
		</dependency>

		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-firefox-driver</artifactId>
			<version>3.5.3</version>
		</dependency>

		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-chrome-driver</artifactId>
			<version>3.5.3</version>
		</dependency>

		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-ie-driver</artifactId>
			<version>3.5.3</version>
		</dependency>

		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-edge-driver</artifactId>
			<version>3.5.3</version>
		</dependency>

		<dependency>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-resources-plugin</artifactId>
			<version>3.0.2</version>
		</dependency>

		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-support</artifactId>
			<version>3.5.3</version>
		</dependency>
	</dependencies>

Hopefully you can help me, if you need some chrome logs i will add these aswell but they are a bit long so I didnt add them yet.

@barancev
Copy link
Member

Report this issue to chromedriver project: https://sites.google.com/a/chromium.org/chromedriver/help

@bondib
Copy link

bondib commented Nov 20, 2017

Exp. the same issue. @PascalGit1 were you able to resolve his?

@PascalGit1
Copy link
Author

@bondib sadly not i made a post on the chromedriver usergroup located here:
https://groups.google.com/forum/#!topic/chromedriver-users/8yZDv_h8feg
but nobody has replied yet so im not sure if they are even looking at it

@wilsonpenha
Copy link

Hello guys,

I've been fighting with this issue for a long time, and just y'day I figure out how to make it gone and today I can run a 50 threads process calling selenium without seen this issue anymore and also stop crashing my machine with outofmemory issue with too many open chromedriver process.

  1. I am using selenium 3.7.1, chromedrive 2.33, java.version: '1.8.0', redhat ver '3.10.0-693.5.2.el7.x86_64', chrome browser version: 60.0.3112.90;
  2. running an open session with screen, to sure my session never dies,
  3. running Xvfb : nohup Xvfb -ac :15 -screen 0 1280x1024x16 &
  4. export DISPLAY:15 from .bashsh/.profile

this 4 items are the basic setting everyone would already knows, now comes the code, where all made a lot of difference to achieve the success:

public class HttpWebClient {
public static ChromeDriverService service;

public ThreadLocal<WebDriver> threadWebDriver = new ThreadLocal<WebDriver>() {

	@Override
	protected WebDriver initialValue() {
		FirefoxProfile profile = new FirefoxProfile();
		profile.setPreference("permissions.default.stylesheet", 2);
		profile.setPreference("permissions.default.image", 2);
		profile.setPreference("dom.ipc.plugins.enabled.libflashplayer.so", "false");
		profile.setPreference(FirefoxProfile.ALLOWED_HOSTS_PREFERENCE, "localhost");
		WebDriver driver = new FirefoxDriver(profile);
		return driver;
	};
};

public HttpWebClient(){
	// fix for headless systems:
	// start service first, this will create an instance at system and every time you call the 
           // browser will be used
           // be sure you start the service only if there are no alive instances, that will prevent you to have 
           // multiples chromedrive instances causing it to crash
	try{
		if (service==null){
			service = new ChromeDriverService.Builder()
			.usingDriverExecutable(new File(conf.get("webdriver.chrome.driver")))
			.usingAnyFreePort()
			.withEnvironment(ImmutableMap.of("DISPLAY", ":15"))
			.withSilent(true)
			.build();
			service.start();
 		}
	} catch (IOException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}

public WebDriver getDriverForPage(String url, Configuration conf) {
	WebDriver driver = null;
	DesiredCapabilities capabilities = null;
	long pageLoadWait = conf.getLong("page.load.delay", 60);

	try {
    		System.setProperty("webdriver.chrome.driver", conf.get("webdriver.chrome.driver"));
        	String driverType = conf.get("selenium.driver", "chrome");

		capabilities = DesiredCapabilities.chrome();
		String[] options = new String[] { "--start-maximized", "--headless" };
		capabilities.setCapability("chrome.switches", options);

                    // here is where your chromedriver will call the browser
                    // I used to call the class ChromeDriver directly, which was causing too much problems 
                    // when you have multiple calls
		driver = new RemoteWebDriver(service.getUrl(), capabilities);

		driver.manage().timeouts().pageLoadTimeout(pageLoadWait, TimeUnit.SECONDS);
		driver.get(url);

                    // never look back

	} catch (Exception e) {
		if (e instanceof TimeoutException) {
			LOG.debug("Crawling URL : "+url);
			LOG.debug("Selenium WebDriver: Timeout Exception: Capturing whatever loaded so far...");
			return driver;
		}
		cleanUpDriver(driver);
		throw new RuntimeException(e);
	}
	return driver;
}

public void cleanUpDriver(WebDriver driver) {
	if (driver != null) {
		try {
                            // be sure to close every driver you opened
			driver.close();
			driver.quit();
			//service.stop(); do not stop the service, bcz it is needed
			TemporaryFilesystem.getDefaultTmpFS().deleteTemporaryFiles();
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
}

@bondib
Copy link

bondib commented Nov 24, 2017 via email

vlukashov pushed a commit to vaadin/bakery-app-starter-flow-spring that referenced this issue Nov 30, 2017
…rt: crashed"

add the '--no-sandbox' option to Chrome based on the discussion in SeleniumHQ/selenium#4961 to avoid consistent test failures appeared lately
@dankonino
Copy link

this is weird though. In one repo I use totally the same code with shippable for chromedriver and chrome itself as in another repo, and it's working fine without --no-sandbox and in another one it needs sandbox .. but thanks for this :)

OndraM added a commit to OndraM/steward-example that referenced this issue Jan 9, 2018

Verified

This commit was signed with the committer’s verified signature.
OndraM Ondřej Machulda
OndraM added a commit to OndraM/steward-example that referenced this issue Jan 13, 2018

Verified

This commit was signed with the committer’s verified signature.
OndraM Ondřej Machulda
OndraM added a commit to OndraM/php-webdriver that referenced this issue Jan 13, 2018

Verified

This commit was signed with the committer’s verified signature.
OndraM Ondřej Machulda
OndraM added a commit to OndraM/php-webdriver that referenced this issue Jan 14, 2018

Verified

This commit was signed with the committer’s verified signature.
OndraM Ondřej Machulda
@haapaan
Copy link

haapaan commented Feb 5, 2018

I had the same problem: roughly 1% of selenium tests failed with:
org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 3.10.0-693.11.6.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.02 seconds

This happened only when running multiple tests in parallel on the same server.

The --no-sandbox option did not help me.

However, for some reason option --single-process helped and the problem went away.

I used this combination:
Chromedriver 2.29.461571 + Chrome 56.0.2924.87

But the problem occurred also with:
ChromeDriver 2.35.528139 / Google Chrome 63.0.3239.132
(but I did not test if the single-process flag helped with these versions)

@nurbeknurjanov
Copy link

Man, I noticed if I run selenium as super admin, then it doesn't work as the error message above.

But if I run selenium without sudo, then it works. Maybe it will help you. God bless you :)

@PascalGit1
Copy link
Author

People still having this issue and are desperate the only thing that seems to work is update to V2.35
Then add the following chromeoptions:
ChromeOptions ChromeOptions = new ChromeOptions();
ChromeOptions.addArguments("--headless", "window-size=1024,768", "--no-sandbox");
driver = new ChromeDriver(ChromeOptions);

It's not a great fix but it seems like it was the only thing that works for me.

@jaswennyhuangg
Copy link

in which file do we need to put --no-sandbox? can someone here give me the example?

@dankonino
Copy link

@jaswennyhuangg in wdio.conf.js at least that’s where I use it with web driver.io . 🍺

brendeschuijmert pushed a commit to brendeschuijmert/php-webdriver that referenced this issue Jul 26, 2019
@lock lock bot locked and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants