Cannot start the driver service on http://localhost

10,701

Solution 1

Changed my Target Framework to .NET Core 2.1 (previously set to .net core 3.0) now its working.

Solution 2

In my case, it was because there are too many background chrome process running. Run cmd as admin and use taskkill /f /im chromedriver.exe to kill all chrome driver instances and use taskkill /f /im chrome.ext /t to kill all chrome instances made it work.

Share:
10,701
THATO MOLEFE
Author by

THATO MOLEFE

Updated on June 09, 2022

Comments

  • THATO MOLEFE
    THATO MOLEFE almost 2 years

    I would kindly like to ask for help an issue I have running selenium on on a windows server without an interface, I get the following error:

    Cannot start the driver service on http://localhost:49906/ at OpenQA.Selenium.DriverService.Start() 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(ChromeDriverService service, ChromeOptions options, TimeSpan commandTimeout) at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options)

  • THATO MOLEFE
    THATO MOLEFE over 5 years
    I ran it in headless mode and I still get the error
  • Werewolfas
    Werewolfas over 5 years
    After some research in the internet I found that similar problem was registered in Selenium GitHub. Can you please check if this solution will work for you OpenQA.Selenium.WebDriverException : Cannot start the driver service on http://localhost/ If this solution does not work can you please provide source code for you WebDriver initialization.