Process timed out after waiting for 45000 ms

21 November 2014

I was seeing the following error on the automation platform.


SetUp : System.InvalidOperationException : Process timed out after waiting for 45000 ms.
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)

I have reviewed the FireFoxDriver source and think it's the OpenQA.Selenium.Firefox.FireFoxBinary.Timeout() property. The default timeout is private TimeSpan timeout = TimeSpan.FromSeconds(45);.

So, I introduced the following test code using the FirefoxDriver directly:

var driver = new FirefoxDriver(new FirefoxBinary() { Timeout = TimeSpan.FromSeconds(1)},new FirefoxProfile());

and got

OpenQA.Selenium.WebDriverException : Failed to start up socket within 1000 ms. Attempted to connect to the following addresses:

I assume that this exception is translated to the exception above; although; I never got to reading the source code.


Using the RemoteWebDriver I was unable to find a way to change the Timeout on the FireFoxBinary.

It looks related to the time it takes to start the FireFoxBinary. I guess that 45 seconds is an acceptable time to wait when starting FireFox determined by the Selenium community.

I now have 2 options:

  • Change the default Timeout value and compile my own version.
  • Look into why the Binary takes > 45 seconds to start.
    • Possibly resource starvation at the time it's starting?
    • I noticed that the browser was being launched while some of the local websites and services were spinning up.
    • Is it correct to have the browser on the same machine as the components?
    • Machine not powerful enough.

I would prefer not to maintain my own version of the Standalone Selenium Server!

Automation Selenium Testing