Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChromeDriver service fails to start on Azure when Chrome Options are present #10085

Open
2 of 14 tasks
RedBlack-DevOps opened this issue Jun 18, 2024 · 16 comments
Open
2 of 14 tasks

Comments

@RedBlack-DevOps
Copy link

Description

Hi,

We are having some issues with ChromeDriver on Azure which we can't replicate locally (on Windows 11). The issue seems to be that whenever chrome options are added to chrome driver the driver service fails to start.

As an example the following will work without any issues:

driverPath = Environment.GetEnvironmentVariable("ChromeWebDriver") ?? AppDomain.CurrentDomain.BaseDirectory;
webDriver = new ChromeDriver(ChromeDriverService.CreateDefaultService(driverPath));

However the following will cause the driver service to fail to start:

var chromeOptions = new ChromeOptions();
chromeOptions.SetLoggingPreference(LogType.Browser, LogLevel.All);
chromeOptions.AddArgument("no-sandbox");
chromeOptions.AddUserProfilePreference("profile.default_content_setting_values.automatic_downloads",1);
driverPath = Environment.GetEnvironmentVariable("ChromeWebDriver") ?? AppDomain.CurrentDomain.BaseDirectory;
webDriver = new ChromeDriver(ChromeDriverService.CreateDefaultService(driverPath),chromeOptions);

This will result in a failure like this:

InitBrowser: Cannot start the driver service on http://localhost:50420/ -    at OpenQA.Selenium.DriverService.Start()
   at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
   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(ChromeDriverService service, ChromeOptions options)
   at Rbs.CyBake.Web.CyBake.Test.Ui.Helpers.Drivers.InitBrowser() in D:\a\24\s\Release\Rbs.CyBake.Web.CyBake\Version 1.100\Test.Ui\Helpers\Drivers.cs:line 115

It seems now that whenever the chrome options parameter is passed the service fails to start on Azure. This wasn't the case in the past as they were used without issue.

Our Azure config is https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md

Thanks,
Ian

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 11
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

20240610.1.0

Is it regression?

yes

Expected behavior

The chromedriver service starts as normal when chrome options are added

Actual behavior

the chromedriver fails to start

Repro steps

var chromeOptions = new ChromeOptions(); chromeOptions.SetLoggingPreference(LogType.Browser, LogLevel.All); chromeOptions.AddArgument("no-sandbox"); chromeOptions.AddUserProfilePreference("profile.default_content_setting_values.automatic_downloads",1); driverPath = Environment.GetEnvironmentVariable("ChromeWebDriver") ?? AppDomain.CurrentDomain.BaseDirectory; webDriver = new ChromeDriver(ChromeDriverService.CreateDefaultService(driverPath),chromeOptions);

@kishorekumar-anchala
Copy link
Contributor

Hi @RedBlack-DevOps ,

We're looking into your issue , we will get back to you ASAP.

@kishorekumar-anchala kishorekumar-anchala added awaiting-deployment Code complete; awaiting deployment and/or deployment in progress and removed needs triage labels Jun 20, 2024
@RedBlack-DevOps
Copy link
Author

Hi @RedBlack-DevOps ,

We're looking into your issue , we will get back to you ASAP.

Thankyou for your quick response to this. Please keep us updated.

Thankyou,

Ian

@erik-bershel erik-bershel added Area: Common Tools and removed awaiting-deployment Code complete; awaiting deployment and/or deployment in progress labels Jun 21, 2024
@kishorekumar-anchala
Copy link
Contributor

HI @RedBlack-DevOps ,

We have roll-out to new version , Could you please try to reproduce with the new release.

Thankyou !

@RedBlack-DevOps
Copy link
Author

Thanks for the release but we don't seem to have permission to access that link. Can you advise?

@kishorekumar-anchala
Copy link
Contributor

Hi @RedBlack-DevOps ,

Sorry, it is a private link, kindly try to rerun the pipeline with the new version .
Chrome driver  updated to new version.

@RedBlack-DevOps
Copy link
Author

OK no worries we will try that and let you know.

@kishorekumar-anchala
Copy link
Contributor

HI @RedBlack-DevOps ,

Could you please provide your comments ? Thank you !

@RedBlack-DevOps
Copy link
Author

Hi,

Sorry we (coincidentally) had downtime on our host this morning so we won't know the results until tomorrow morning.

@RedBlack-DevOps
Copy link
Author

HI,

We were able to run this morning. The image version is 20240618.1.0 can you confirm this is correct? We are still seeing the same exception when the service is started.

@kishorekumar-anchala
Copy link
Contributor

HI,

We were able to run this morning. The image version is 20240618.1.0 can you confirm this is correct? We are still seeing the same exception when the service is started.

Yes, Correct.

@RedBlack-DevOps
Copy link
Author

Ok this has not resolved the issue then unfortunately.

@kishorekumar-anchala
Copy link
Contributor

kishorekumar-anchala commented Jun 25, 2024

Ok this has not resolved the issue then unfortunately.

Kindly try to re run the pipeline now . Yesterday it got deployed to all SUs.

if you're facing the same issue, please share the logs to further investigate.

@kishorekumar-anchala
Copy link
Contributor

HI @RedBlack-DevOps , Could you please post your comments ?

@RedBlack-DevOps
Copy link
Author

We still have the same issue. Passing in chrome options causes the driver service to fail:

Bake.Web.CyBake.Test.Ui.SpecFlow.Features.Administration.AdministrationPageFeature.EnsureTheAdministrationAreaManagersStructureIsCorrect EnsureTheAdministrationAreaManagersStructureIsCorrect
2024-06-26T00:35:29.9834802Z RunMessage : DriverPath: C:\SeleniumWebDrivers\ChromeDriver
2024-06-26T00:35:30.1683290Z InitBrowser: Cannot start the driver service on http://localhost:65051/ - at OpenQA.Selenium.DriverService.Start()
2024-06-26T00:35:32.0895986Z at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
2024-06-26T00:35:32.8742472Z at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
2024-06-26T00:35:33.1627471Z at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
2024-06-26T00:35:33.4086991Z at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
2024-06-26T00:35:34.6407559Z at OpenQA.Selenium.Chromium.ChromiumDriver..ctor(ChromiumDriverService service, ChromiumOptions options, TimeSpan commandTimeout)
2024-06-26T00:35:35.0406971Z at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options, TimeSpan commandTimeout)
2024-06-26T00:35:35.1719281Z at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options)
2024-06-26T00:35:35.6861800Z at Rbs.CyBake.Web.CyBake.Test.Ui.Helpers.Drivers.InitBrowser() in D:\a\12\s\Release\Rbs.CyBake.Web.CyBake\Version 1.100\Test.Ui\Helpers\Drivers.cs:line 115
2024-06-26T00:35:35.9954807Z Given I am on the login page
2024-06-26T00:35:36.3912373Z -> skipped because of previous errors
2024-06-26T00:35:36.8731160Z And I enter a login form known username
2024-06-26T00:35:37.3924022Z -> skipped because of previous errors
2024-06-26T00:35:37.6352809Z And I enter a login form known password
2024-06-26T00:35:38.1151817Z -> skipped because of previous errors
2024-06-26T00:35:38.3950746Z And I select the login form login option
2024-06-26T00:35:38.5157052Z -> skipped because of previous errors
2024-06-26T00:35:38.8615081Z And I am on the home page
2024-06-26T00:35:39.0966930Z -> skipped because of previous errors
2024-06-26T00:35:39.5009374Z And I select the side bar menu toggle option
2024-06-26T00:35:39.8105770Z -> skipped because of previous errors
2024-06-26T00:35:39.9989343Z And I select the side bar menu icon option Admin
2024-06-26T00:35:40.1976455Z -> skipped because of previous errors
2024-06-26T00:35:40.3548085Z And I am on the administration overview page
2024-06-26T00:35:41.6008960Z -> skipped because of previous errors
2024-06-26T00:35:42.1009938Z And I select the administration page menu item import data
2024-06-26T00:35:44.0460619Z -> skipped because of previous errors
2024-06-26T00:35:45.1904283Z And the page has finished loading
2024-06-26T00:35:46.6681465Z -> skipped because of previous errors
2024-06-26T00:35:47.8195145Z And I am on the administration import data page
2024-06-26T00:35:48.9070662Z -> skipped because of previous errors
2024-06-26T00:35:52.8311806Z Then the administration import data page structure is correct
2024-06-26T00:35:53.7373135Z -> skipped because of previous errors
2024-06-26T00:35:56.8048918Z
2024-06-26T00:35:57.3520624Z Failed Rbs.CyBake.Web.CyBake.Test.Ui.SpecFlow.Features.Administration.AdministrationPageFeature.EnsureTheAdministrationImportDataStructureIsCorrect EnsureTheAdministrationImportDataStructureIsCorrect
2024-06-26T00:43:50.3538682Z RunMessage : DriverPath: C:\SeleniumWebDrivers\ChromeDriver

@kishorekumar-anchala
Copy link
Contributor

We still have the same issue. Passing in chrome options causes the driver service to fail:

Bake.Web.CyBake.Test.Ui.SpecFlow.Features.Administration.AdministrationPageFeature.EnsureTheAdministrationAreaManagersStructureIsCorrect EnsureTheAdministrationAreaManagersStructureIsCorrect 2024-06-26T00:35:29.9834802Z RunMessage : DriverPath: C:\SeleniumWebDrivers\ChromeDriver 2024-06-26T00:35:30.1683290Z InitBrowser: Cannot start the driver service on http://localhost:65051/ - at OpenQA.Selenium.DriverService.Start() 2024-06-26T00:35:32.0895986Z at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute) 2024-06-26T00:35:32.8742472Z at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) 2024-06-26T00:35:33.1627471Z at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities) 2024-06-26T00:35:33.4086991Z at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities) 2024-06-26T00:35:34.6407559Z at OpenQA.Selenium.Chromium.ChromiumDriver..ctor(ChromiumDriverService service, ChromiumOptions options, TimeSpan commandTimeout) 2024-06-26T00:35:35.0406971Z at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options, TimeSpan commandTimeout) 2024-06-26T00:35:35.1719281Z at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options) 2024-06-26T00:35:35.6861800Z at Rbs.CyBake.Web.CyBake.Test.Ui.Helpers.Drivers.InitBrowser() in D:\a\12\s\Release\Rbs.CyBake.Web.CyBake\Version 1.100\Test.Ui\Helpers\Drivers.cs:line 115 2024-06-26T00:35:35.9954807Z Given I am on the login page 2024-06-26T00:35:36.3912373Z -> skipped because of previous errors 2024-06-26T00:35:36.8731160Z And I enter a login form known username 2024-06-26T00:35:37.3924022Z -> skipped because of previous errors 2024-06-26T00:35:37.6352809Z And I enter a login form known password 2024-06-26T00:35:38.1151817Z -> skipped because of previous errors 2024-06-26T00:35:38.3950746Z And I select the login form login option 2024-06-26T00:35:38.5157052Z -> skipped because of previous errors 2024-06-26T00:35:38.8615081Z And I am on the home page 2024-06-26T00:35:39.0966930Z -> skipped because of previous errors 2024-06-26T00:35:39.5009374Z And I select the side bar menu toggle option 2024-06-26T00:35:39.8105770Z -> skipped because of previous errors 2024-06-26T00:35:39.9989343Z And I select the side bar menu icon option Admin 2024-06-26T00:35:40.1976455Z -> skipped because of previous errors 2024-06-26T00:35:40.3548085Z And I am on the administration overview page 2024-06-26T00:35:41.6008960Z -> skipped because of previous errors 2024-06-26T00:35:42.1009938Z And I select the administration page menu item import data 2024-06-26T00:35:44.0460619Z -> skipped because of previous errors 2024-06-26T00:35:45.1904283Z And the page has finished loading 2024-06-26T00:35:46.6681465Z -> skipped because of previous errors 2024-06-26T00:35:47.8195145Z And I am on the administration import data page 2024-06-26T00:35:48.9070662Z -> skipped because of previous errors 2024-06-26T00:35:52.8311806Z Then the administration import data page structure is correct 2024-06-26T00:35:53.7373135Z -> skipped because of previous errors 2024-06-26T00:35:56.8048918Z 2024-06-26T00:35:57.3520624Z Failed Rbs.CyBake.Web.CyBake.Test.Ui.SpecFlow.Features.Administration.AdministrationPageFeature.EnsureTheAdministrationImportDataStructureIsCorrect EnsureTheAdministrationImportDataStructureIsCorrect 2024-06-26T00:43:50.3538682Z RunMessage : DriverPath: C:\SeleniumWebDrivers\ChromeDriver

we started investigation on the same, we will respond to you asap. Thankyou !

@RedBlack-DevOps
Copy link
Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants