Skip to content

[🐛 Bug]: OpenQA.Selenium.WebDriverException: 'Cannot start the driver service on http://localhost:50909/' #14949

Closed as not planned
@linuxaged

Description

@linuxaged

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!I-defectSomething is not working as intendedJ-loggingApplied to issues where logging information would help troubleshoot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions