title: "An unhandled exception of type 'System.InvalidOperationException' occurred in WebDriver.dll" error coming up
body: <p>I am running a simple code to launch the Firefox browser.
  Running it in Visual Studio. Below is the code:</p>
  
  <pre><code>IWebDriver driver3 = new RemoteWebDriver(
            new Uri("http://localhost:4444/wd/hub"),
            DesiredCapabilities.Firefox());
  driver3.Url = "http://www.google.com";
  </code></pre>
  
  <p>Getting the error exception as:</p>
  
  <blockquote>
    <p>An unhandled exception of type 'System.InvalidOperationException' occurred in WebDriver.dll
    Additional information: Error forwarding the new session Empty pool of VM for setup Capabilities [{browserName=firefox, version=, platform=ANY}]</p>
  </blockquote>
  
  <p>Can anyone please tell me how to fix this?<br>
  I have done the following:</p>
  
  <ol>
  <li>I am running a selenium grid as role=hub, with localhost:4444 as the port.</li>
  <li>Have added the PATH environment variable in System properties as "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"</li>
  <li>I have also tried downgrading the selenium jars versions and even browser versions but no result.</li>
  </ol>
  
  <p>Can anyone please tell how to fix this?</p>
  
  <p>What would be the correct code to fix this issue?</p>