title: Why can Selenium GECKO driver for Firefox 48 not start the server?
body: <p>We are running Selenium 2.5.3 in a .Net Automation Testing Project setup as a NUnit Test project.</p>
  
  <p>Everything worked fine with Firefox 47. But with Firefox 48 it stopped working.
  I pulled down the Gecko.exe (version 9) from github.
  I can almost get it running but not quite.</p>
  
  <p>I was getting these errors:
  Additional information: The HTTP request to the remote WebDriver server for URL <a href="http://localhost:53628/session" rel="nofollow">http://localhost:53628/session</a> timed out after 30 seconds.</p>
  
  <p>Additional information: The HTTP request to the remote WebDriver server for URL <a href="http://localhost:55924/session" rel="nofollow">http://localhost:55924/session</a> timed out after 30 seconds.</p>
  
  <p>It seems that the default is to use random ports.
  So I manually set it to Port 7500, opened the port in Windows Firewall, and now I got this:
  Additional information: Cannot start the driver service on <a href="http://localhost:7500/" rel="nofollow">http://localhost:7500/</a></p>
  
  <p>Here is my Code in the WebDriverFactory:</p>
  
  <pre><code>case WebDriverType.Firefox:
                  Log.Info("Starting Firefox ...");
  
                  //string driverPath =
                  //    $"{Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase)}\\wires.exe";
  
                  string driverPath =
                      @"C:\Development2\iRePORT\src\test\csharp\Nete.Ireport.EndToEndTests\bin\Debug\geckodriver.exe";
  
                  FirefoxDriverService driverService = FirefoxDriverService.CreateDefaultService();
                  driverService.FirefoxBinaryPath = driverPath;
                  driverService.Port = 7500;
  
                  FirefoxOptions ffOptions = new FirefoxOptions();
                  ffOptions.IsMarionette = true;
                  driver = new FirefoxDriver(driverService, ffOptions, TimeSpan.FromSeconds(30));
  
                  // driver = new FirefoxDriver(new FirefoxOptions());
  
                  Log.Info("Started");
                  break;
  </code></pre>
  
  <p>I have spent a lot of time on this and I feel like I am very close.
  Does anyone know what piece I am missing?</p>
  
  <hr>
  
  <p>I read something now that makes me think this line;</p>
  
  <pre><code>driverService.FirefoxBinaryPath = driverPath;
  </code></pre>
  
  <p>points to what vesion of Firefox install to use.
  I have now put the driverpath and executable name in the driverService Constructor like this:</p>
  
  <pre><code>case WebDriverType.Firefox:
                  Log.Info("Starting Firefox ...");
  
                  //string driverPath =
                  //    $"{Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase)}\\wires.exe";
  
                  string driverPath =
                      @"C:\Development2\iRePORT\src\test\csharp\Nete.Ireport.EndToEndTests\bin\Debug";
                  string driverExecutableName = "geckodriver.exe";
  
                  FirefoxDriverService driverService = FirefoxDriverService.CreateDefaultService(driverPath, driverExecutableName);
                  // Don't do this!!! This is the executable to the Firefox Version executable.
                  //driverService.FirefoxBinaryPath = driverPath;
                  driverService.Port = 7500;
  
                  FirefoxOptions ffOptions = new FirefoxOptions();
                  ffOptions.IsMarionette = true;
                  driver = new FirefoxDriver(driverService, ffOptions, TimeSpan.FromSeconds(30));
  
                  // driver = new FirefoxDriver(new FirefoxOptions());
  
                  Log.Info("Started");
                  break;
  </code></pre>
  
  <p>So now I am back to getting this error:
  Additional information: Cannot start the driver service on <a href="http://localhost:7500/" rel="nofollow">http://localhost:7500/</a></p>
  
  <hr>
  
  <p>Also if I have:
  driverService.Port = 7200;
  It says "entity not found".  I believe it means it cannot find Gecko.exe.
  If I have:
  driverService.Port = 7500;
  It says:
  Additional information: Cannot start the driver service on <a href="http://localhost:7500/" rel="nofollow">http://localhost:7500/</a></p>