mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.04k stars 1.52k forks source link

Aborting on channel error.: MessageChannel.cpp, line 2143 (Too low shared memory in docker image, use "--shm-size 2g") #285

Open AlexanderArendar opened 7 years ago

AlexanderArendar commented 7 years ago

My OS properties:

Operating System: Linux Mint 18 Cinnamon 64-bit
Cinnamon Version: 3.0.7
Linux Kernel: 4.4.0-43-generic

In 'About Mozilla Firefox' info I can see this:

49.0
Mozilla Firefox for Linux Mint - 1.0

I have Selenium WebDriver java 3.0.0. Gecko driver version is geckodriver-v0.11.1-linux64.tar.gz

When I run a simple ScalaTest test suite with 1 test which calls the driver.close in the end there's nothing happening, the test reports as passed but the Firefox window is not closed. Here is a full output from the console:

/usr/lib/jvm/java-8-oracle/bin/java -Didea.launcher.port=7532 -Didea.launcher.bin.path=/ssd2/idea-IU-143.2370.31/bin -Dfile.encoding=UTF-8 -classpath /home/alex/.IntelliJIdea15/config/plugins/Scala/lib/scala-plugin-runners.jar:/usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/deploy.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jfxrt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-oracle/jre/lib/javaws.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfxswt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar:/usr/lib/jvm/java-8-oracle/jre/lib/plugin.jar:/usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/ssd2/projects/ADMP/target/scala-2.11/test-classes:/home/alex/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.8.jar:/home/alex/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.11.8.jar:/home/alex/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.4.jar:/home/alex/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.5.jar:/home/alex/.ivy2/cache/org.scalactic/scalactic_2.11/bundles/scalactic_2.11-3.0.0.jar:/home/alex/.ivy2/cache/org.scalatest/scalatest_2.11/bundles/scalatest_2.11-3.0.0.jar:/home/alex/.ivy2/cache/com.google.code.gson/gson/jars/gson-2.3.1.jar:/home/alex/.ivy2/cache/com.google.guava/guava/jars/guava-19.0.jar:/home/alex/.ivy2/cache/commons-logging/commons-logging/jars/commons-logging-1.2.jar:/home/alex/.ivy2/cache/net.java.dev.jna/jna/jars/jna-4.1.0.jar:/home/alex/.ivy2/cache/net.java.dev.jna/jna-platform/jars/jna-platform-4.1.0.jar:/home/alex/.ivy2/cache/org.apache.commons/commons-exec/jars/commons-exec-1.3.jar:/home/alex/.ivy2/cache/io.netty/netty/jars/netty-3.5.7.Final.jar:/home/alex/.ivy2/cache/cglib/cglib-nodep/jars/cglib-nodep-3.2.4.jar:/home/alex/.ivy2/cache/com.codeborne/phantomjsdriver/jars/phantomjsdriver-1.3.0.jar:/home/alex/.ivy2/cache/commons-codec/commons-codec/jars/commons-codec-1.9.jar:/home/alex/.ivy2/cache/junit/junit/jars/junit-4.12.jar:/home/alex/.ivy2/cache/org.apache.httpcomponents/httpclient/jars/httpclient-4.5.2.jar:/home/alex/.ivy2/cache/org.apache.httpcomponents/httpcore/jars/httpcore-4.4.4.jar:/home/alex/.ivy2/cache/org.apache.httpcomponents/httpmime/jars/httpmime-4.5.2.jar:/home/alex/.ivy2/cache/org.hamcrest/hamcrest-core/jars/hamcrest-core-1.3.jar:/home/alex/.ivy2/cache/org.seleniumhq.selenium/selenium-api/jars/selenium-api-3.0.0.jar:/home/alex/.ivy2/cache/org.seleniumhq.selenium/selenium-chrome-driver/jars/selenium-chrome-driver-3.0.0.jar:/home/alex/.ivy2/cache/org.seleniumhq.selenium/selenium-edge-driver/jars/selenium-edge-driver-3.0.0.jar:/home/alex/.ivy2/cache/org.seleniumhq.selenium/selenium-firefox-driver/jars/selenium-firefox-driver-3.0.0.jar:/home/alex/.ivy2/cache/org.seleniumhq.selenium/selenium-ie-driver/jars/selenium-ie-driver-3.0.0.jar:/home/alex/.ivy2/cache/org.seleniumhq.selenium/selenium-java/jars/selenium-java-3.0.0.jar:/home/alex/.ivy2/cache/org.seleniumhq.selenium/selenium-opera-driver/jars/selenium-opera-driver-3.0.0.jar:/home/alex/.ivy2/cache/org.seleniumhq.selenium/selenium-remote-driver/jars/selenium-remote-driver-3.0.0.jar:/home/alex/.ivy2/cache/org.seleniumhq.selenium/selenium-safari-driver/jars/selenium-safari-driver-3.0.0.jar:/home/alex/.ivy2/cache/org.seleniumhq.selenium/selenium-support/jars/selenium-support-3.0.0.jar:/ssd2/idea-IU-143.2370.31/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner -s SmokeTest -showProgressMessages true -C org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestReporter
Testing started at 1:16 PM ...
1476785792292   geckodriver INFO    Listening on 127.0.0.1:10309
Oct 18, 2016 1:16:32 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
1476785792460   mozprofile::profile INFO    Using profile path /tmp/rust_mozprofile.LcHhoF2M0MKU
1476785792461   geckodriver::marionette INFO    Starting browser /usr/bin/firefox
1476785792467   geckodriver::marionette INFO    Connecting to Marionette on localhost:38428
1476785792704   addons.manager  DEBUG   Application has been upgraded
1476785792725   addons.manager  DEBUG   Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"]
1476785792727   addons.manager  DEBUG   Loaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"]
1476785792732   addons.manager  DEBUG   Loaded provider scope for resource://gre/modules/addons/GMPProvider.jsm
1476785792734   addons.manager  DEBUG   Loaded provider scope for resource://gre/modules/addons/PluginProvider.jsm
1476785792735   addons.manager  DEBUG   Starting provider: XPIProvider
1476785792735   addons.xpi  DEBUG   startup
1476785792736   addons.xpi  INFO    SystemAddonInstallLocation directory is missing
1476785792737   addons.xpi  INFO    Mapping firefox@getpocket.com to /usr/lib/firefox/browser/features/firefox@getpocket.com.xpi
1476785792737   addons.xpi  INFO    Mapping e10srollout@mozilla.org to /usr/lib/firefox/browser/features/e10srollout@mozilla.org.xpi
1476785792737   addons.xpi  INFO    Mapping webcompat@mozilla.org to /usr/lib/firefox/browser/features/webcompat@mozilla.org.xpi
1476785792738   addons.xpi  INFO    Mapping langpack-en-GB@firefox.mozilla.org to /usr/lib/firefox/browser/extensions/langpack-en-GB@firefox.mozilla.org.xpi
1476785792738   addons.xpi  INFO    Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to /usr/lib/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
1476785792738   addons.xpi  INFO    Mapping langpack-en-ZA@firefox.mozilla.org to /usr/lib/firefox/browser/extensions/langpack-en-ZA@firefox.mozilla.org.xpi
1476785792739   addons.xpi  DEBUG   checkForChanges
1476785792740   addons.xpi  DEBUG   Loaded add-on state from prefs: {}
1476785792741   addons.xpi  DEBUG   New add-on firefox@getpocket.com in app-system-defaults
1476785792741   addons.xpi  DEBUG   getModTime: Recursive scan of firefox@getpocket.com
1476785792742   addons.xpi  DEBUG   New add-on e10srollout@mozilla.org in app-system-defaults
1476785792742   addons.xpi  DEBUG   getModTime: Recursive scan of e10srollout@mozilla.org
1476785792743   addons.xpi  DEBUG   New add-on webcompat@mozilla.org in app-system-defaults
1476785792743   addons.xpi  DEBUG   getModTime: Recursive scan of webcompat@mozilla.org
1476785792743   addons.xpi  DEBUG   New add-on langpack-en-GB@firefox.mozilla.org in app-global
1476785792744   addons.xpi  DEBUG   getModTime: Recursive scan of langpack-en-GB@firefox.mozilla.org
1476785792744   addons.xpi  DEBUG   New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} in app-global
1476785792744   addons.xpi  DEBUG   getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1476785792745   addons.xpi  DEBUG   New add-on langpack-en-ZA@firefox.mozilla.org in app-global
1476785792745   addons.xpi  DEBUG   getModTime: Recursive scan of langpack-en-ZA@firefox.mozilla.org
1476785792745   addons.xpi  DEBUG   getInstallState changed: true, state: {"app-system-defaults":{"firefox@getpocket.com":{"d":"/usr/lib/firefox/browser/features/firefox@getpocket.com.xpi","st":1474570969000},"e10srollout@mozilla.org":{"d":"/usr/lib/firefox/browser/features/e10srollout@mozilla.org.xpi","st":1474570969000},"webcompat@mozilla.org":{"d":"/usr/lib/firefox/browser/features/webcompat@mozilla.org.xpi","st":1474570969000}},"app-global":{"langpack-en-GB@firefox.mozilla.org":{"d":"/usr/lib/firefox/browser/extensions/langpack-en-GB@firefox.mozilla.org.xpi","st":1474571288000},"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/usr/lib/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","st":1474570969000},"langpack-en-ZA@firefox.mozilla.org":{"d":"/usr/lib/firefox/browser/extensions/langpack-en-ZA@firefox.mozilla.org.xpi","st":1474571288000}}}
1476785792753   addons.xpi-utils    DEBUG   Opening XPI database /tmp/rust_mozprofile.LcHhoF2M0MKU/extensions.json
1476785792755   addons.xpi-utils    DEBUG   New add-on firefox@getpocket.com installed in app-system-defaults
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
1476785792767   DeferredSave.extensions.json    DEBUG   Save changes
1476785792768   addons.xpi-utils    DEBUG   New add-on e10srollout@mozilla.org installed in app-system-defaults
1476785792770   DeferredSave.extensions.json    DEBUG   Starting timer
1476785792772   DeferredSave.extensions.json    DEBUG   Save changes
1476785792772   addons.xpi-utils    DEBUG   New add-on webcompat@mozilla.org installed in app-system-defaults
1476785792777   DeferredSave.extensions.json    DEBUG   Save changes
1476785792778   addons.xpi-utils    DEBUG   New add-on langpack-en-GB@firefox.mozilla.org installed in app-global
1476785792790   DeferredSave.extensions.json    DEBUG   Save changes
1476785792790   addons.xpi-utils    DEBUG   New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global
1476785792794   DeferredSave.extensions.json    DEBUG   Save changes
1476785792794   addons.xpi-utils    DEBUG   New add-on langpack-en-ZA@firefox.mozilla.org installed in app-global
1476785792806   DeferredSave.extensions.json    DEBUG   Save changes
1476785792814   addons.xpi  DEBUG   Loading bootstrap scope from /usr/lib/firefox/browser/features/firefox@getpocket.com.xpi
1476785792828   addons.xpi  DEBUG   Calling bootstrap method install on firefox@getpocket.com version 1.0.4
1476785792828   addons.xpi-utils    DEBUG   Make addon app-system-defaults:firefox@getpocket.com visible
1476785792828   DeferredSave.extensions.json    DEBUG   Save changes
1476785792829   addons.xpi  DEBUG   Loading bootstrap scope from /usr/lib/firefox/browser/features/e10srollout@mozilla.org.xpi
1476785792831   addons.xpi  DEBUG   Calling bootstrap method install on e10srollout@mozilla.org version 1.2
1476785792832   addons.xpi-utils    DEBUG   Make addon app-system-defaults:e10srollout@mozilla.org visible
1476785792833   DeferredSave.extensions.json    DEBUG   Save changes
1476785792834   addons.xpi  DEBUG   Loading bootstrap scope from /usr/lib/firefox/browser/features/webcompat@mozilla.org.xpi
1476785792835   addons.xpi  DEBUG   Calling bootstrap method install on webcompat@mozilla.org version 1.0
1476785792836   addons.xpi-utils    DEBUG   Make addon app-system-defaults:webcompat@mozilla.org visible
1476785792836   DeferredSave.extensions.json    DEBUG   Save changes
1476785792836   addons.manager  DEBUG   Registering startup change 'installed' for langpack-en-GB@firefox.mozilla.org
1476785792836   addons.xpi-utils    DEBUG   Make addon app-global:langpack-en-GB@firefox.mozilla.org visible
1476785792837   DeferredSave.extensions.json    DEBUG   Save changes
1476785792837   addons.xpi-utils    DEBUG   Make addon app-global:{972ce4c6-7e08-4474-a285-3208198ce6fd} visible
1476785792838   DeferredSave.extensions.json    DEBUG   Save changes
1476785792838   addons.manager  DEBUG   Registering startup change 'installed' for langpack-en-ZA@firefox.mozilla.org
1476785792839   addons.xpi-utils    DEBUG   Make addon app-global:langpack-en-ZA@firefox.mozilla.org visible
1476785792839   DeferredSave.extensions.json    DEBUG   Save changes
1476785792839   addons.xpi  DEBUG   Updating XPIState for {"id":"firefox@getpocket.com","syncGUID":"LpWHFQ0HkWMj","location":"app-system-defaults","version":"1.0.4","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Pocket","description":"When you find something you want to view later, put it in Pocket.","creator":null,"homepageURL":null},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"/usr/lib/firefox/browser/features/firefox@getpocket.com.xpi","installDate":1474570969000,"updateDate":1474570969000,"applyBackgroundUpdates":1,"bootstrap":true,"skinnable":false,"size":895232,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"49.0","maxVersion":"49.*"}],"targetPlatforms":[],"multiprocessCompatible":false,"seen":true}
1476785792840   addons.xpi  DEBUG   getModTime: Recursive scan of firefox@getpocket.com
1476785792840   addons.xpi  DEBUG   Updating XPIState for {"id":"e10srollout@mozilla.org","syncGUID":"VxbtVaeN5YpG","location":"app-system-defaults","version":"1.2","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Multi-process staged rollout","description":"Staged rollout of Firefox multi-process feature.","creator":null,"homepageURL":null},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"/usr/lib/firefox/browser/features/e10srollout@mozilla.org.xpi","installDate":1474570969000,"updateDate":1474570969000,"applyBackgroundUpdates":1,"bootstrap":true,"skinnable":false,"size":5714,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"49.0","maxVersion":"49.*"}],"targetPlatforms":[],"multiprocessCompatible":false,"seen":true}
1476785792840   addons.xpi  DEBUG   getModTime: Recursive scan of e10srollout@mozilla.org
1476785792840   addons.xpi  DEBUG   Updating XPIState for {"id":"webcompat@mozilla.org","syncGUID":"b5ZTJmqGISHO","location":"app-system-defaults","version":"1.0","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Web Compat","description":"Urgent post-release fixes for web compatibility.","creator":null,"homepageURL":null},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"/usr/lib/firefox/browser/features/webcompat@mozilla.org.xpi","installDate":1474570969000,"updateDate":1474570969000,"applyBackgroundUpdates":1,"bootstrap":true,"skinnable":false,"size":1500,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"49.0","maxVersion":"49.*"}],"targetPlatforms":[],"multiprocessCompatible":false,"seen":true}
1476785792841   addons.xpi  DEBUG   getModTime: Recursive scan of webcompat@mozilla.org
1476785792841   addons.xpi  DEBUG   Updating XPIState for {"id":"langpack-en-GB@firefox.mozilla.org","syncGUID":"vqnGNzymbzdg","location":"app-global","version":"49.0","type":"locale","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"English (GB) Language Pack","description":null,"creator":"Mark Tyndall","homepageURL":null,"contributors":["David Bartlett","Constantine Murenin","Ian Neal"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"/usr/lib/firefox/browser/extensions/langpack-en-GB@firefox.mozilla.org.xpi","installDate":1474571288000,"updateDate":1474571288000,"applyBackgroundUpdates":1,"bootstrap":true,"skinnable":false,"size":1109449,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":true,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"49.0","maxVersion":"49.*"}],"targetPlatforms":[],"seen":true}
1476785792841   addons.xpi  DEBUG   getModTime: Recursive scan of langpack-en-GB@firefox.mozilla.org
1476785792841   addons.xpi  DEBUG   Updating XPIState for {"id":"{972ce4c6-7e08-4474-a285-3208198ce6fd}","syncGUID":"LN6jBR-vgpmB","location":"app-global","version":"49.0","type":"theme","internalName":"classic/1.0","updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{"32":"icon.png","48":"icon.png"},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Default","description":"The default theme.","creator":"Mozilla","homepageURL":null,"contributors":["Mozilla Contributors"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"/usr/lib/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","installDate":1474570969000,"updateDate":1474570969000,"applyBackgroundUpdates":1,"skinnable":true,"size":5022,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"49.0","maxVersion":"49.0"}],"targetPlatforms":[],"seen":true}
1476785792842   addons.xpi  DEBUG   getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1476785792842   addons.xpi  DEBUG   Updating XPIState for {"id":"langpack-en-ZA@firefox.mozilla.org","syncGUID":"1pgIyRj0FYW1","location":"app-global","version":"49.0","type":"locale","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"English (South Africa) Language Pack","description":null,"creator":"Translate.org.za","homepageURL":null,"contributors":["Translate.org.za","Dwayne Bailey"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"/usr/lib/firefox/browser/extensions/langpack-en-ZA@firefox.mozilla.org.xpi","installDate":1474571288000,"updateDate":1474571288000,"applyBackgroundUpdates":1,"bootstrap":true,"skinnable":false,"size":1114610,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":true,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"49.0","maxVersion":"49.*"}],"targetPlatforms":[],"seen":true}
1476785792842   addons.xpi  DEBUG   getModTime: Recursive scan of langpack-en-ZA@firefox.mozilla.org
1476785792843   DeferredSave.extensions.json    DEBUG   Save changes
1476785792843   addons.xpi  DEBUG   Updating database with changes to installed add-ons
1476785792843   addons.xpi-utils    DEBUG   Updating add-on states
1476785792844   addons.xpi-utils    DEBUG   Writing add-ons list
1476785792845   addons.xpi  DEBUG   Registering manifest for /usr/lib/firefox/browser/features/firefox@getpocket.com.xpi
1476785792845   addons.xpi  DEBUG   Calling bootstrap method startup on firefox@getpocket.com version 1.0.4
1476785792846   addons.xpi  DEBUG   Registering manifest for /usr/lib/firefox/browser/features/e10srollout@mozilla.org.xpi
1476785792846   addons.xpi  DEBUG   Calling bootstrap method startup on e10srollout@mozilla.org version 1.2
1476785792847   addons.xpi  DEBUG   Registering manifest for /usr/lib/firefox/browser/features/webcompat@mozilla.org.xpi
1476785792847   addons.xpi  DEBUG   Calling bootstrap method startup on webcompat@mozilla.org version 1.0
1476785792847   addons.xpi  DEBUG   Registering manifest for /usr/lib/firefox/browser/extensions/langpack-en-GB@firefox.mozilla.org.xpi
1476785792848   addons.xpi  DEBUG   Registering manifest for /usr/lib/firefox/browser/extensions/langpack-en-ZA@firefox.mozilla.org.xpi
1476785792851   addons.manager  DEBUG   Registering shutdown blocker for XPIProvider
1476785792851   addons.manager  DEBUG   Provider finished startup: XPIProvider
1476785792851   addons.manager  DEBUG   Starting provider: LightweightThemeManager
1476785792851   addons.manager  DEBUG   Registering shutdown blocker for LightweightThemeManager
1476785792852   addons.manager  DEBUG   Provider finished startup: LightweightThemeManager
1476785792852   addons.manager  DEBUG   Starting provider: GMPProvider
1476785792858   addons.manager  DEBUG   Registering shutdown blocker for GMPProvider
1476785792859   addons.manager  DEBUG   Provider finished startup: GMPProvider
1476785792859   addons.manager  DEBUG   Starting provider: PluginProvider
1476785792859   addons.manager  DEBUG   Registering shutdown blocker for PluginProvider
1476785792859   addons.manager  DEBUG   Provider finished startup: PluginProvider
1476785792860   addons.manager  DEBUG   Completed startup sequence
1476785793029   Marionette  INFO    Listening on port 38428
1476785793299   addons.manager  DEBUG   Starting provider: <unnamed-provider>
1476785793300   addons.manager  DEBUG   Registering shutdown blocker for <unnamed-provider>
1476785793301   addons.manager  DEBUG   Provider finished startup: <unnamed-provider>
1476785793334   addons.manager  DEBUG   Starting provider: PreviousExperimentProvider
1476785793334   addons.manager  DEBUG   Registering shutdown blocker for PreviousExperimentProvider
1476785793334   addons.manager  DEBUG   Provider finished startup: PreviousExperimentProvider
1476785793337   DeferredSave.extensions.json    DEBUG   Starting write
1476785793451   DeferredSave.extensions.json    DEBUG   Write succeeded
1476785793452   addons.xpi-utils    DEBUG   XPI Database saved, setting schema version preference to 17
1476785794285   Marionette  INFO    startBrowser 364b90c8-7f03-4190-9f08-d1d8e5dc62e7
Oct 18, 2016 1:16:34 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C

(firefox:3953): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed

(firefox:3953): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed

(firefox:3953): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed

(firefox:3953): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed
Given Unauthenticated user
When he navigates to ADMP home page URL
Then 'Sign in' page should be loaded.
And 'User name' input must be shown

Process finished with exit code 0

Note that last 4 lines in the output before the final line is the output of the test.

andreastt commented 7 years ago

For future reference, a test logging the length of the window handles array would be a good reproducible test case to have included for this.

andreastt commented 7 years ago

I believe this is an issue in Marionette. I filed bug 1310992 about this.

AlexanderArendar commented 7 years ago

@andreastt there's only one window handle at the time when close() is called. If you meant the handles which are retrieved by driver.getWindowHandles() My tests are written in Scala and ScalaTest. I could do the minimal test and share on GitHub but that will need you to intall SBT, Scala, etc. Not sure if you need this. The test itself if very simple, it initiates the driver, navigates to one web page, checks that few elements are present there and then tries to close the driver.

devdupont commented 7 years ago

I am having this issue as well on Ubuntu 16.10 with FF 49.0, Marionette 0.11.1, Python 3.5.2, and Selenium 3.0.1 (everything at their current version)

This happens for both driver.quit() and driver.close() when there is only one window open.

Traceback (most recent call last):                                                                               
  File "/home/michael/Documents/Premonition/premonition-python-crawler/crawler/tools/CrawlerThread.py", line 612,
 in run                                                                                                          
    return None                                                                                                  
  File "/usr/local/lib/python3.5/dist-packages/premtools-0.1-py3.5.egg/premtools/web/webpage.py", line 129, in __
exit__                                                                                                           
    self.close_page()                                                                                            
  File "/usr/local/lib/python3.5/dist-packages/premtools-0.1-py3.5.egg/premtools/web/webpage.py", line 166, in cl
ose_page                                                                                                         
    self.driver.close()                                                                                          
  File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 510, in close       
    self.execute(Command.CLOSE)                                                                                  
  File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute     
    self.error_handler.check_response(response)                                                                  
  File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_res
ponse                                                                                                            
    raise exception_class(message, screen, stacktrace)                                                           
selenium.common.exceptions.WebDriverException: Message: Failed to decode response from marionette

This is the geckodriver.log after normal operations:

(firefox:6014): Gdk-WARNING **: firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :1001.
almahaja commented 7 years ago

Hello, When i try to use Firefox50.0.2 with geckodriver (v0.11.1-win32) with Selenium3.0.2 on Windows, Close Browser (Keyword from RF Selenium2Library) results in an error pop-up after closing the Firefox windows "Firefox has stopped working". Attached the geckodriver.log file.

geckodriver.zip

And Error details from pop-up are as below:-

Problem signature: Problem Event Name: APPCRASH Application Name: firefox.exe Application Version: 50.0.2.6177 Application Timestamp: 583e4bb4 Fault Module Name: mozglue.dll Fault Module Version: 50.0.2.6177 Fault Module Timestamp: 583e4b91 Exception Code: 80000003 Exception Offset: 0000ed43 OS Version: 6.1.7601.2.1.0.274.10 Locale ID: 1033 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Also, i had tried some combinations and below are my findings (ref. https://github.com/robotframework/Selenium2Library/issues/614):-

RF3.0, FF47.0.2 (without geckodriver) and Selenium-2.53.6, Python 2.7.10 :- Works RF3.0, FF47.0.2 + geckodriver and Selenium-3.0.2, Python 2.7.10 :- Works RF3.0, FF48.0.2 + geckodriver and Selenium-3.0.2, Python 2.7.10 :- Works RF3.0, FF48.0.2 + geckodriver and Selenium-2.53.6, Python 2.7.10 :- Doesn't work. RF3.0, FF50.0.2 + geckodriver and Selenium-3.0.2, Python 2.7.10 :- Close Browser (Keyword from RF Selenium2Library) fails with error "Firefox has stopped working". RF3.0, FF50.0.2 + geckodriver and Selenium-2.53.6, Python 2.7.10 :- Fails to open the URL and gives error ""Firefox has stopped working"."

Thanks, ~alok

whimboo commented 7 years ago

I have made some changes to the "close window" implementation of Marionette server on bug 1311350, so it returns the remaining window handles now.

As discussed with @andreastt we have a faked empty list of close() is called on the last window handle now. With that geckodriver should detect that Firefox has to be closed and should terminate the session. Andreas mentioned that he has some work in progress for that.

andreastt commented 7 years ago

Indeed, some work is required in geckodriver for it to terminate the Firefox process when it receives an empty array of window handles after calling CloseWindow.

SlavikCA commented 7 years ago

I tried to check Bugzilla to find out the status and found this comment in bug 1311350,

Tracking Flags: 
status-firefox50:   wontfix
status-firefox51:   wontfix
status-firefox52:   fixed
status-firefox53:   fixed

Does that mean, that this issue expected to be fixed with release of firefox 52?

andreastt commented 7 years ago

@SlavikCA The fix comes in two parts: One to Marionette in Firefox, which will be available with 52, and one to geckodriver which has not yet been written.

whimboo commented 7 years ago

@andreastt, could you please give some links where the necessary code would have to be put in? I do not actually see a closeWindow() method in Geckodriver. As it looks like it simply forwards the call to Webdriver. Thanks.

andreastt commented 7 years ago

https://github.com/mozilla/geckodriver/blob/master/src/marionette.rs#L399-L411 needs to be modified to look at the response from sending a CloseWindow command. If the returned array is empty, it should terminate the Firefox process before returning the response to the client.

whimboo commented 7 years ago

Looks like some other work on webdriver-rust is necessary, which Andreas seems to have started to work on yesterday via https://github.com/mozilla/webdriver-rust/pull/64.

andreastt commented 7 years ago

This should now be resolved with Firefox 52 or newer and geckodriver 0.14.0

xyngfei commented 7 years ago

I tried geckodriver 0.14.0 with FF 51.0.1, problem still exist.

Configuration

Microsoft Windows [Version 6.3.9600]

Pip list

cffi 1.7.0 click 6.7 colorama 0.3.7 cryptography 1.4 decorator 4.0.11 docutils 0.12 enum34 1.1.6 fake-factory 0.5.9 Flask 0.12 idna 2.1 ipaddress 1.0.16 itsdangerous 0.24 Jinja2 2.9.4 MarkupSafe 0.23 paramiko 2.0.1 pip 9.0.1 pyasn1 0.1.9 pycparser 2.14 pyfiglet 0.7.5 PyMySQL 0.7.6 python-dateutil 2.5.3 robotframework 3.0.1 robotframework-databaselibrary 0.8.1 robotframework-faker 3.0.0 robotframework-selenium2library 1.8.0 selenium 3.0.2 setuptools 20.10.1 six 1.10.0 subprocess.run 0.0.8 termcolor 1.1.0 Werkzeug 0.11.15 wheel 0.29.0 wrapt 1.10.8

Error log

1486434411868 addons.manager DEBUG Starting provider: 1486434411868 addons.manager DEBUG Registering shutdown blocker for 1486434411868 addons.manager DEBUG Provider finished startup: 1486434411885 addons.manager DEBUG Starting provider: PreviousExperimentProvider 1486434411885 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider 1486434411885 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider 1486434411888 DeferredSave.extensions.json DEBUG Starting write 1486434412101 DeferredSave.extensions.json DEBUG Write succeeded 1486434412101 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 19 1486434412998 Marionette WARN Using deprecated data structure for setting timeouts 1486434413001 Marionette WARN Using deprecated data structure for setting timeouts [GPU 4916] WARNING: pipe error: 109: file c:/builds/moz2_slave/m-aurora-w64-ntly-000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 1486434413831 Marionette INFO New connections will no longer be accepted

!!! [Parent][MessageChannel] Error: (msgtype=0x40000B,name=PCompositorWidget::Msg_UnobserveVsync) Channel error: cannot send/recv

SlavikCA commented 7 years ago

@xyngfei As it said above: Firefox 52 is required for the fix.

I tested and the fix works for me.

xyngfei commented 7 years ago

@SlavikCA

I tried with FF 52b04, it still has the same issue.

image

1486552172117 DeferredSave.extensions.json DEBUG Starting write 1486552172324 DeferredSave.extensions.json DEBUG Write succeeded 1486552172325 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 19 1486552173165 Marionette WARN Using deprecated data structure for setting timeouts 1486552173168 Marionette WARN Using deprecated data structure for setting timeouts 1486552202475 Marionette INFO New connections will no longer be accepted [Child 7864] ###!!! ABORT: Aborting on channel error.: file c:/builds/moz2_slave/m-beta-w32-0000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2143

jgraham commented 7 years ago

We think that there's a race in the marionette shutdown procedure that perhaps leads to the socket being closed before the response has been sent. We are currently working on the best way to solve this.

andreastt commented 7 years ago

It is possible that calling Services.startup.quit with bitflags Ci.nsIAppStartup.eAttemptQuit and Ci.nsIAppStartup.eForceKill causes problems in the IPC subsystem. I have seen reports of crashes in MessageChannel.cpp before, but they have all been fixed and uplifted.

I also feel it’s important to add that even if this is printed in the shell on ending the session, it doesn’t really matter since the process is terminated. However, we should work to find the root cause of this.

@xyngfei @SlavikCA Is it possible for one of you to see if this generates a crash log? You can find crash logs in about:crashes.

andreastt commented 7 years ago

So apparently geckodriver passes eForceQuit in https://github.com/mozilla/geckodriver/blob/master/src/marionette.rs#L796 to the quitApplication command, which Marionette thinks is a bitwise flag in http://searchfox.org/mozilla-central/source/testing/marionette/driver.js#2530-2533.

The nsIAppStartup documentation says:

One and only one of the "Quit" flags must be specified. The eRestart flag may be bit-wise combined with one of the "Quit" flags to cause the application to restart after it quits.

So we are clearly wrong to pass both eForceQuit and eAttemptQuit, and I think Marionette is wrong to lump them together when additional flags are given as arguments. I would suggest the following:

  1. Stop geckodriver from passing eForceQuit
  2. Stop Marionette from lumping together flags if flags are given as arguments
  3. When flags are given as arguments, lump them together as bitwise flags
xyngfei commented 7 years ago

@andreastt

U can look at the logs file. Something it works well. However, you can see the ABORT info from log file. [Child 7864] ###!!! ABORT: Aborting on channel error.: file c:/builds/moz2_slave/m-beta-w32-0000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2143

geckodriver_good.log.txt geckodriver_bad.log.txt

andreastt commented 7 years ago

Can someone on Windows please visit about:crashes and link the crash dump?

ghost commented 7 years ago

@andreastt Close No response and will not cause a crash. Is the crash dump required for quit?

ghost commented 7 years ago

C: \ Program Files (x86) \ Mozilla Firefox \ firefox.exe "--marionette --profile C: \ Users \ GameXG \ AppData \ Local \ Temp \ rust_mozprofile. .ZxIMKVhVAFKI is also empty.

View history also does not exist through selenium access to the records, it seems geckodriver before exiting all the records ...

SlavikCA commented 7 years ago

Today I checked my Selenium nodes and few of them (not sure why not all of them) has about 70+ firefox.exe processes.

About:crahes: No crash reports have been submitted.

I see few of these exceptions in C:\selenium\log\selenium_node on the node (not hub), not sure if it really has any meaning for this:

19:23:56.187 WARN - Exception thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: 'optsel02', ip: '10.164.0.170', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_40'
Driver info: driver.version: unknown
        at java.util.concurrent.FutureTask.report(Unknown Source)
...
org.openqa.selenium.remote.server.FirefoxDriverProvider.callConstructor(FirefoxDriverProvider.java:86)
        ... 9 more
Caused by: org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{marionette=true, firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@46149a5e, browserName=firefox, moz:firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@46149a5e, version=, platform=ANY, firefox_profile=UEsDBBQACAgIADSVRkoAAAAAAAAAA...}], required capabilities = Capabilities [{}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: 'optsel02', ip: '10.164.0.170', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_40'
...
19:23:56.270 WARN - Exception: Unable to create new remote session. desired capabilities = Capabilities [{marionette=true, firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@46149a5e, browserName=firefox, moz:firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@46149a5e, version=, platform=ANY, firefox_profile=UEsDBBQACAgIADSVRkoAAAAAAAAAA...}], required capabilities = Capabilities [{}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: 'optsel02', ip: '10.164.0.170', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_40'
Driver info: driver.version: FirefoxDriver
andreastt commented 7 years ago

@SlavikCA That seems entirely unrelated.

robinsmathewgit commented 7 years ago

Adding my finding to this issue.

Browser : Firefox Nightly 54.0, Firefox 51.0 Selenium : 3.1.0 GeckoDriver : geckodriver-v0.14.0-win64

GeckoDriver is happy with most of the websites but it is crashing for some main websites.

Website Crashing

http://www.cnn.com/ http://www.dailymail.co.uk/ https://www.bet365.com/ http://www.foxnews.com/ http://abcnews.go.com/

Most of the other site I have checked worked without any problem

When driver.quit() is called it will show the message "Plugin container for Nightly stopped working"

Here is the message displayed in Firefox popup (For all the above websites its the same)

Problem signature: Problem Event Name: APPCRASH Application Name: plugin-container.exe Application Version: 54.0.0.6264 Application Timestamp: 58b02aac Fault Module Name: xul.dll Fault Module Version: 54.0.0.6264 Fault Module Timestamp: 58b029ef Exception Code: 80000003 Exception Offset: 008cb329 OS Version: 6.1.7601.2.1.0.256.4 Locale ID: 2057 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online: http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline: C:\windows\system32\en-US\erofflps.txt

I am sharing the code I have used. This issue is consistent for any of the above websites.

Code

package CrossBrowser.Tests.POC;

import java.net.URL;

import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.firefox.FirefoxProfile; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver; import org.testng.annotations.Test;

public class GeckoDriverIssue {

WebDriver driver;

@Test(description = "Launch Website")
public void geckoDriverIssue() {        

    try {
        FirefoxProfile fp = new FirefoxProfile();
        DesiredCapabilities firefoxCapabilities = DesiredCapabilities.firefox();
        firefoxCapabilities.setCapability(FirefoxDriver.PROFILE, fp);
        firefoxCapabilities.setCapability("marionette", true);
        driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), firefoxCapabilities);

        String webSite = "http://www.cbsnews.com/";
        driver.get(webSite);

    } catch (Exception e) { }

    finally {
        driver.quit();  
    }

}

}

Thanks, Robins

yoongu commented 7 years ago

@andreastt

I'm part of an organization that's keen on having this problem resolved. Would there be anyway we could be of help? For example, what if we created a Windows VM on a public cloud where you could reproduce this problem reliably, and shared with you its access credentials?

snpanigrahi9 commented 7 years ago

Today I tested with gecko driver 0.15 and selenium client library 3.3.0 Firefox 52.0

Still its not closing the browser using driver.close();

snpanigrahi9 commented 7 years ago

package demo1;

import java.io.IOException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.firefox.FirefoxOptions; import org.openqa.selenium.firefox.FirefoxProfile; import org.openqa.selenium.remote.DesiredCapabilities;

public class Automation {

public static void main(String[] args) throws InterruptedException, IOException {

     DesiredCapabilities caps = new FirefoxOptions()
              .setProfile(new FirefoxProfile())
              .addTo(DesiredCapabilities.firefox());

    caps.setCapability("acceptInsecureCerts", true);
    caps.setJavascriptEnabled(true);
    caps.setCapability("marionette", true);
    System.setProperty("webdriver.gecko.driver","C:\\Workspace\\Demo\\geckodriver.exe");
    WebDriver driver = new FirefoxDriver(caps);
    driver.get("https://l4dridap1274:8446/web/hrbpo/client-tooling-login");
    driver.close();

    }

}

its not closing the browser.

andreastt commented 7 years ago

We hope that this issue is being addressed with https://bugzilla.mozilla.org/show_bug.cgi?id=1337743, which is on track for uplift to Aurora and Beta trains. It would be great if someone could grab the latest Nightly and see if it fixes the Aborting on channel error problem.

In the meantime I have also submitted https://github.com/mozilla/geckodriver/pull/590 (addressing https://github.com/mozilla/geckodriver/issues/225) to disable Flash from starting in the first place, which should hopefully cause the plugin container not to trigger.

cc @mjzffr

andreastt commented 7 years ago

Interestingly I am able to reproduce the error by starting geckodriver, starting a session, and then killing the geckodriver process with SIGINT:

% cargo run
   Compiling geckodriver v0.15.0 (file:///home/ato/src/github.com/mozilla/geckodriver)
    Finished dev [unoptimized + debuginfo] target(s) in 6.27 secs
     Running `target/debug/geckodriver`
1490892752667   geckodriver INFO    Listening on 127.0.0.1:4444
1490892754911   mozprofile::profile INFO    Using profile path /tmp/rust_mozprofile.uusBLSSfVRuH
1490892754912   geckodriver::marionette INFO    Starting browser /usr/local/firefox/firefox-bin with args []
1490892754913   geckodriver::marionette INFO    Connecting to Marionette on localhost:33703
1490892755344   Marionette  INFO    Listening on port 33703
^?4721: signal: interrupt
% [Child 4932] ###!!! ABORT: Aborting on channel error.: file /builds/slave/m-cen-l64-ntly-000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2056
[Child 4932] ###!!! ABORT: Aborting on channel error.: file /builds/slave/m-cen-l64-ntly-000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2056

###!!! [Child][MessageChannel] Error: (msgtype=0x420003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv

###!!! [Child][MessageChannel] Error: (msgtype=0x420003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv

In another shell (the data here isn’t important):

% curl -d '{"capabilities": {"alwaysMatch": {"proxy": {"proxyAutoconfigUrl": "http:\/\/192.168.0.2:10144\/proxy.pac","proxyType": "pac"}}}}' http://localhost:4444/session

This could be a slightly different issue than the one reported here, since interrupting geckodriver does not send the quit/quitApplication command to Marionette, but terminates the Firefox subprocess from within geckodriver.

It could be beneficial for geckodriver to implement proper signal handling to attempt a clean shutdown when interrupted. But again, I have to stress this is a slightly different issue than the one reported here.

whimboo commented 7 years ago

There is no way for a clean shutdown of Firefox given that it doesn't support SIGINT yet. So the only way is to use SIGKILL or quit(), whereby the latter does not force a shutdown and could be aborted.

Regarding the message channel errors you can also see those if you hit ctrl+c while Firefox is starting. Not sure if it is expected that the graphics process/thread is bailing out that hard.

andreastt commented 7 years ago

It is not Firefox that is receiving SIGINT in the example above. geckodriver receives SIGINT, but because it doesn’t handle the signal, I’m assuming the Firefox subprocess gets terminated forcefully. It could implement a signal handler for SIGINT that sent the ‘quit’ command to Marionette if a connection was open before trying to terminate it.

whimboo commented 7 years ago

Sending the quit() command would be a nice workaround we could do until Firefox is able to correctly handle SIGINT.

yoongu commented 7 years ago

This fix seems to work for us. Firefox Nightly no longer throws up an error dialog when it's being closed (Firefox has stopped working), unlike Firefox Stable which almost always does so.

We're looking forward to this being released along with Firefox 54.0. Thanks for the fix @andreastt

SiarheiDubovik commented 7 years ago

This workaround is working for me - just open any Firefox service page (config, profile or etc.) before quit. Here is example of code:

driver.get("about:config"); driver.quit();

Server details:

OS: Windows Server 2008 R2 Firefox: 52.0 (32 bit) GeckoDriver: 0.14.0 Selenium WebDriver: 3.0.1

cvakiitho commented 7 years ago

Firefox is still crashing for us with geckodriver 0.16.1 and firefox 54.0b5:

firefox_1  | [Parent 191] WARNING: pipe error (56): Connection reset by peer: file /home/worker/workspace/build/src/ipc/chromium/src/chrome/common/ipc_channel_
firefox_1  | ###!!! [Parent][MessageChannel] Error: (msgtype=0x2C0082,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv
firefox_1  | ###!!! [Parent][MessageChannel] Error: (msgtype=0x3E0003,name=PCompositorBridge::Msg_DidComposite) Channel error: cannot send/recv
firefox_1  | ###!!! [Parent][RunMessage] Error: Channel error: cannot send/recv
firefox_1  | ###!!! [Parent][RunMessage] Error: Channel error: cannot send/recv
firefox_1  | ###!!! [Parent][RunMessage] Error: Channel error: cannot send/recv
firefox_1  | ###!!! [Parent][RunMessage] Error: Channel error: cannot send/recv
firefox_1  | ###!!! [Parent][MessageChannel] Error: (msgtype=0x3E0003,name=PCompositorBridge::Msg_DidComposite) Channel error: cannot send/recvkkk

You can try with this docker image: https://hub.docker.com/r/cvakiitho/docker-selenium

andreastt commented 7 years ago

@cvakiitho I don’t actually think that constitutes as a crash. It happens on shutdown because some of the IPC channel receivers are getting shut down, which you would expect as Firefox is quitting. On Linux this doesn’t cause any problems as far as I’m aware?

cvakiitho commented 7 years ago

@andreastt I use docker node https://github.com/SeleniumHQ/docker-selenium , this is any output I can get from it, and see in vnc that firefox page crashed.

Can I turn on some extensive logging somewhere?

whimboo commented 7 years ago

When I hear docker-selenium it hardly reminds me on https://bugzilla.mozilla.org/show_bug.cgi?id=1323701 where we someone else faces crashes too. It might be related.

If you have a chance to VNC into the node, you could open Firefox and go to about:crashes. Submit one of those crashes and tell us the crash id.

cvakiitho commented 7 years ago

about:crashes is empty, firefox doesn't crash completely( I think that versions <54 were crashing), only tab crashes.

Thanks for the link, it seems to be the same issue, especially this part:

This is a little tricky as right now I can't reproduce the failures on my local machine (OSX) running the exact same versions of Firefox / Selenium, but they occur 100% of the time in docker-selenium in our Jenkins job.

whimboo commented 7 years ago

Whatever happens for this bug it depends on a fix for https://bugzilla.mozilla.org/show_bug.cgi?id=1338771, which is the crash I was thinking of.

A workaround would be to disable e10s (multiprocess) for Firefox.

cvakiitho commented 7 years ago

Ok, it looks like everything is fine with attached /dev/shm volume to docker container.

whimboo commented 7 years ago

Thanks for the feedback.

Everyone else who is affected by this issue, can you please tell if it's because you also use Docker + Selenium? Does the https://github.com/mozilla/geckodriver/issues/285#issuecomment-300534925 help?

jld commented 7 years ago

For Docker, setting --shm-size to something sufficiently larger than the default 64M should also work, if my speculation in bug 1338771 comment #10 is right. TaskCluster sets it to 1800000000 (1800M, give or take).

In principle Gecko could handle shared memory exhaustion more gracefully, at least enough to give a useful error message, but this causes problems that haven't been figured out yet.

ViacheslavBulba commented 7 years ago

Hi All, update of Firefox to 54.0 eliminated this issue for me on Windows 10.

VikasSalunke commented 7 years ago

Hey Guys, I am getting this message after execution of my simple script. System and Configuration used: Ubuntu 16.04, 64 bit, Geckodriver v0.17.0(linux) and FF version 54.0. After reading the previous comments above tried to comment driver.close() and driver.quit() still the message is shown. Also tried with single FF window still message is displayed.

1499346033895 geckodriver INFO Listening on 127.0.0.1:26948 1499346034316 geckodriver::marionette INFO Starting browser /usr/lib/firefox/firefox with args ["-marionette"] 1499346039162 Marionette INFO Listening on port 35762 Jul 06, 2017 6:30:39 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: W3C 1499346059102 Marionette INFO New connections will no longer be accepted

Simple Script ->

package automationFramework;

import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class Gecko_Driver {

public static void main(String[] args) throws InterruptedException {

WebDriver driver = new FirefoxDriver();
driver.get("http://www.toolsqa.com");

Thread.sleep(5000);
driver.close();

} }

whimboo commented 7 years ago

@VikasSalunke which message is shown? The lines above don't show anything specific to a failure.

VikasSalunke commented 7 years ago

@whimboo The message I have mentioned in the above comment. Also the FF browser gets close before completing the script execution.

VikasSalunke commented 7 years ago

Guys any solution for the above problem. I searched and found such error can be fixed by using Firefox profile. DesiredCapabilities caps = new FirefoxOptions()

 .setProfile(new FirefoxProfile())
 .addTo(DesiredCapabilities.firefox());
 WebDriver driver = new FirefoxDriver(caps);

I tried but still the same error mentioned in the Previous Post.