Selenium: Selenium 3: Firefox Driver shuts with Unsupported marionette protocol version exception after launch

Created on 24 Jun 2016  路  14Comments  路  Source: SeleniumHQ/selenium

OS: OSx
Selenium Version: selenium-server-standalone-3.0.0-beta-5d363.jar, selenium-server-standalone-latest.jar
Browser: Firefox
Browser Version: 43
Expected Behavior - Firefox driver should open and subsequent commands should run.
Actual Behavior - Firefox driver throws this exception
1466771927814 Marionette INFO Marionette enabled via build flag and pref
1466771928016 Marionette INFO Listening on port 2828
1466771928517 Marionette INFO Marionette enabled via command-line flag
1466771928569 Marionette INFO Accepted connection conn0 from 127.0.0.1:61582
1466771928570 Marionette DEBUG conn0 client <- {"applicationType":"gecko","marionetteProtocol":2}
1466771928607 Marionette INFO Closed connection conn0
Exception in thread "main" org.openqa.selenium.WebDriverException: Unsupported marionette protocol version 2, required 3 (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.45 seconds
Build info: version: '2.42.2', revision: '75f266f', time: '2014-07-30 09:11:33'
System info: host: 'Anurags-MacBook-Pro.local', ip: '172.16.2.121', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.3', java.version: '1.8.0_65'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
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:422)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:683)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:247)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:130)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:219)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:214)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:131)
at cktest.pagecomponents.PageObjects.TestDataScripts.Rough.main(Rough.java:19)
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:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

Process finished with exit code 1

Steps to reproduce -

Run this test code and observe the behavior.

public class Rough {

public static void main(String[] args){
    System.setProperty("webdriver.gecko.driver", "/Users/anurag/Downloads/wires");
    DesiredCapabilities capabilities = DesiredCapabilities.firefox();

    capabilities.setCapability("marionette", true);
    WebDriver driver = new FirefoxDriver(capabilities);
    driver.get("http://google.com");
}

}

Most helpful comment

@igorquintaes you have to use Firefox 48+, 43 won't work with geckodriver/marionette

All 14 comments

I believe this means you need to upgrade your version of marionette:

https://github.com/mozilla/geckodriver/releases

Yes, I used the latest geckodriver-0.8.0-OSX.gz. Please try launching using the FirefoxDriver using the jar link provided for Selenium bug bash: https://github.com/bugbash/selenium3

Still think its a valid issue, was reproducing on Luke's machine too.

@anurag67475 no, it works fine for me using the latest geckodriver 0.8.0, simon recently changed the code to fallback to wires if geckodriver is not found

updated geckodriver to 0.10 with Selenium 3.0.0-beta-2 on JAVA , it's working on !

Hi All,

I have updated the geckodriver to 0.10 with Selenium 3.0.0-beta-2 on JAVA, its not working still

I presume it may be because of OS version that i'm using which is Win 7 32 bit version, but the latest geckodriver downloaded is 64 bit.

Where can i find latest 32 bit geckodriver.exe ?

https://github.com/mozilla/geckodriver/releases

Could anyone help me on this?

I'm with a similar problem than @NaveenKrishnamurthy is.

My config:
GeckoDriver 0.10,
Selenium 3.0.0-beta2,
Firefox 43.0.1,
Windows 10 64 bit,
geckodriver.exe 64 bit,
C#.

My error:
InvalidOperationException: Unsupported Marionette protocol version 2, required 3

Also method that creates the driver:

private static void SetupFirefoxDriver()
{
            var driverService = FirefoxDriverService.CreateDefaultService(DriversPath, "geckodriver.exe");
            driverService.HideCommandPromptWindow = true;
            driverService.SuppressInitialDiagnosticInformation = true;

            var option = new FirefoxOptions();
            option.AddAdditionalCapability("browser.download.folderList", 2);
            option.AddAdditionalCapability("browser.download.dir", Config.DiretorioDeDownload);
            option.AddAdditionalCapability("browser.download.downloadDir", Config.DiretorioDeDownload);
            option.AddAdditionalCapability("browser.download.defaultFolder", Config.DiretorioDeDownload);

            SeleniumWebDriver.Driver = new FirefoxDriver(driverService, option, TimeSpan.FromSeconds(60));
}

@igorquintaes you have to use Firefox 48+, 43 won't work with geckodriver/marionette

Yes, @lukeis is right...We have to use latest firefox version 48.01 currently in the market.

@lukeis , Could you help me to download geckodriver latest version for 32 bit. I'm using the latest firefox version.

@NaveenKrishnamurthy you will have to request a 32bit geckodriver from that project. I believe they are aware of needing to make one. (I don't work on geckodriver at all, nor do i work at mozilla)

I tried starting the geckodriver first (./geckodriver) then running in Python 3.5 & get:
Message: Missing 'marionetteProtocol' field in handshake

when I use my old Macbook (MAC OS X 10.6.8, FF 30.0 Python 2.6.1) I don't have any issues as I do when I use geckodriver/marionette (MAC OS X 10.12.1, FF 39.0, Python 3.5.2)
That's as far as I've got so far

On debian 8 with Selenium v.3.0.2 using geckodriver v.0.10.0 , 0.11.0 and 0.11.1 running inside a virtualenv where the chromedriver works fine.

geckodriver Errors:

/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
    self.error_handler.check_response(response)
 /local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Missing 'marionetteProtocol' field in handshake

Solution?

@Ricalsin , you are using an outdated version of Firefox

Was this page helpful?
0 / 5 - 0 ratings