-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Description
What happened?
We have developed web scraping tool to post data in application that will be opened in chrome browser. We are able to run smoothly on windows. While running the same on Ubuntu 22.04 LTS, below is the case:
- While running through VS Code in debug mode it's working fine.
- When we publish it and deploy the same in systemd service then it's showing below exception:
Starting ChromeDriver 127.0.6533.99 (f31af5097d90ef5ae5bd7b8700199bc6189ba34d-refs/branch-heads/6533@{#1910}) on port 42457 Only local connections are allowed. Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. ChromeDriver was started successfully. [13:22:02 ERR] session not created: Chrome failed to start: exited normally. (session not created: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (SessionNotCreated) System.InvalidOperationException: session not created: Chrome failed to start: exited normally. (session not created: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (SessionNotCreated) at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute) at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary2 parameters)
at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters) at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities) at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities) at OpenQA.Selenium.Chromium.ChromiumDriver..ctor(ChromiumDriverService service, ChromiumOptions options, TimeSpan commandTimeout) at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options, TimeSpan commandTimeout) at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options)
Please note, I am able to run with headless options but we required to user interaction before proceeding for operation due to security reasons.
How can we reproduce the issue?
using IWebDriver driver = new ChromeDriver();
var webUrl = "https://test.automation.com/";
Console.WriteLine("Waiting 15 Seconds for Warmup !!");
await Task.Delay(15000);
Console.WriteLine($"Opening Url:{webUrl} !!");
driver.Navigate().GoToUrl(webUrl); // link is the target url
var name = driver.FindElement(By.Id("name"));
var email = driver.FindElement(By.Id("email"));
var mobile = driver.FindElement(By.Id("mobile"));
var company = driver.FindElement(By.Id("company"));
var notes = driver.FindElement(By.Id("message"));
name.SendKeys("Pravin Yadav");
email.SendKeys("pravin.yadav@nidoworld.com");
mobile.SendKeys("123456784654");
company.SendKeys("NIDO Machineries Private Limited");
notes.SendKeys("Test Message from Web Scraping");Relevant log output
Starting ChromeDriver 127.0.6533.99 (f31af5097d90ef5ae5bd7b8700199bc6189ba34d-refs/branch-heads/6533@{#1910}) on port 42457
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[13:22:02 ERR] session not created: Chrome failed to start: exited normally.
(session not created: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (SessionNotCreated)
System.InvalidOperationException: session not created: Chrome failed to start: exited normally.
(session not created: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (SessionNotCreated)
at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
at OpenQA.Selenium.Chromium.ChromiumDriver..ctor(ChromiumDriverService service, ChromiumOptions options, TimeSpan commandTimeout)
at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options, TimeSpan commandTimeout)
at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options)Operating System
Ubuntu 22.04 LTS
Selenium version
4.23.0 with C# with .NET 8
What are the browser(s) and version(s) where you see this issue?
Chrome 127.0.6533.99
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 127.0.6533.11900
Are you using Selenium Grid?
No response