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]: OpenQA.Selenium.WebDriverException: 'Cannot start the driver service on http://localhost:50909/' #14949

Open
linuxaged opened this issue Dec 27, 2024 · 4 comments
Labels
I-defect I-logging Applied to issues where logging information would help troubleshoot needs-triaging

Comments

@linuxaged
Copy link

What happened?

Just follow the Use WebDriver to automate Microsoft Edge, but the driver service can not start, have tried ChromeDirver, EdgeDriver, FirefoxDriver, all failed with same error.

msedgedriver --version 131.0.2903.112 (16ab910a6e75f1c7d2da060bbe9ac569dfe64f70)
geckodriver --version 0.35.0 (9f0a0036bea4 2024-08-03 07:11 +0000)
chromedriver --version ChromeDriver 131.0.6778.205 (81b36b9535e3e3b610a52df3da48cd81362ec860-refs/branch-heads/6778_155@{#8})

dirver path has been added to user's PATH

> echo %PATH%
D:\app\geckodriver;D:\app\chromedriver-win64;D:\app\edgedriver_win64;

How can we reproduce the issue?

dotnet new console --framework net9.0
dotnet add package Selenium.WebDriver
dotnet add package Selenium.WebDriver.GeckoDriver

//Program.cs
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium;
class Program
{
    static void Main(string[] args)
    {
        var driver = new FirefoxDriver();
        try
        {
            driver.Url = "https://bing.com";

            var element = driver.FindElement(By.Id("sb_form_q"));
            element.SendKeys("WebDriver");
            element.Submit();

            Thread.Sleep(5000);
        }
        finally
        {
            driver.Quit();
        }
    }
}


### Relevant log output

```shell
'SeleniumCSharpProject.exe' (CoreCLR: DefaultDomain): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Private.CoreLib.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'D:\workspace\SeleniumCSharpProject\bin\Debug\net9.0-windows10.0.26100.0\SeleniumCSharpProject.dll'. Symbols loaded.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Runtime.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'd:\program files\microsoft visual studio\2022\enterprise\common7\ide\commonextensions\microsoft\hotreload\Microsoft.Extensions.DotNetDeltaApplier.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.IO.Pipes.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Linq.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Collections.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Console.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Threading.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Runtime.InteropServices.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Threading.Overlapped.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Security.AccessControl.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Security.Principal.Windows.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Security.Claims.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Runtime.Loader.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Collections.Concurrent.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'D:\workspace\SeleniumCSharpProject\bin\Debug\net9.0-windows10.0.26100.0\WebDriver.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Drawing.Primitives.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Threading.Thread.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Net.Sockets.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Net.Primitives.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\Microsoft.Win32.Primitives.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Diagnostics.Tracing.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Runtime.Intrinsics.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Memory.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Diagnostics.Process.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.ComponentModel.Primitives.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Text.Json.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Threading.ThreadPool.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Text.Encodings.Web.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Text.Encoding.Extensions.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Numerics.Vectors.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Private.Uri.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Net.Http.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Diagnostics.DiagnosticSource.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Net.Security.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Security.Cryptography.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'D:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\PrivateAssemblies\Runtime\Microsoft.VisualStudio.Debugger.Runtime.NetCoreApp.dll'. 
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\netstandard.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'D:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\IntelliTrace\Microsoft.IntelliTrace.TelemetryObserver.Common.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'D:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\IntelliTrace\Microsoft.IntelliTrace.TelemetryObserver.CoreClr.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Reflection.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Reflection.Extensions.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Runtime.Extensions.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Net.NameResolution.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Net.Quic.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Net.NetworkInformation.dll'. Symbol loading disabled by Include/Exclude setting.
'SeleniumCSharpProject.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Collections.NonGeneric.dll'. Symbol loading disabled by Include/Exclude setting.
Exception thrown: 'OpenQA.Selenium.WebDriverException' in WebDriver.dll
Exception thrown: 'OpenQA.Selenium.WebDriverException' in System.Private.CoreLib.dll
Exception thrown: 'OpenQA.Selenium.WebDriverException' in System.Private.CoreLib.dll
Exception thrown: 'OpenQA.Selenium.WebDriverException' in WebDriver.dll
An unhandled exception of type 'OpenQA.Selenium.WebDriverException' occurred in WebDriver.dll
Cannot start the driver service on http://localhost:50909/

Operating System

Win11

Selenium version

C# 4.27.0

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

133.0.3 (32 bit)

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

GeckoDriver 0.35

Are you using Selenium Grid?

Not used

Copy link

@linuxaged, 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!

@nvborisenko
Copy link
Member

Selenium.WebDriver.GeckoDriver package is not supported by Selenium. This way is better: https://www.selenium.dev/documentation/selenium_manager/

In any case please provide logs: https://www.selenium.dev/documentation/webdriver/troubleshooting/logging/

@pujagani pujagani added the I-logging Applied to issues where logging information would help troubleshoot label Dec 30, 2024
Copy link

We need more information about this issue in order to troubleshoot.

Please turn on logging and re-run your code. Information on how to adjust logs for your language can be found in our
Troubleshooting documentation.

@linuxaged
Copy link
Author

linuxaged commented Jan 6, 2025

run the manager manually:

D:\workspace\SeleniumCSharpProject\bin\Debug\net9.0\selenium-manager\windows>selenium-manager.exe --proxy="127.0.0.1:12334"  --browser "firefox" --language-binding csharp --output json
{
  "logs": [
    {
      "level": "INFO",
      "timestamp": 1736156649,
      "message": "Driver path: C:\\Users\\bonsmile\\.cache\\selenium\\geckodriver\\win64\\0.35.0\\geckodriver.exe"
    },
    {
      "level": "INFO",
      "timestamp": 1736156649,
      "message": "Browser path: C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe"
    }
  ],
  "result": {
    "code": 0,
    "message": "",
    "driver_path": "C:\\Users\\bonsmile\\.cache\\selenium\\geckodriver\\win64\\0.35.0\\geckodriver.exe",
    "browser_path": "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe"
  }
}

but still the same error:
图片

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-defect I-logging Applied to issues where logging information would help troubleshoot needs-triaging
Projects
None yet
Development

No branches or pull requests

4 participants