I've just updated the chromedriver.exe file on my server (to version 89.0), and I've now this error happening:
[17104] OpenQA.Selenium.WebDriverException: unknown error: Chrome failed to start: crashed.
[17104] (unknown error: DevToolsActivePort file doesn't exist)
[17104] (The process started from chrome location C:\Program Files (x86)\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[17104] at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
[17104] at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
[17104] at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
[17104] at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
[17104] at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options, TimeSpan commandTimeout)
The code is:
var options = new ChromeOptions();
options.AddArguments("--headless");
using (ChromeDriver chromeDriver = new ChromeDriver(ChromeDriverService.CreateDefaultService(), options, TimeSpan.FromSeconds(180)))
{ ..... }
This error happens from an ASP.NET website, but not from a .exe app; and this is the same code running. I don't understand what happens (and it worked with the previous chromedriver file)
EDIT
I've downloaded Chrome v87.0 and the matching chromedriver, and it works now using: ChromeDriverService.CreateDefaultService("C:\chrome87-win"). Something is definitely wrong with v89....