I'm migrating my Selenium app from 2.53 to 3.0.1. First of all, I want to test it in a small app just launching a browser and navigating to a specific page.  

Moreover, I want to use a custom binary for Firefox (version 51.0, Portable App). 

This is my **code**:

```
public class Selenium {

        public static void main(String[] args) {
            WebDriver driver = createFFDriver();
            driver.navigate().to("http:....");
            System.out.println("Finished");
        }

        public static WebDriver createFFDriver(){
            System.setProperty(GeckoDriverService.GECKO_DRIVER_EXE_PROPERTY,"foo/geckodriver64.exe");
            DesiredCapabilities capabilities = DesiredCapabilities.firefox();
            capabilities.setCapability("firefox_binary","foo/firefox.exe");
            return new FirefoxDriver(capabilities);
        }
}

```

The browser actually opens up, but blocked.  

**Logs**:

```
1486713046153   geckodriver INFO    Listening on 127.0.0.1:12466 
Feb 10, 2017 8:50:46 AM org.openqa.selenium.remote.ProtocolHandshake
createSession INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
1486713046731   mozprofile::profile INFO    Using profile path foo\AppData\Local\Temp\rust_mozprofile.p25D0Gb1sBQm
1486713046752   geckodriver::marionette INFO    Starting browser foo\firefox\51.0\FirefoxPortable.exe
1486713046782   geckodriver::marionette INFO    Connecting to Marionette on localhost:52818

```

Why is Geckodriver listening on `127.0.0.1:12466` but it's trying to connect to Marionette on `localhost:52818` ?

This is the page where I get stuck:
[![enter image description here](https://i.stack.imgur.com/O8oZU.png)](https://i.stack.imgur.com/O8oZU.png)

EDIT:
It gets stuck in the RemoteWebDriver startSession method:

```
Response response = this.execute("newSession", parameters);

```