selenium firefox.get() function fails to decode response from marionette in python

org.openqa.selenium.webdriverexception: failed to decode response from marionette java
geckodriver
selenium.common.exceptions.nosuchwindowexception: message: browsing context has been discarded
tried to run command without establishing a connection
firefox driver for selenium python
selenium firefox driver
geckodriver selenium java
geckodriver firefox crash

Using selenium 3.01 with python3.5 to firefox 4.7; driver.get() function does not return to main script after second fetch. Similar to question asked (Jun 16 by user6472032) I use driver.get() to initially fetch a page and complete the login. When get() is used to select a second page at the same remote site the page opens but the python script hangs until the page is closed manually when the shell reports this error:

driver.get('https://mso.morganstanleyclientserv.com/shell/account#/holdings')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\Python 3.5\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 2
    self.execute(Command.GET, {'url': url})
  File "C:\Program Files\Python 3.5\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 2
    self.error_handler.check_response(response)
  File "C:\Program Files\Python 3.5\lib\site-packages\selenium\webdriver\remote\errorhandler.py", lin
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Failed to decode response from marionette

Is there any alternative way to get this rather fundamental function to work twice without changing the main script? Perhaps a different set of calls to avoid the error handler? Thanks

Assuming that you meant firefox version 47.0.0, there is this note in the Selenium changelog for v3.0.0:

* Firefox is only fully supported at version 47.0.1 or earlier. Support
  for later versions of firefox is provided by geckodriver, which is
  based on the evolving W3C WebDriver spec, and uses the wire protocol
  in that spec, which is liable to change without notice.
* You may wish to choose an ESR release such as 45.4.0esr or earlier.
* Firefox 47.0.0 is not supported at all.

This is the last mention of firefox version by which I deduce that it still applies to v3.0.2.

Bottom-line, I would heed the advice about ESR 45.4.0esr if I were you.

UPDATE: I have been looking into this more myself. Selenium 3 introduced a dependency on the geckodriver to support firefox. The geckodriver website has this to say, "Marionette and geckodriver are not yet feature complete. This means it does not yet offer full conformance with the WebDriver standard or complete compatibility with Selenium." I suggest backing off to Selenium 2.53 and firefox esr 38.8.0 until geckodriver is ready for primetime.

"Failed to decode response from marionette" message in Python , Firefox, Geckodriver, Selenium and PyVirtualDisplay have all been updated to their latest versions. In the discussion Failed to decode response from marionette with Firefox of Zombie process that hangs even after invoking driver .quit() . This is an example test case using a wait function for Nextcloud. Teams. Q&A for Work. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information.

Was still getting this exception even when using latest versions of Firefox and geckodriver (58.0.2, and 0.19.1, respectively, at the time of writing this). Wasn't getting it with driver.get() but with driver.quit() and it was because I had closed my pyvirtualdisplay before quitting the driver.

Works:

from selenium import webdriver                                                       
from pyvirtualdisplay import Display                                                 

display = Display(visible=0, size=(800, 600))                                        
display.start()                                                                      
driver = webdriver.Firefox()                                                         

driver.quit()                                                                        
display.stop()

Doesn't work:

from selenium import webdriver                                                       
from pyvirtualdisplay import Display                                                 

display = Display(visible=0, size=(800, 600))                                        
display.start()                                                                      
driver = webdriver.Firefox()                                                         

display.stop()
driver.quit()                                                                        

1541279, Intermittent /webdriver/tests/get_title/user_prompts.py UnknownErrorException: unknown error (500): Failed to decode response from marionette. Summary < function check_user_prompt_closed_without_exception at 0x104c57758> 21: 56:08 INFO - STDOUT: # The driver could have already been deleted the session . Selenium::Firefox->new( marionette_enabled => 1, marionette_binary_port => 12345, ); Attempting to specify a marionette_binary_port in conjunction with setting marionette_enabled does not make sense and will most likely not do anything useful. marionette_enabled. Optional: specify whether marionette should be enabled or not. By default

I'm able to reproduce the problem with Firefox 47.0.1 and Selenium 3.0.1. Try adding the below code to eliminate this error.

System.setProperty("webdriver.gecko.driver", "C:\\SW\\geckodriver-v0.13.0-win64\\geckodriver.exe");
DesiredCapabilities capabilities = DesiredCapabilities.firefox();   
capabilities.setCapability("marionette", false);
WebDriver driver = new FirefoxDriver(capabilities);
driver.get("https://www.google.com");

Failed to decode response from marionette with Firefox >= 65 � Issue , Failed to decode response from marionette with Firefox >= 65 #1560 Version: 0.24.0; Platform: Linux; Firefox: 65, 66, 67, 69 (nightly); Selenium: python=3.7 @whimboo This bug is related to zombie processes that hangs after driver.quit(), I couldn't find an open bug/issue for the zombie process issue,� Computer Scientist with 20+ years experience. Was with the IBM Consulting Group for a few years before I put out my own shingle. I have been focused on Automated Testing with Selenium-WebDriver, Cucumber, Java, Ruby and IBM Rational Functional Tester. I have also led test teams for clients large and small.

Failed to decode response from marionette (Exiting due to channel , Python 3.7, Selenium 3.141.0 Failed to decode response from marionette with Firefox >= 65 #1560 folder as custom profile opts = Options() opts.log.level = " trace" opts.add_argument("-profile") opts.add_argument(profile) opts.binary You can obtain a copy of the license at https://mozilla.org/MPL/2.0/. Selenium IDE is an integrated development environment for Selenium tests. It is implemented as a Firefox extension, and allows you to record, edit, and debug tests. Only with Firefox—Get Firefox Now

Failed to decode response from marionette - Error to open , If I close the window, I get the Marionette exception. from selenium import webdriver browser = webdriver.Firefox(). image. Error: Traceback (most� 2 Using bindkey to call a function in zsh requires pressing enter after function runs Jun 4 2 How to make AngularStrap typeahead selection uneditable Aug 21 '16 1 Receive response from Instagram API call with AngularJS Sep 4 '16

Python failed to decode response from marionette, 関連リンク. "Failed to decode response from marionette" message in Python . selenium firefox.get() function fails to decode response from . Automation Script for Selenium. To access newly created Firefox profile in Selenium Webdriver software test, we need to use webdrivers inbuilt class 'profilesIni' and it's method getProfile as shown below. Selenium code for the profile. This is a code to implement a profile, which can be embedded in the selenium code.

Comments
  • use firefox>=48 with selenium 3