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

Closed
linuxaged opened this issue Dec 27, 2024 · 8 comments
Labels
A-needs-triaging A Selenium member will evaluate this soon! I-defect Something is not working as intended J-logging Applied to issues where logging information would help troubleshoot

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

@linuxaged linuxaged added I-defect Something is not working as intended A-needs-triaging A Selenium member will evaluate this soon! labels Dec 27, 2024
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/

@nvborisenko nvborisenko added the J-awaiting answer Question asked of user; a reply moves it to triage again label Dec 27, 2024
@diemol diemol removed the A-needs-triaging A Selenium member will evaluate this soon! label Dec 28, 2024
@github-actions github-actions bot added A-needs-triaging A Selenium member will evaluate this soon! and removed J-awaiting answer Question asked of user; a reply moves it to triage again labels Dec 28, 2024
@diemol diemol added J-awaiting answer Question asked of user; a reply moves it to triage again and removed A-needs-triaging A Selenium member will evaluate this soon! labels Dec 28, 2024
@pujagani pujagani added the J-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.

@github-actions github-actions bot added A-needs-triaging A Selenium member will evaluate this soon! and removed J-awaiting answer Question asked of user; a reply moves it to triage again labels Dec 30, 2024
@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:
图片

@nvborisenko
Copy link
Member

@linuxaged what if you start C:\\Users\\bonsmile\\.cache\\selenium\\geckodriver\\win64\\0.35.0\\geckodriver.exe manually?

@linuxaged
Copy link
Author

@linuxaged what if you start C:\\Users\\bonsmile\\.cache\\selenium\\geckodriver\\win64\\0.35.0\\geckodriver.exe manually?

1737593500496 geckodriver INFO Listening on 127.0.0.1:4444

@Maheshkale447
Copy link

Maheshkale447 commented Mar 17, 2025

I am facing this issue "Cannot start the driver service on http://localhost:5090" when there is some proxy configured on system. I resolved it by adding localhost in NO_PROXY environment variable.

I faced it using selenium dotnet for chrome and edge.

Though this solution works, we need to do it manually. It will be better if its by default handled by selenium.

Copy link

This issue was closed because we did not receive any additional information after 14 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-needs-triaging A Selenium member will evaluate this soon! I-defect Something is not working as intended J-logging Applied to issues where logging information would help troubleshoot
Projects
None yet
Development

No branches or pull requests

5 participants