I have SpecFlow tests in a c# project that I would like to get running in a GitLab job. we are doing it with a Windows Docker Image so I don't think we can uses Selenium's standalone chrome. And I have tried running it with the arguments "--headless" and "--disable-gpu". the docker image should also have 2gb so adding --shm-size="2g" doesn't seem like it will help. I'm reading that Windows Docker Images makes it difficult to support GUIs.
the error I see is:
System.AggregateException : One or more errors occurred.\r\n---- OpenQA.Selenium.WebDriverException : unknown error: Chrome failed to start: crashed.\n (chrome not reachable)\n (The process started from chrome location C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)\r\n---- System.NullReferenceException : Object reference not set to an instance of an object.
Edit: the arguments suggested in this post do not work Selenium: WebDriverException:Chrome failed to start: crashed as google-chrome is no longer running so ChromeDriver is assuming that Chrome has crashed
chromeOptions.AddArgument("--no-sandbox"); chromeOptions.AddArgument("--headless"); chromeOptions.AddArgument("--disable-dev-shm-usage");
The Chrome binary is also installed in the default location and it works locally so that isn't the issue.