geckodriver icon indicating copy to clipboard operation
geckodriver copied to clipboard

Failed to decode response from marionette (Exiting due to channel error)

Open tsoernes opened this issue 5 years ago • 81 comments

System

Using GeckoDriver version: 0.24.0 Mozilla Firefox 67.0 Linux 4.14.62-65.117.amzn1.x86_64 Python 3.7, Selenium 3.141.0

This is run inside of docker with --shm-size 3G

Stacktrace

<class 'selenium.common.exceptions.WebDriverException'>
Failed to decode response from marionette

Trace-level log

Regular log:

1558944987379	mozrunner::runner	INFO	Running command: "/usr/bin/firefox" "-marionette" "-headless" "--width=2560" "--height=1440" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile.sQJkVkPlOy7H"
*** You are running in headless mode.
1558944988466	[email protected]	WARN	Loading extension '[email protected]': Reading manifest: Invalid extension permission: mozillaAddons
1558944988466	[email protected]	WARN	Loading extension '[email protected]': Reading manifest: Invalid extension permission: resource://pdf.js/
1558944988466	[email protected]	WARN	Loading extension '[email protected]': Reading manifest: Invalid extension permission: about:reader*
1558944990300	Marionette	INFO	Listening on port 41983
1558944990390	Marionette	WARN	TLS certificate errors will be ignored for this session
console.error: BroadcastService: 
  receivedBroadcastMessage: handler for
  remote-settings/monitor_changes
  threw error:
  Message: Error: Polling for changes failed: http://%(server)s/dummy/blocklist//buckets/monitor/collections/changes/records?_expected=%221558742407364%22 is not a valid URL..
  Stack:
    remoteSettingsFunction/remoteSettings.pollChanges@resource://services-settings/remote-settings.js:203:13

JavaScript error: https://platform.twitter.com/widgets/widget_iframe.acdc742362712a538e04edf50787b6b9.html?origin=https%3A%2F%2Fwww.crunchbase.com&settingsEndpoint=https%3A%2F%2Fsyndication.twitter.com%2Fsettings, line 12: Error: Network error.
1558945085774	Marionette	WARN	TimedPromise timed out after 500 ms: stacktrace:
bail@chrome://marionette/content/sync.js:223:64
JavaScript error: https://platform.twitter.com/widgets/widget_iframe.acdc742362712a538e04edf50787b6b9.html?origin=https%3A%2F%2Fwww.crunchbase.com&settingsEndpoint=https%3A%2F%2Fsyndication.twitter.com%2Fsettings, line 12: Error: Network error.
JavaScript error: https://platform.twitter.com/widgets/widget_iframe.acdc742362712a538e04edf50787b6b9.html?origin=https%3A%2F%2Fwww.crunchbase.com&settingsEndpoint=https%3A%2F%2Fsyndication.twitter.com%2Fsettings, line 12: Error: Network error.
JavaScript error: https://platform.twitter.com/widgets/widget_iframe.acdc742362712a538e04edf50787b6b9.html?origin=https%3A%2F%2Fwww.crunchbase.com&settingsEndpoint=https%3A%2F%2Fsyndication.twitter.com%2Fsettings, line 12: Error: Network error.
JavaScript error: https://platform.twitter.com/widgets/widget_iframe.acdc742362712a538e04edf50787b6b9.html?origin=https%3A%2F%2Fwww.crunchbase.com&settingsEndpoint=https%3A%2F%2Fsyndication.twitter.com%2Fsettings, line 12: Error: Network error.
JavaScript error: https://platform.twitter.com/widgets/widget_iframe.acdc742362712a538e04edf50787b6b9.html?origin=https%3A%2F%2Fwww.crunchbase.com&settingsEndpoint=https%3A%2F%2Fsyndication.twitter.com%2Fsettings, line 12: Error: Network error.
JavaScript error: https://platform.twitter.com/widgets/widget_iframe.acdc742362712a538e04edf50787b6b9.html?origin=https%3A%2F%2Fwww.crunchbase.com&settingsEndpoint=https%3A%2F%2Fsyndication.twitter.com%2Fsettings, line 12: Error: Network error.
1558945328535	Marionette	WARN	TimedPromise timed out after 500 ms: stacktrace:
bail@chrome://marionette/content/sync.js:223:64
1558945332133	Marionette	WARN	TimedPromise timed out after 500 ms: stacktrace:
bail@chrome://marionette/content/sync.js:223:64
JavaScript error: https://platform.twitter.com/widgets/widget_iframe.acdc742362712a538e04edf50787b6b9.html?origin=https%3A%2F%2Fwww.crunchbase.com&settingsEndpoint=https%3A%2F%2Fsyndication.twitter.com%2Fsettings, line 12: Error: Network error.
1558945348477	Marionette	WARN	TimedPromise timed out after 500 ms: stacktrace:
bail@chrome://marionette/content/sync.js:223:64
JavaScript error: https://platform.twitter.com/widgets/widget_iframe.acdc742362712a538e04edf50787b6b9.html?origin=https%3A%2F%2Fwww.crunchbase.com&settingsEndpoint=https%3A%2F%2Fsyndication.twitter.com%2Fsettings, line 12: Error: Network error.
1558945409885	Marionette	WARN	TimedPromise timed out after 500 ms: stacktrace:
bail@chrome://marionette/content/sync.js:223:64
1558945463250	Marionette	WARN	TimedPromise timed out after 500 ms: stacktrace:
bail@chrome://marionette/content/sync.js:223:64
JavaScript error: https://platform.twitter.com/widgets/widget_iframe.acdc742362712a538e04edf50787b6b9.html?origin=https%3A%2F%2Fwww.crunchbase.com&settingsEndpoint=https%3A%2F%2Fsyndication.twitter.com%2Fsettings, line 12: Error: Network error.
JavaScript error: https://platform.twitter.com/widgets/widget_iframe.acdc742362712a538e04edf50787b6b9.html?origin=https%3A%2F%2Fwww.crunchbase.com&settingsEndpoint=https%3A%2F%2Fsyndication.twitter.com%2Fsettings, line 12: Error: Network error.
JavaScript error: https://platform.twitter.com/widgets/widget_iframe.acdc742362712a538e04edf50787b6b9.html?origin=https%3A%2F%2Fwww.crunchbase.com&settingsEndpoint=https%3A%2F%2Fsyndication.twitter.com%2Fsettings, line 12: Error: Network error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.

The last parts of the trace level logs: tracelog.txt

tsoernes avatar May 27 '19 08:05 tsoernes

Sorry, but I cannot find the Failed to decode response from marionette part in the trace log. Is that trace really the correct one? Also note that those channel error messages are coming from Firefox, and the application most likely died.

whimboo avatar May 27 '19 14:05 whimboo

I'm seeing this issue, also. It appears to have been in place for a while.

For myself, I am using: Centos 7 Mozilla Firefox (Headless) 67.0, 65.0.2, 69.0.3, 70.0 GeckoDriver version 0.26.0 (for linux64; downloaded from here: https://github.com/mozilla/geckodriver/releases) org.seleniumhq.selenium:selenium-server:3.4.0

Edit: I experimented with several firefox versions. I list the failed versions above. Eventually, I found it worked with 64.0.2, which is consistent with what was reported here: https://github.com/mozilla/geckodriver/issues/1560

Below is the stacktrace that I get (in place of the package paths, I put the lines of my code in bold where this issue is triggered):

org.openqa.selenium.WebDriverException: Failed to decode response from marionette Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' System info: host: 'jenkins2', ip: '172.16.12.149', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-957.21.3.el7.x86_64', java.version: '1.8.0_211' Driver info: org.openqa.selenium.firefox.FirefoxDriver Capabilities [{moz:profile=/tmp/rust_mozprofileuGyLim, rotatable=false, moz:geckodriverVersion=0.26.0, timeouts={implicit=0.0, pageLoad=300000.0, script=30000.0}, pageLoadStrategy=normal, unhandledPromptBehavior=dismiss and notify, strictFileInteractability=false, moz:headless=true, platform=ANY, moz:accessibilityChecks=false, moz:useNonSpecCompliantPointerOrigin=false, acceptInsecureCerts=false, browserVersion=67.0, moz:shutdownTimeout=60000.0, platformVersion=3.10.0-957.21.3.el7.x86_64, moz:processID=31137.0, browserName=firefox, moz:buildID=20190516215225, javascriptEnabled=true, platformName=linux, setWindowRect=true, moz:webdriverClick=true}] Session ID: bd33f758-d6fa-46a4-8e52-c9d019f8ec43 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.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:150) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:115) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:45) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637) at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:364) at "driver.get(url);"(LandingPage.java:385) at "accessFirefox();" (LandingPage.java:338) at "accessPage(browser);"(LandingPage.java:45) at "landingPage = new LandingPage();"BasicTest.java:14) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) 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 org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

HStine avatar Oct 24 '19 15:10 HStine

@HStine, if you could attach a trace level log, that would be way more helpful. See https://firefox-source-docs.mozilla.org/testing/geckodriver/TraceLogs.html in how to do that. Thanks.

whimboo avatar Oct 24 '19 18:10 whimboo

@whimboo 1572039857365 mozrunner::runner INFO Running command: "/usr/local/firefox/firefox" "-marionette" "--headless" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofilebVFh70" 1572039857368 geckodriver::marionette DEBUG Waiting 60s to connect to browser on 127.0.0.1:44269 *** You are running in headless mode. 1572039858799 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: mozillaAddons 1572039858800 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: resource://pdf.js/ 1572039858800 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: about:reader* 1572039859095 Marionette TRACE Received observer notification profile-after-change 1572039859306 Marionette TRACE Received observer notification command-line-startup 1572039859306 Marionette TRACE Received observer notification nsPref:changed 1572039859306 Marionette DEBUG Init aborted (running=false, enabled=true, finalUIStartup=false) 1572039859532 Marionette TRACE Received observer notification toplevel-window-ready 1572039862420 Marionette TRACE Received observer notification marionette-startup-requested 1572039862420 Marionette TRACE Waiting until startup recorder finished recording startup scripts... 1572039862426 Marionette TRACE All scripts recorded. 1572039862426 Marionette DEBUG Setting recommended pref apz.content_response_timeout to 60000 1572039862427 Marionette DEBUG Setting recommended pref browser.contentblocking.introCount to 99 1572039862427 Marionette DEBUG Setting recommended pref browser.download.panel.shown to true 1572039862427 Marionette DEBUG Setting recommended pref browser.newtabpage.enabled to false 1572039862428 Marionette DEBUG Setting recommended pref browser.pagethumbnails.capturing_disabled to true 1572039862428 Marionette DEBUG Setting recommended pref browser.search.update to false 1572039862428 Marionette DEBUG Setting recommended pref browser.tabs.disableBackgroundZombification to false 1572039862433 Marionette DEBUG Setting recommended pref browser.tabs.warnOnCloseOtherTabs to false 1572039862433 Marionette DEBUG Setting recommended pref browser.tabs.warnOnOpen to false 1572039862433 Marionette DEBUG Setting recommended pref browser.usedOnWindows10.introURL to 1572039862434 Marionette DEBUG Setting recommended pref browser.urlbar.suggest.searches to false 1572039862435 Marionette DEBUG Setting recommended pref datareporting.policy.dataSubmissionPolicyAccepted to false 1572039862435 Marionette DEBUG Setting recommended pref dom.disable_beforeunload to true 1572039862435 Marionette DEBUG Setting recommended pref dom.disable_open_during_load to false 1572039862435 Marionette DEBUG Setting recommended pref dom.file.createInChild to true 1572039862435 Marionette DEBUG Setting recommended pref dom.max_chrome_script_run_time to 0 1572039862435 Marionette DEBUG Setting recommended pref dom.max_script_run_time to 0 1572039862443 Marionette DEBUG Setting recommended pref extensions.getAddons.cache.enabled to false 1572039862443 Marionette DEBUG Setting recommended pref extensions.webservice.discoverURL to http://%(server)s/dummy/discoveryURL 1572039862443 Marionette DEBUG Setting recommended pref network.http.prompt-temp-redirect to false 1572039862443 Marionette DEBUG Setting recommended pref network.http.speculative-parallel-limit to 0 1572039862443 Marionette DEBUG Setting recommended pref security.fileuri.strict_origin_policy to false 1572039862443 Marionette DEBUG Setting recommended pref security.notification_enable_delay to 0 1572039862443 Marionette DEBUG Setting recommended pref signon.autofillForms to false 1572039862443 Marionette DEBUG Setting recommended pref signon.rememberSignons to false 1572039862443 Marionette DEBUG Setting recommended pref toolkit.cosmeticAnimations.enabled to false 1572039862572 Marionette INFO Listening on port 44269 1572039862572 Marionette DEBUG Remote service is active 1572039862628 Marionette DEBUG Accepted connection 0 from 127.0.0.1:41942 1572039862644 geckodriver::marionette DEBUG Connection to Marionette established on 127.0.0.1:44269. 1572039862656 Marionette DEBUG 0 -> [0,1,"WebDriver:NewSession",{"acceptInsecureCerts":true,"browserName":"firefox"}] 1572039862656 Marionette WARN TLS certificate errors will be ignored for this session 1572039862694 Marionette TRACE [4294967297] Frame script loaded 1572039862697 Marionette TRACE [4294967297] Frame script registered 1572039862762 Marionette DEBUG 0 <- [1,1,null,{"sessionId":"c3ecc219-5223-41e7-9d84-2c83d32dd33e","capabilities":{"browserName":"firefox","browserVersion":"67.0" ... /rust_mozprofilebVFh70","moz:shutdownTimeout":60000,"moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true}}] 1572039862774 webdriver::server DEBUG <- 200 OK {"value":{"sessionId":"c3ecc219-5223-41e7-9d84-2c83d32dd33e","capabilities":{"acceptInsecureCerts":true,"browserName":"firefox","browserVersion":"67.0","moz:accessibilityChecks":false,"moz:buildID":"20190516215225","moz:geckodriverVersion":"0.26.0","moz:headless":true,"moz:processID":22236,"moz:profile":"/tmp/rust_mozprofilebVFh70","moz:shutdownTimeout":60000,"moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true,"pageLoadStrategy":"normal","platformName":"linux","platformVersion":"3.10.0-957.21.3.el7.x86_64","rotatable":false,"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify"}}} Oct 25, 2019 5:44:22 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: W3C 1572039862871 webdriver::server DEBUG -> POST /session/c3ecc219-5223-41e7-9d84-2c83d32dd33e/url { "url": "http:\u002f\u002furl.url.url.url\u002f" } 1572039862898 Marionette DEBUG 0 -> [0,2,"WebDriver:Navigate",{"url":"http://url.url.url.url"}] 1572039863009 Marionette TRACE [4294967297] Received DOM event beforeunload for about:blank 1572039863111 Marionette TRACE [4294967297] Received DOM event pagehide for about:blank ###!!! [Parent][MessageChannel] Error: (msgtype=0xA200011572039941247 webdriver::server DEBUG Deleting session 1572039941268 geckodriver::marionette DEBUG Browser process stopped: signal: 9 1572039941387 webdriver::server DEBUG <- 500 Internal Server Error {"value":{"error":"unknown er,name=PVsync::Msg_Notify) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0xA20001,name=PVsync::Msg_Notify) Channel error: cannot send/recv

###!!! [Parent][MessageChannel] Error: (msgtype=0xA20001,name=Pror","message":"Failed to decode response from marionette","stacktrace":""}} Vsync::Msg_Notify) Channel error: cannot send/recv

org.openqa.selenium.WebDriverException: Failed to decode response from marionette Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'jenkins2', ip: 'IPAddress', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-957.21.3.el7.x86_64', java.version: '1.8.0_211' Driver info: org.openqa.selenium.firefox.FirefoxDriver Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 67.0, javascriptEnabled: true, moz:accessibilityChecks: false, moz:buildID: 20190516215225, moz:geckodriverVersion: 0.26.0, moz:headless: true, moz:processID: 22236, moz:profile: /tmp/rust_mozprofilebVFh70, moz:shutdownTimeout: 60000, moz:useNonSpecCompliantPointerOrigin: false, moz:webdriverClick: true, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, platformVersion: 3.10.0-957.21.3.el7.x86_64, rotatable: false, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify} Session ID: c3ecc219-5223-41e7-9d84-2c83d32dd33e 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.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552) at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:277) at driver.get(url);(LandingPage.java:387) at accessFirefox();(LandingPage.java:339) at accessPage(browser);(LandingPage.java:46) at landingPage = new LandingPage();(BasicTest.java:14) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) 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 org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 87.51 sec <<< FAILURE! testLogin(BasicTest) Time elapsed: 87.238 sec <<< ERROR! java.lang.NullPointerException at BasicTest.testLogin(BasicTest.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) 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 org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

HStine avatar Oct 25 '19 21:10 HStine

This seems to be a problem with the page you are loading. Are you able to provide more details of the web page under test? Could you create a minimized HTML testcase which is still affected? If not I could only suggest to try a debug build of Firefox which might give us some more information. I can give a link later.

Also please note that attaching logs is better than just copying the content in this issue. The latter makes it harder to follow the conversation. Thanks.

whimboo avatar Oct 30 '19 09:10 whimboo

I'm getting a similar error. It looks like FF crashes

1576668430798	Marionette	DEBUG	0 -> [0,38,"WebDriver:ElementClick",{"id":"c2b80173-8b8b-4743-aa88-61e7fde4a201"}]
[Parent 815, Gecko_IOThread] WARNING: pipe error (61): Connection reset by peer: file /build/firefox-esr-oQY1tQ/firefox-esr-68.3.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 358

###!!! [Parent][MessageChannel] Error: (msgtype=0x1E0074,name=PBrowser::Msg_StopIMEStateManagement) Channel error: cannot send/recv


###!!! [Parent][MessageChannel] Error: (msgtype=0x1E008F,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv

1576668431222	Marionette	TRACE	[11] Frame script loaded
1576668431223	Marionette	TRACE	[11] Frame script registered
A content process crashed and MOZ_CRASHREPORTER_SHUTDOWN is set, shutting down

The firefox process is gone, but there are no crash reports in the .mozilla folder. Is that because of -headless mode? How to debug this further?

rustyx avatar Dec 18 '19 20:12 rustyx

Please see https://firefox-source-docs.mozilla.org/testing/geckodriver/CrashReports.html in how to retrieve a crash report and let us know about its details. Thanks.

whimboo avatar Dec 23 '19 13:12 whimboo

Hi @whimboo,

I got this error too. Here is my log file. I try to follow how to get a crash report but I'm stuck because I deploy them to docker not MacOS.

Will update to you ASAP. Thank you. geckodriver.log

ghost avatar Jan 07 '20 07:01 ghost

@minhthehash you also experience a content crash of Firefox. Please read my last comment from 15 days ago in how to retrieve and submit the crash.

whimboo avatar Jan 07 '20 09:01 whimboo

@whimboo Please check, I followed the crash report guide, but it does not have any dumps... My script has been working for 50 days, starting today, all of them throw error selenium.common.exceptions.WebDriverException: Message: Failed to decode response from marionette. OS has been running for 51 days.

  • CentOS 7.6
  • Python 3.6
  • Firefox develop edition: 71.0b12
  • geckodriver: 0.26.0
  • selenium: 3.141.0
[root@VM_0_17_centos momoAini]# vim test.py
[root@VM_0_17_centos momoAini]# python3 test.py
testing start
*** Using profile: /tmp/tmpn7zr7dmg.selenium
Traceback (most recent call last):
  File "test.py", line 28, in <module>
    driver.get("https://www.github.com")
  File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 333, in get
    self.execute(Command.GET, {'url': url})
  File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Failed to decode response from marionette

[root@VM_0_17_centos momoAini]# ls /tmp/tmpn7zr7dmg.selenium
addons.json            cert9.db              cookies.sqlite              extensions           handlers.json  permissions.sqlite  prefs.js               sessionCheckpoints.json             storage         webappsstore.sqlite
addonStartup.json.lz4  compatibility.ini     crashes                     extensions.json      key4.db        pkcs11.txt          safebrowsing           sessionstore-backups                storage.sqlite  webappsstore.sqlite-wal
bookmarkbackups        containers.json       datareporting               favicons.sqlite      lock           places.sqlite       saved-telemetry-pings  shield-preference-experiments.json  thumbnails
cache2                 content-prefs.sqlite  extension-preferences.json  favicons.sqlite-wal  minidumps      places.sqlite-wal   search.json.mozlz4     startupCache                        times.json
[root@VM_0_17_centos momoAini]# ls /tmp/tmpn7zr7dmg.selenium/minidumps/
[root@VM_0_17_centos momoAini]# cat test.py
#!/usr/bin/python3

print("testing start")
import tempfile

from selenium import webdriver
from selenium.webdriver.firefox.options import Options

# Custom profile folder to keep the minidump files
profile = tempfile.mkdtemp(".selenium")
print("*** Using profile: {}".format(profile))

# Use the above folder as custom profile
opts = Options()
opts.log.level = "trace"
opts.add_argument("-profile")
opts.add_argument(profile)
opts.binary = "/usr/bin/firefoxde"

opts.add_argument("--headless")

driver = webdriver.Firefox(options=opts,
    # hard-code the Marionette port so geckodriver can connect
    service_args=["--marionette-port", "2828"])


# Your test code which crashes Firefox
driver.get("https://www.github.com")
print("testing all done!")
[root@VM_0_17_centos momoAini]# cat geckodriver.log
1578494989814   mozrunner::runner       INFO    Running command: "/usr/bin/firefoxde" "-marionette" "-profile" "/tmp/tmp4ir8l0ps.selenium" "-foreground" "-no-remote"
1578494989817   geckodriver::marionette DEBUG   Waiting 60s to connect to browser on 127.0.0.1:2828
Error: no DISPLAY environment variable specified
1578494989917   mozrunner::runner       DEBUG   Killing process 23437
1578494989917   webdriver::server       DEBUG   <- 500 Internal Server Error {"value":{"error":"unknown error","message":"invalid argument: can't kill an exited process","stacktrace":""}}
1578495100577   mozrunner::runner       INFO    Running command: "/usr/bin/firefoxde" "-marionette" "-profile" "/tmp/tmp_5da6_2d.selenium" "-foreground" "-no-remote"
1578495100579   geckodriver::marionette DEBUG   Waiting 60s to connect to browser on 127.0.0.1:2828
Error: no DISPLAY environment variable specified
1578495100679   mozrunner::runner       DEBUG   Killing process 23798
1578495100680   webdriver::server       DEBUG   <- 500 Internal Server Error {"value":{"error":"unknown error","message":"invalid argument: can't kill an exited process","stacktrace":""}}
1578495132004   mozrunner::runner       INFO    Running command: "/usr/bin/firefoxde" "-marionette" "-profile" "/tmp/tmpqjyuqqnw.selenium" "-foreground" "-no-remote"
1578495132006   geckodriver::marionette DEBUG   Waiting 60s to connect to browser on 127.0.0.1:2829
Error: no DISPLAY environment variable specified
1578495132106   mozrunner::runner       DEBUG   Killing process 23910
1578495132106   webdriver::server       DEBUG   <- 500 Internal Server Error {"value":{"error":"unknown error","message":"invalid argument: can't kill an exited process","stacktrace":""}}
1578495573734   mozrunner::runner       INFO    Running command: "/usr/bin/firefoxde" "-marionette" "-profile" "/tmp/tmpj3c0_uxv.selenium" "--headless" "-foreground" "-no-remote"
1578495573737   geckodriver::marionette DEBUG   Waiting 60s to connect to browser on 127.0.0.1:2829
*** You are running in headless mode.
1578495592250   mozrunner::runner       DEBUG   Killing process 25250
1578495592258   webdriver::server       DEBUG   <- 500 Internal Server Error {"value":{"error":"unknown error","message":"invalid argument: can't kill an exited process","stacktrace":""}}
1578496090382   mozrunner::runner       INFO    Running command: "/usr/bin/firefoxde" "-marionette" "-profile" "/tmp/tmpn7zr7dmg.selenium" "--headless" "-foreground" "-no-remote"
1578496090384   geckodriver::marionette DEBUG   Waiting 60s to connect to browser on 127.0.0.1:2828
*** You are running in headless mode.
1578496096007   geckodriver::marionette DEBUG   Connection to Marionette established on 127.0.0.1:2828.
1578496096370   webdriver::server       DEBUG   <- 200 OK {"value":{"sessionId":"17a6550c-df60-4c42-96a1-4097a843bf0c","capabilities":{"acceptInsecureCerts":true,"browserName":"firefox","browserVersion":"71.0","moz:accessibilityChecks":false,"moz:buildID":"20191121155457","moz:geckodriverVersion":"0.26.0","moz:headless":true,"moz:processID":27094,"moz:profile":"/tmp/tmpn7zr7dmg.selenium","moz:shutdownTimeout":60000,"moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true,"pageLoadStrategy":"normal","platformName":"linux","platformVersion":"3.10.0-957.21.3.el7.x86_64","rotatable":false,"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify"}}}
1578496096429   webdriver::server       DEBUG   -> POST /session/17a6550c-df60-4c42-96a1-4097a843bf0c/url {"url": "https://www.github.com"}
1578496111860   webdriver::server       DEBUG   Deleting session
1578496111942   geckodriver::marionette DEBUG   Browser process stopped: signal: 9
1578496112040   webdriver::server       DEBUG   <- 500 Internal Server Error {"value":{"error":"unknown error","message":"Failed to decode response from marionette","stacktrace":""}}
[root@VM_0_17_centos momoAini]#
[root@VM_0_17_centos momoAini]# firefoxde -v
Mozilla Firefox 71.0b12
[root@VM_0_17_centos momoAini]# geckodriver -V
geckodriver 0.26.0 (e9783a644016 2019-10-10 13:38 +0000)

The source code of this program is available from
testing/geckodriver in https://hg.mozilla.org/mozilla-central.

This program is subject to the terms of the Mozilla Public License 2.0.
You can obtain a copy of the license at https://mozilla.org/MPL/2.0/.
[root@VM_0_17_centos momoAini]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@VM_0_17_centos momoAini]# pip3 list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
DateTime (4.3)
pip (9.0.3)
pytz (2019.3)
selenium (3.141.0)
setuptools (39.2.0)
urllib3 (1.25.7)
zope.interface (4.7.1)

h888866j avatar Jan 08 '20 15:01 h888866j

@h888866j please attach the full trace log to this issue. The excerpt from above doesn't show any sight from a crash.

whimboo avatar Jan 09 '20 09:01 whimboo

@whimboo , I removed previous log. But full log has been included in my last comment(cat geckodriver.log shows all of the logs). So I ran the script again to get logs(script failed with selenium.common.exceptions.WebDriverException: Message: Failed to decode response from marionette ). geckodriver.log has only a few line: geckodriver.log tmp408fxybf.selenium.zip

h888866j avatar Jan 09 '20 15:01 h888866j

@h888866j it's hard to see what the problem is. Maybe you could test again with a debug build of Firefox Nightly? It will tell us way more about a possible root cause. You can find such a build here: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/A01ak0qZRTmMxU91Aq-YUQ/runs/0/artifacts/public/build/target.tar.bz2 (64bit)

whimboo avatar Jan 10 '20 12:01 whimboo

@whimboo , when I use firefox nightly you shared, all the testing are done without any issue, never fail. Could it be firefox version issue? When using Firefox and Firefox Develop Edition, script failed.

[root@VM_0_17_centos ffnightly]# firefox -v
Mozilla Firefox 70.0.1
[root@VM_0_17_centos ffnightly]# firefoxde -v
Mozilla Firefox 71.0b12
[root@VM_0_17_centos ffnightly]# firefoxni -v
Mozilla Firefox 74.0a1
[406, Main Thread] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /builds/worker/workspace/build/src/xpcom/base/nsTraceRefcnt.cpp, line 198
[406, Main Thread] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /builds/worker/workspace/build/src/xpcom/base/nsTraceRefcnt.cpp, line 198
[406, Main Thread] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /builds/worker/workspace/build/src/xpcom/base/nsTraceRefcnt.cpp, line 198
nsStringStats
 => mAllocCount:             20
 => mReallocCount:            0
 => mFreeCount:              20
 => mShareCount:             15
 => mAdoptCount:              0
 => mAdoptFreeCount:          0
 => Process ID: 406, Thread ID: 140715311986560

h888866j avatar Jan 10 '20 15:01 h888866j

@whimboo , I just downloaded latest version of firefox and firefox develop edition. New version works fine as well. Those two new version below and the firefox nightly you shared are working.

Firefox develop verion: Mozilla Firefox 73.0b3 Firefox latest: Mozilla Firefox 72.0.1

h888866j avatar Jan 10 '20 15:01 h888866j

@h888866j that is great. So it means that a problem you were facing with older releases of Firefox has been fixed and was shipped as part of the 72.0 release.

I will still keep this issue open given that other problems could still exist.

whimboo avatar Jan 20 '20 09:01 whimboo

Same problem here.

I'm running Selenium inside of docker based on docker image : selenium/node-firefox:3.141.59 (https://github.com/SeleniumHQ/docker-selenium/blob/master/NodeFirefox/Dockerfile)

Firefox version : 72.0.1 geckodriver: 0.26.0

eylonmalin avatar Jan 22 '20 12:01 eylonmalin

@eylonmalin, would you mind providing us some trace logs?

whimboo avatar Jan 24 '20 10:01 whimboo

  • Firefox 72.0.2
  • geckodriver 0.26

I tried the nightly developer build above and did not find a difference in behavior.

I have tests that run fine in Chrome, but when set to FF I see the following in the my trace logs. Elements are being returned, then content process crashes and then elements are not returned. I get the same behavior whether I am running within a lando container or on my machine.

1579885535792	Marionette	DEBUG	0 -> [0,16,"WebDriver:FindElement",{"using":"xpath","value":"(//html/.//*\n[self::input[not(translate(./@type, 'ABCDEFGHIJKLMNOPQR ... pqrstuvwxyz') = 'reset' or translate(./@type, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'hidden')])[1]"}]
1579885535811	Marionette	DEBUG	0 <- [1,16,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"9d23485c-a21a-4388-b6b3-8eeb0fb478e9"}}]
1579885535811	webdriver::server	DEBUG	<- 200 OK {"value":{"element-6066-11e4-a52e-4f735466cecf":"9d23485c-a21a-4388-b6b3-8eeb0fb478e9"}}
1579885535820	webdriver::server	DEBUG	-> GET /session/7f464249-bec9-4e2e-a48e-206f6081eda9/element/9d23485c-a21a-4388-b6b3-8eeb0fb478e9/name 
1579885535821	Marionette	DEBUG	0 -> [0,17,"WebDriver:GetElementTagName",{"id":"9d23485c-a21a-4388-b6b3-8eeb0fb478e9"}]
1579885535965	Marionette	TRACE	[21] Frame script loaded
1579885535965	Marionette	TRACE	[21] Frame script registered
A content process crashed and MOZ_CRASHREPORTER_SHUTDOWN is set, shutting down
1579885536056	Marionette	TRACE	Received DOM event unload for [object HTMLDocument]
1579885536063	Marionette	TRACE	Received observer notification message-manager-disconnect
1579885536064	Marionette	DEBUG	0 <- [1,17,null,{"value":null}]
1579885536066	webdriver::server	DEBUG	<- 200 OK {"value":null}

jonketo avatar Jan 24 '20 17:01 jonketo

@whimboo Unfortunately I can't (it might expose some confidential information ). As work around I used this one : https://github.com/mozilla/geckodriver/issues/1560#issuecomment-503560907

eylonmalin avatar Jan 26 '20 06:01 eylonmalin

@jonketo, you actually hit a crash of Firefox, and specifically of a tab. To retrieve more details about this crash please follow the instructions from https://firefox-source-docs.mozilla.org/testing/geckodriver/CrashReports.html.

Otherwise did you increase the SHM size in the docker container or locally?

whimboo avatar Jan 27 '20 22:01 whimboo

@jonketo I hit the similar issue, I increased the SHM size to 8G, it still can't fix this problem.

Using GeckoDriver version: 0.26.0 Mozilla Firefox 68.2.0ESR Linux docker container: 1.13.1 Selenium 3.141.59

This is run inside of docker with --shm-size 8G

It prompts below error:

[Failure: Failed to decode response from marionette / Build info: version: 'unknown', revision: 'unknown', time: 'unknown' / System info: host: 'docker-165-IF10-11190251', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-862.14.4.el7.x86_64', java.version: '1.8.0_151' / Driver info: org.openqa.selenium.firefox.FirefoxDriver / Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 68.4.2, javascriptEnabled: true, moz:accessibilityChecks: false, moz:buildID: 20200117153614, moz:geckodriverVersion: 0.26.0, moz:headless: false, moz:processID: 25644, moz:profile: /tmp/rust_mozprofilezMtJG6, moz:shutdownTimeout: 60000, moz:useNonSpecCompliantPointerOrigin: false, moz:webdriverClick: true, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, platformVersion: 3.10.0-862.14.4.el7.x86_64, rotatable: false, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify} / Session ID: 200809be-015d-4485-b4b1-e66238941000]

JackJiaJJ avatar Jan 30 '20 07:01 JackJiaJJ

I have a similar problem.

  • WSL Ubuntu 18.04 on Windows 10 Home
  • geckodriver 0.26.0
  • firefox 72.0.2
  • pipenv 2018.11.26
  • python 3.6.9
  • selenium 3.141.0
ffbug.py
import tempfile

from selenium.webdriver import Firefox
from selenium.webdriver.firefox.options import Options

profile = tempfile.mkdtemp(".selenium")
print("*** Using profile: {}".format(profile))

opts = Options()
opts.headless = True
opts.add_argument("-profile")
opts.add_argument(profile)
opts.binary = "/usr/bin/firefox"

driver = Firefox(options=opts,
                service_args=["--marionette-port", "2828"])

driver.get('http://example.com/')
run in WSL via pipenv
djbrown@DESKTOP-65P6D75:~/ffbug$ pipenv run python -m ffbug

*** Using profile: /tmp/tmpwn2u28i1.selenium
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/djbrown/ffbug/ffbug.py", line 20, in <module>
    service_args=["--marionette-port", "2828"])
  File "/home/djbrown/.local/share/virtualenvs/ffbug-tiCGUh3D/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in __init__
    keep_alive=True)
  File "/home/djbrown/.local/share/virtualenvs/ffbug-tiCGUh3D/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/home/djbrown/.local/share/virtualenvs/ffbug-tiCGUh3D/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/home/djbrown/.local/share/virtualenvs/ffbug-tiCGUh3D/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/djbrown/.local/share/virtualenvs/ffbug-tiCGUh3D/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: invalid argument: can't kill an exited process
geckodriver.log
1580431111878	mozrunner::runner	INFO	Running command: "/usr/bin/firefox" "-marionette" "-headless" "-profile" "/tmp/tmpwn2u28i1.selenium" "-foreground" "-no-remote"
1580431111880	geckodriver::marionette	DEBUG	Waiting 60s to connect to browser on 127.0.0.1:2828
*** You are running in headless mode.
Exiting due to channel error.

###!!! [Parent][MessageChannel] Error: (msgtype=0x370032,name=PContent::Msg_UpdateSharedData) Channel error: cannot send/recv

[Parent 4715, Main Thread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-3lQvl1/firefox-72.0.2+build1/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 23

###!!! [Parent][MessageChannel] Error: (msgtype=0x370058,name=PContent::Msg_GMPsChanged) Channel error: cannot send/recv

Exiting due to channel error.
Exiting due to channel error.

###!!! [Parent][MessageChannel] Error: (msgtype=0x370032,name=PContent::Msg_UpdateSharedData) Channel error: cannot send/recv

[Parent 4715, Main Thread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-3lQvl1/firefox-72.0.2+build1/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 23

###!!! [Parent][MessageChannel] Error: (msgtype=0x370020,name=PContent::Msg_PreferenceUpdate) Channel error: cannot send/recv


###!!! [Parent][MessageChannel] Error: (msgtype=0x370020,name=PContent::Msg_PreferenceUpdate) Channel error: cannot send/recv


###!!! [Parent][MessageChannel] Error: (msgtype=0x370020,name=PContent::Msg_PreferenceUpdate) Channel error: cannot send/recv


###!!! [Parent][MessageChannel] Error: (msgtype=0x370020,name=PContent::Msg_PreferenceUpdate) Channel error: cannot send/recv


###!!! [Parent][MessageChannel] Error: (msgtype=0x370020,name=PContent::Msg_PreferenceUpdate) Channel error: cannot send/recv


###!!! [Parent][MessageChannel] Error: (msgtype=0x370020,name=PContent::Msg_PreferenceUpdate) Channel error: cannot send/recv


###!!! [Parent][MessageChannel] Error: (msgtype=0x370020,name=PContent::Msg_PreferenceUpdate) Channel error: cannot send/recv


###!!! [Parent][MessageChannel] Error: (msgtype=0x370020,name=PContent::Msg_PreferenceUpdate) Channel error: cannot send/recv


###!!! [Parent][MessageChannel] Error: (msgtype=0x370020,name=PContent::Msg_PreferenceUpdate) Channel error: cannot send/recv


###!!! [Parent][MessageChannel] Error: (msgtype=0x370020,name=PContent::Msg_PreferenceUpdate) Channel error: cannot send/recv


###!!! [Parent][MessageChannel] Error: (msgtype=0x1E0074,name=PBrowser::Msg_UpdateDimensions) Channel error: cannot send/recv

1580431115205	mozrunner::runner	DEBUG	Killing process 4715
1580431115205	webdriver::server	DEBUG	<- 500 Internal Server Error {"value":{"error":"unknown error","message":"invalid argument: can't kill an exited process","stacktrace":""}}

There are no logs or crash reports in the firefox profile directory.

Update using --memory 2048mb, --shm-size 8g and firefox 73.0b6 didn't help.

djbrown avatar Jan 31 '20 00:01 djbrown

Please note that for everyone seeing that but being on a different platform the underlying reason might be different. As such please really provide a memory dump of the crash. See https://firefox-source-docs.mozilla.org/testing/geckodriver/CrashReports.html in how to get one.

whimboo avatar Feb 04 '20 10:02 whimboo

@whimboo: "Please note that for everyone seeing that but being on a different platform the underlying reason might be different. As such please really provide a memory dump of the crash. See https://firefox-source-docs.mozilla.org/testing/geckodriver/CrashReports.html in how to get one."

How come my minidumps directory stays empty? 🤔 I used the code template provided in Analyzing crash data of Firefox that you reference.

djbrown avatar Feb 04 '20 11:02 djbrown

If it's empty there wasn't a crash or no minidump has been recorded due to some reason. Do you have a trace log from such a case? If it is the same as for your second last comment, it looks like that it is related to a startup crash, and that the crash reporter hasn't been initialized. Would you mind trying a debug build of Firefox? It should give way more log entries. You can download it from: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/VTnTutNBTfOnhWGkeSWQPA/runs/0/artifacts/public/build/target.tar.bz2

whimboo avatar Feb 05 '20 15:02 whimboo

I also get this error but only when running headless.

M0NWY avatar Feb 27 '20 22:02 M0NWY

I just detected this error a few minutes ago when running my continuous integration job which executes end-to-end tests at Browserstack. I can confirm this happens right now.

Is there any expectation on what's the reason behind or how to resolve it?

EDIT: I confirm it only happens on Firefox version 74 and 75 Beta.

davidpelayo avatar Mar 25 '20 09:03 davidpelayo

FYI, My workaround was to use PyVirtualDisplay to convince it that it wasn't headless !

M0NWY avatar Mar 25 '20 12:03 M0NWY

@davidpelayo mind filing a new issue please? As best putbrowserstack in the summary and mention the regression + adding a trace log as requested on the new issue page. Thanks.

whimboo avatar Mar 25 '20 13:03 whimboo