title: Selenium Teamcity Chromedriver IWebDriver chrome does not launch
body: <p>Jammed up trying to execute selenium tests remotely. We are attempting to execute our Selenium tests on our TeamCity server. I know that is a bad idea but that's not why I am here. 
  super basic Nunit selenium webdriver / chrome. </p>
  
  <pre><code> [TestFixture]
  public class Mytest1
  {
      private IWebDriver driver;
      private StringBuilder verificationErrors;
      private string baseURL;
      private bool acceptNextAlert = true;
  
      [SetUp]
      public void SetupTest()
      {
  
          ChromeOptions options = new ChromeOptions();
          options.AddArgument("\"no-sandbox\"");
          driver = new ChromeDriver(options);
          baseURL = "http://example.com/";
          verificationErrors = new StringBuilder();
      }
  
      [TearDown]
      public void TeardownTest()
      {
          try
          {
              driver.Quit();
          }
          catch (Exception)
          {
              // Ignore errors if unable to close the browser
          }
          Assert.AreEqual("", verificationErrors.ToString());
      }
  
      [Test]
      public void TheMytest1Test()
      {
          driver.Navigate().GoToUrl(baseURL + "/somepage/");
          driver.FindElement(By.LinkText("linktest")).Click();
          driver.FindElement(By.CssSelector("div.container-div.caption")).Click();
      }
  </code></pre>
  
  <p>When I run this from VS I see the "starting chromeDriver ver 2.22 etc.. only local connections allowed. " The test runs 100%. 
  I commit my changes to teamcity (v9.x) where I have an Nunit task runner. against the test. This is where it dies out. Testing directly on the build server I see the following in my build log. </p>
  
  <pre><code>    [18:07:43][Step 3/5] Starting ChromeDriver 2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b) on port 50513
  [18:07:43][Step 3/5] Only local connections are allowed.
  [18:08:46]
  [SeleniumTests.Mytest1.TheMytest1Test] OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http://localhost:50513/session timed out after 60 seconds.
    ----&gt; System.Net.WebException : The operation has timed out
  TearDown : System.NullReferenceException : Object reference not set to an instance of an object.
  [18:08:46]
  [SeleniumTests.Mytest1.TheMytest1Test]    at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
     at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
     at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
     at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
     at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
     at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
     at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options)
     at SeleniumTests.Mytest1.SetupTest()
  --WebException
     at System.Net.HttpWebRequest.GetResponse()
     at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
  --TearDown
     at SeleniumTests.Mytest1.TeardownTest()
  </code></pre>
  
  <p>I can it is trying to do something with chrome.exe but just won't get to it. This is the error that keeps popping up. Any ideas how to get around this? My assumptions are that this a permissions related issue but completely stuck. </p>
  
  <p><a href="https://i.stack.imgur.com/CNGxH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CNGxH.png" alt="enter image description here"></a></p>