title: Selenium 3.0.1 with new FirefoxDriver + Marionette stuck on start page
body: <p>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.<br>
  Moreover, I want to use a custom binary for Firefox (version 51.0, Portable App).  </p>
  
  <p>This is my <strong>code</strong>:</p>
  
  <pre><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);
          }
  }
  </code></pre>
  
  <p>The browser actually opens up, but blocked.<br>
  <strong>Logs</strong>:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Why is Geckodriver listening on <code>127.0.0.1:12466</code> but it's trying to connect to Marionette on <code>localhost:52818</code> ?</p>
  
  <p>This is the page where I get stuck:
  <a href="https://i.stack.imgur.com/O8oZU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/O8oZU.png" alt="enter image description here"></a></p>
  
  <p>EDIT:
  It gets stuck in the RemoteWebDriver startSession method:</p>
  
  <pre><code>Response response = this.execute("newSession", parameters);
  </code></pre>