SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
29.73k stars 8.02k forks source link

[๐Ÿ› Bug]: Selenium Manager process exited abnormally with 65 code #14167

Closed ardennext99 closed 1 week ago

ardennext99 commented 1 week ago

What happened?

I have a .Net framework method that try to use selenium to connect to a site for retrieve data. I have installed Selenium.WebDriver and Selenium.Support from NuGet.

1) When the method is called by a Test project it work 2) When the method is called by a Windows Service it work 3) When the method is called by a debug WebApi in VS2019 it try to locate "selenium-manager.exe" in the wrong folder E:\Lavoro\tecnositalia.visualstudio.com\tools.scooter.it\tools.scooter.it\selenium-manager\windows\selenium-manager.exe instead E:\Lavoro\tecnositalia.visualstudio.com\tools.scooter.it\tools.scooter.it\bin\selenium-manager\windows\selenium-manager.exe

throwing "The type initializer for 'OpenQA.Selenium.SeleniumManager' threw an exception."

4) Publish project on a IIS, and calling the webservice locate the "selenium-manager.exe" correctly, but I get this error:

throwing "Error starting process: C:\inetpub\wwwroot\tools.scooter.it\selenium-manager\windows\selenium-manager.exe --browser "chrome" --language-binding csharp --output json"

How can we reproduce the issue?

ChromeOptions oChromeOptions = new ChromeOptions() { AcceptInsecureCertificates = true };
oChromeOptions.AddArgument("--headless");
IWebDriver oIWebDriver = new ChromeDriver(oChromeOptions); //Throw the error

Relevant log output

OpenQA.Selenium.WebDriverException: Error starting process: C:\inetpub\wwwroot\tools.scooter.it\selenium-manager\windows\selenium-manager.exe  --browser "chrome" --language-binding csharp --output json ---> OpenQA.Selenium.WebDriverException: Selenium Manager process exited abnormally with 65 code: C:\inetpub\wwwroot\tools.scooter.it\selenium-manager\windows\selenium-manager.exe  --browser "chrome" --language-binding csharp --output json
Standard Output >>
{
  "logs": [
    {
      "level": "WARN",
      "timestamp": 1718951673,
      "message": "Metadata cannot be written in cache (): Accesso negato. (os error 5)"
    },
    {
      "level": "WARN",
      "timestamp": 1718951674,
      "message": "Metadata cannot be written in cache (): Accesso negato. (os error 5)"
    },
    {
      "level": "ERROR",
      "timestamp": 1718951675,
      "message": "Accesso negato. (os error 5)"
    }
  ],
  "result": {
    "code": 65,
    "message": "Accesso negato. (os error 5)",
    "driver_path": "",
    "browser_path": ""
  }
}

Operating System

Windows 10Pro, Windows Server 2012 R2

Selenium version

Selenium.WebDriver 4.22, Selenium.Support 4.22

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

unknow

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

unknow

Are you using Selenium Grid?

No response

github-actions[bot] commented 1 week ago

@ardennext99, 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 commented 1 week ago

That last example you don't have the right permissions set to execute on the machine.

I'm not sure there's anything we can do to address the debugger issue, I'll add some links below for where to get more help.

github-actions[bot] commented 1 week ago

๐Ÿ’ฌ Please ask questions at: