Docker-selenium: Firefox crashes started with the Webdriver

Created on 26 May 2017  路  12Comments  路  Source: SeleniumHQ/docker-selenium

Meta -

Image(s):

hub
Docker-Selenium Image Version(s):

3.4.0, revision: unknown

OS:

Ubuntu 16.04.2 LTS
Browser: Mozilla Firefox 53.0

Expected Behavior -

Browser should be started, test executed and browser should be closed.

Actual Behavior -

  1. Browser starts
  2. Login through login page
  3. Browser crashes on SIGSEGV sygnal and error:

May 25 09:05:56 aws-dev-az1-inf-seleniumgrid-1 kernel: Chrome_ChildThr[5296]: segfault at 0 ip 00007f1559d8ec09 sp 00007f15582fcbc0 error 6 in libxul.so[7f1559b17000+3bed000]

  1. Test fails with Stacktrace:

org.openqa.selenium.WebDriverException: Tried to run command without establishing a connection

All 12 comments

Hi @pmryhlotskyi,

Can you provide more information please?

  • Exact image version you are using.
  • Commands used to start the docker images
  • A piece of code to help us reproduce the issue

And is also strange that the logs says Chrome crashed but this is reported as a Firefox issue.

@diemol

I'm working with @pmryhlotskyi on this. Answers below ...

  • According to docker images I see this - 25dec9f86c68. Is this what you're looking for?
  • I'm using docker-compose to run. Not sure how to get the exact run command.
  • I'll have to revert to @pmryhlotskyi for this.

@elgalu That was my thought as well when I saw the log. Not sure what's up with that.

Code which calls webdriver (Scala)

object FirefoxBrowserDriver extends BrowserDriver {
  var profile: FirefoxProfile = new FirefoxProfile()
  profile.setAssumeUntrustedCertificateIssuer(false)
  profile.setPreference("browser.cache.disk.enable", false)
  profile.setPreference("browser.cache.memory.enable", false)
  profile.setPreference("browser.cache.offline.enable", false)
  profile.setPreference("network.http.use-cache", false)
  profile.setPreference("toolkit.startup.max_resumed_crashes", "-1")
  lazy val capabilities: DesiredCapabilities = DesiredCapabilities.firefox()
  capabilities.setCapability(FirefoxDriver.PROFILE, profile)
  capabilities.setCapability("gecko", true)
  def getWebDriver(remote_driver: String): WebDriver = {
    new RemoteWebDriver(new URL(remote_driver), capabilities)
  }

trait BrowserSetupTeardown extends BeforeAndAfterEach with WebBrowser with BrowserSessionInit with LazyLogging { this: Suite  =>
  implicit var webDriver: WebDriver = _
  var reporter: AllureReporter = _
  var config: IntegriCheckConfig = _

  override def beforeEach()
  {
    setUp()
    super.beforeEach()
  }

  override def afterEach()
  {
    tearDown()
  }

  def setUp(): Unit = {
    ...
    webDriver = getBrowser
    implicitlyWait(Span(120, Seconds))
    webDriver.manage().window().maximize()
    config = DataLoader.loadIntegriCheckConfig.right.get
  }

def tearDown(): Unit = {
    close()
    quit()
  }
}

@elgalu. This SIGSEGV error is related to the Firefox (plugin container). See here

Any updates, guys?

Hi @pmryhlotskyi,

Sorry for the late reply.

Thanks for providing the link to the bug description, I read the whole thread, and if I understood correctly, this happens when some pages use flash and then Firefox crashes.

At the end, what I got from that bug report is that this is related entirely to Firefox, right? I don't know what should be done in docker-selenium to fix the situation, other than wait until the Firefox guys hopefully fix it.

What do you think @pmryhlotskyi?

I checked the thread again, and it seems that it should be solved.

I'll close this issue since it is related to Firefox and not docker-selenium.

Please feel free to reopen in case you have new findings.

Hi
I am getting below webdriver exception on firefox browser
org.openqa.selenium.WebDriverException: Tried to run command without establishing a connection
Build info: version: 'unknown', revision: '1969d75', time: '2016-10-18 09:43:45 -0700'
System info: host: 'egain1210', ip: '10.10.54.104', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_151'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, marionette=true, firefoxOptions={args=[], prefs={}}, appBuildId=20160623154057, version=, platform=XP, proxy={}, command_id=1, specificationLevel=0, acceptSslCerts=false, browserVersion=47.0.1, platformVersion=10.0, XULappId={ec8030f7-c20a-464f-9b0e-13a3a9e97384}, browserName=Firefox, takesScreenshot=true, takesElementScreenshot=true, platformName=Windows_NT, device=desktop}]
Session ID: e89fddda-010f-4f5b-a1f7-ecbbae9f5c22
* Element info: {Using=xpath, value=//span[text()='print']}
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.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:127)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:93)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:42)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:368)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:473)
at org.openqa.selenium.By$ByXPath.findElement(By.java:361)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:360)
at org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:69)
at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:38)
at com.sun.proxy.$Proxy12.toString(Unknown Source)
at com.egain.framework.BasePageObjects.click(BasePageObjects.java:469)
at com.egain.pageobjects.base.ee.AlbertArticlePage.performArticlePrintOperation(AlbertArticlePage.java:39)
at com.egain.tests.ee.temp.testEE08_ArticleHeaderToolOperations(temp.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
at org.testng.TestRunner.privateRun(TestRunner.java:756)
at org.testng.TestRunner.run(TestRunner.java:610)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:387)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:382)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1293)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1289)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1218)
at org.testng.TestNG.runSuites(TestNG.java:1133)
at org.testng.TestNG.run(TestNG.java:1104)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)

Please help me to resolve this

I have also the same problem,
lastest version of Firefox, Selenium, geckodriver, java and cucumber and after the first test,
doing findElement or isDisplayed functions then Firefox crash, simply dies. and get that WebDriverException establish connection.

I had this problem and solved it by allocating more RAM to the container running the geckodriver.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NeilJ247 picture NeilJ247  路  6Comments

matthewsamari picture matthewsamari  路  4Comments

pfluegs picture pfluegs  路  4Comments

lluisteamcmp picture lluisteamcmp  路  6Comments

rosskevin picture rosskevin  路  5Comments