Skip to content

[browser][wasm] Failed trying to read log messages via selenium: OpenQA.Selenium.WebDriverException: An unknown exception was encountered sending an HTTP request to the remote WebDriver server for URL #104825

Open

Description

@carlossanlop

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=734813
Build error leg or test failing: browser-wasm linux Release WasmBuildTests

Error Message

{
  "ErrorMessage" : "OpenQA.Selenium.WebDriverException: An unknown exception was encountered sending an HTTP request to the remote WebDriver server for URL",
  "BuildRetry" : false,
  "ExcludeConsoleLog" : false
}
        [wasm test-browser] [19:28:03] dbug: Saving diagnostics data to '/root/helix/work/workitem/e/diagnostics.json'
        [wasm test-browser] [19:28:03] dbug: Failed trying to read log messages via selenium: OpenQA.Selenium.WebDriverException: An unknown exception was encountered sending an HTTP request to the remote WebDriver server for URL http://localhost:41171/session/62eaec63cc2d91f50756098ae8fbfef8/se/log. The exception message was: An error occurred while sending the request.
        [wasm test-browser]                   ---> System.Net.Http.HttpRequestException: An error occurred while sending the request.
        [wasm test-browser]                   ---> System.Net.Http.HttpIOException: The response ended prematurely. (ResponseEnded)
        [wasm test-browser]                     at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        [wasm test-browser]                     --- End of inner exception stack trace ---
        [wasm test-browser]                     at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        [wasm test-browser]                     at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
        [wasm test-browser]                     at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
        [wasm test-browser]                     at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
        [wasm test-browser]                     at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
        [wasm test-browser]                     at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
        [wasm test-browser]                     --- End of inner exception stack trace ---
        [wasm test-browser]                     at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
        [wasm test-browser]                     at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
        [wasm test-browser]                     at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
        [wasm test-browser]                     at OpenQA.Selenium.Remote.RemoteWebDriver.InternalExecute(String driverCommandToExecute, Dictionary`2 parameters)
        [wasm test-browser]                     at OpenQA.Selenium.Remote.RemoteLogs.GetLog(String logKind)
        [wasm test-browser]                     at Microsoft.DotNet.XHarness.CLI.Commands.Wasm.WasmBrowserTestRunner.RunSeleniumLogMessagePump(IWebDriver driver, CancellationToken token) in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/WASM/Browser/WasmBrowserTestRunner.cs:line 214

Known issue validation

Build: 🔎
Result validation: ⚠️ Validation could not be done without an Azure DevOps build URL on the issue. Please add it to the "Build: 🔎" line.
Validation performed at: 5/20/2025 1:59:59 PM UTC

Report

Build Repository Test Pull Request
1641299 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #135803
1641425 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #135296
1641410 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #133890
1641402 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #133086
1641117 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #136050
1641358 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #136114
1641354 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #134494
1641346 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #135991
1641334 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #136113
1641330 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #136112
1641313 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #136038
1641288 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #136110
1641262 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #136109
1641253 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #136108
1641245 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #136107
1641232 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #135956
1641227 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #135902
1641216 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #135543
1641197 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #136037
1641193 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #136106
1641185 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #136040
1641153 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #135533
1641156 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #135863
1641112 dotnet/runtime WasmTestOnFirefox-CLR-ST-System.Runtime.Tests.WorkItemExecution #133460
1622035 dotnet/runtime WasmTestOnFirefox-MONO-ST-System.Text.Json.Tests.WorkItemExecution #135142
1619167 dotnet/runtime Wasm.Build.Tests.WasmBuildAppTest.PropertiesFromCsproj(buildArgs: BuildArgs { ProjectName = placeholder, Config = Release, AOT = False, ProjectFileContents = placeholder, ExtraBuildArgs = }, host: Chrome, id: "q11uq3cz_4fk") #135002
1613179 dotnet/runtime System.Text.RegularExpressions.Tests.RegexReplaceTests.Replace #134696

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
1 24 27

Activity

  1. dotnet-policy-service commented on Jul 12, 2024

    @dotnet-policy-service
    Contributor

    Tagging subscribers to 'arch-wasm': @lewing
    See info in area-owners.md if you want to be subscribed.

  2. dotnet-policy-service commented on Jul 12, 2024

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/ncl
    See info in area-owners.md if you want to be subscribed.

  3. maraf commented on Jul 15, 2024

    @maraf
    Member
  4. added this to the 8.0.x milestone on Jul 15, 2024
  5. self-assigned this
    on Jul 15, 2024
  6. removed
    untriagedNew issue has not been triaged by the area owner
    on Jul 15, 2024
  7. added
    Known Build ErrorUse this to report build issues in the .NET Helix tab
    and removed
    Known Build ErrorUse this to report build issues in the .NET Helix tab
    on Aug 23, 2024
  8. carlossanlop commented on Aug 23, 2024

    @carlossanlop
    ContributorAuthor

    I edited the error message as it was too specific. There were some other hits with a shorter message but that seem to have the same root cause:

    [14:15:30] info: System.Reflection.Tests.ReflectionCacheTests 0.0014648 ms
    [14:38:15] fail: Tests timed out. Killing driver service pid 78
    [14:38:15] fail: Application has finished with exit code TIMED_OUT but 0 was expected
    [14:38:15] crit: OpenQA.Selenium.WebDriverException: An unknown exception was encountered sending an HTTP request to the remote WebDriver server for URL http://localhost:40847/session/b0225414b8cc299b715027c225d358f9/window/handles. The exception message was: Connection refused (localhost:40847)
                      ---> System.Net.Http.HttpRequestException: Connection refused (localhost:40847)
                      ---> System.Net.Sockets.SocketException (111): Connection refused
                        at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
                        at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
                        at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
                        at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
                        --- End of inner exception stack trace ---
                        at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
                        at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                        at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                        at System.Net.Http.HttpConnectionPool.InjectNewHttp11ConnectionAsync(QueueItem queueItem)
                        at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
                        at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
                        at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
                        at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
                        at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
                        at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
                        --- End of inner exception stack trace ---
                        at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
                        at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
                        at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
                        at OpenQA.Selenium.Remote.RemoteWebDriver.get_WindowHandles()
                        at Microsoft.DotNet.XHarness.CLI.Commands.Wasm.WasmTestBrowserCommand.InvokeInternal(ILogger logger) in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/WASM/Browser/WasmTestBrowserCommand.cs:line 108
                        at Microsoft.DotNet.XHarness.CLI.Commands.Wasm.WasmTestBrowserCommand.InvokeInternal(ILogger logger)
                        at Microsoft.DotNet.XHarness.CLI.Commands.XHarnessCommand`1.Invoke(IEnumerable`1 arguments) in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/XHarnessCommand.cs:line 145
    XHarness exit code: 71 (GENERAL_FAILURE
    
  9. added
    blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
    on Sep 2, 2024
  10. carlossanlop commented on Sep 4, 2024

    @carlossanlop
    ContributorAuthor

    This is one of the most impactful failures in CI, especially in 6.0. Is there a chance we can increase its priority for fixing?

  11. changed the title [-][8.0][browser][wasm] Failed trying to read log messages via selenium: OpenQA.Selenium.WebDriverException: An unknown exception was encountered sending an HTTP request to the remote WebDriver server for URL[/-] [+][browser][wasm] Failed trying to read log messages via selenium: OpenQA.Selenium.WebDriverException: An unknown exception was encountered sending an HTTP request to the remote WebDriver server for URL[/+] on May 20, 2025
  12. modified the milestones: 8.0.x, 10.0.0 on May 20, 2025
  13. modified the milestones: 10.0.0, 8.0.x on May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Known Build ErrorUse this to report build issues in the .NET Helix tabarch-wasmWebAssembly architecturearea-VM-meta-monoblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'os-browserBrowser variant of arch-wasmos-linuxLinux OS (any supported distro)

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions