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

[🐛 Bug]: Selenium 4.16.x fails on selenium-manager.exe when vcuntime140.dll is not installed #13312

Closed
dcdraper opened this issue Dec 14, 2023 · 9 comments

Comments

@dcdraper
Copy link

dcdraper commented Dec 14, 2023

What happened?

The C# solution is not using the Selenium Manager feature to manage chromedriver or chrome browser at all, however as of 4.16.x the entire run fails with an application error on selenium-manager.exe with message "The code execution cannot proceed because VCRUNTIME140.dll was not found. Reinstalling the program may fix this program".

The 32-bit vcruntime140.dll is not installed on our agent machines (in the syswow64 folder) in our ADO pipelines and now the tests are completely failing when attempting to start Chrome browser due to this error, even though we are not relying on selenium manager to manage anything.

Is this new dependency on vcruntime140.dll intentional or in fact an issue? We fixed it by installing the x86 redistributable for Visual Studio 2015, 2017, 2019, and 2022 from https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022

How can we reproduce the issue?

Attempt running 4.16.x "selenium-manage.exe --browser chrome --debug" on a Windows machine that does not have the vcruntime140.dll file installed in the windows/syswow64 folder.

Relevant log output

C# does not have a logging implementation, however the browser tests fail with:

OpenQA.Selenium.NoSuchDriverException : Unable to obtain chrome using Selenium Manager; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location
----> OpenQA.Selenium.WebDriverException : Error starting process: C:\a\2\s\SanityTestPack\bin\Debug\net7.0\selenium-manager\windows\selenium-manager.exe  --browser "chrome" --output json
----> OpenQA.Selenium.WebDriverException : Selenium Manager process exited abnormally with -1073741515 code: C:\a\2\s\SanityTestPack\bin\Debug\net7.0\selenium-manager\windows\selenium-manager.exe  --browser "chrome" --output json



Stack trace
at OpenQA.Selenium.DriverFinder.FullPath(DriverOptions options)
at OpenQA.Selenium.Chromium.ChromiumDriver.GenerateDriverServiceCommandExecutor(DriverService service, DriverOptions options, TimeSpan commandTimeout)
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)
at SanityTestPack.TestBase.Base.StartWebBrowser() in C:\a\2\s\SanityTestPack\TestBase\Base.cs:line 278
at SanityTestPack.TestBase.Base.InitializeBrowser(String url, String browser) in C:\a\2\s\SanityTestPack\TestBase\Base.cs:line 114
at SanityTestPack.TestBase.Base.BeforeTestScenario() in C:\a\2\s\SanityTestPack\TestBase\Base.cs:line 41
at InvokeStub_Action`1.Invoke(Object, Object, IntPtr*)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.FireEvents(HookType hookType)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.FireScenarioEvents(HookType bindingEvent)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnScenarioStart()
at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep()
at TechTalk.SpecFlow.TestRunner.CollectScenarioErrors()
at SanityTestPack.Specs.CompanyDispositionFeature.ScenarioCleanup()
at SanityTestPack.Specs.CompanyDispositionFeature.Company_Disposition_Create_Edit_Delete() in C:\a\2\s\SanityTestPack\Specs\CompanyDisposition.feature:line 21
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
--WebDriverException
at OpenQA.Selenium.SeleniumManager.RunCommand(String fileName, String arguments)
at OpenQA.Selenium.SeleniumManager.DriverPath(DriverOptions options)
at OpenQA.Selenium.DriverFinder.FullPath(DriverOptions options)
--WebDriverException
at OpenQA.Selenium.SeleniumManager.RunCommand(String fileName, String arguments)

Operating System

Windows 10

Selenium version

4.16.2

What are the browser(s) and version(s) where you see this issue?

Chrome Version 120.0.6099.109 (Official Build) (64-bit)

What are the browser driver(s) and version(s) where you see this issue?

chromedriver.exe x64 version 120.0.6099.71

Are you using Selenium Grid?

no

Copy link

@dcdraper, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@titusfortner
Copy link
Member

@dcdraper can you run the command on the downloaded version of Selenium-manager in the Debug directory and see if you get the same issue? We want to see if it is a dotnet issue or a binary issue on your computer.

@nvborisenko will the new logging solution give us information about what SM is erroring with?

@RobLSDev
Copy link

We now have a similar issue on 4.16.x on Windows. Backing down to 4.15 is working just fine. We do install the latest vc redist runtime for x64 on the server, any attempt to run selenium-manager results in the -1073741515 error code.

@titusfortner
Copy link
Member

@RobLSDev what language? Or is this with the selenium manager executable directly?

@RobLSDev
Copy link

@RobLSDev what language? Or is this with the selenium manager executable directly?

We are using .net 8.0, but I logged onto the VM and tried executing it directly. Even selenium-manager --help returned the same error code.

@nvborisenko
Copy link
Member

Duplicate of #13261

@nvborisenko nvborisenko marked this as a duplicate of #13261 Dec 15, 2023
@titusfortner
Copy link
Member

Aha, I thought it looked familiar. I looked for a change in the rust/ directory and didn't see anything It was fixed with a CI change.

4.17 will have the fix.

@titusfortner titusfortner closed this as not planned Won't fix, can't repro, duplicate, stale Dec 15, 2023
@dcdraper
Copy link
Author

Thank you everyone!

Sorry about the duplicate report here; I didn't look thru closed issues :-/

Copy link

github-actions bot commented Feb 5, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants