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

[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 #104825

Open
carlossanlop opened this issue Jul 12, 2024 · 5 comments
Assignees
Labels
arch-wasm WebAssembly architecture area-System.Net.Http blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab os-browser Browser variant of arch-wasm os-linux Linux OS (any supported distro)
Milestone

Comments

@carlossanlop
Copy link
Member

carlossanlop commented Jul 12, 2024

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: 9/2/2024 9:36:11 AM UTC

Report

Build Definition Test Pull Request
944114 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #112232
944099 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #112266
943995 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution
943959 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #112263
943896 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #112260
943519 dotnet/runtime WasmTestOnChrome-MT-System.ServiceModel.Syndication.Tests.WorkItemExecution #112223
943540 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #111759
943428 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #112209
943321 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Tests.WorkItemExecution #111642
943272 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #111676
943239 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #111934
943231 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #112213
943179 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Tests.WorkItemExecution #112206
943160 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #110622
943132 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution
942217 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #112223
943034 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #112199
943083 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #98643
943008 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #112201
942976 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #112242
942807 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #112209
942782 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #112232
942608 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #111598
941762 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #111645
942516 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #112231
942465 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #112199
942253 dotnet/runtime WasmTestOnChrome-MT-Microsoft.Extensions.FileSystemGlobbing.Tests.WorkItemExecution
942385 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution
942236 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #112224
942005 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #111737
941959 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange #112221
942133 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #112173
942088 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #111598
942057 dotnet/runtime WasmTestOnChrome-MT-System.Security.Cryptography.Tests.WorkItemExecution
941934 dotnet/runtime WasmTestOnChrome-MT-Microsoft.Extensions.FileSystemGlobbing.Tests.WorkItemExecution
941444 dotnet/runtime WasmTestOnChrome-MT-System.IO.Compression.ZipFile.Tests.WorkItemExecution #110622
941736 dotnet/runtime WasmTestOnChrome-MT-System.Threading.Channels.Tests.WorkItemExecution #107769
941615 dotnet/runtime WasmTestOnChrome-MT-System.IO.Compression.ZipFile.Tests.WorkItemExecution #112206
939381 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #112120
941354 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #112199
941088 dotnet/runtime WasmTestOnChrome-MT-System.IO.MemoryMappedFiles.Tests.WorkItemExecution #111910
941378 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Intrinsics.Tests.WorkItemExecution #107769
941286 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #112142
941091 dotnet/runtime WasmTestOnChrome-MT-System.Text.Json.Tests.WorkItemExecution #110818
941038 dotnet/runtime Workloads-Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.WorkItemExecution #112188
941016 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #107769
940986 dotnet/runtime WasmTestOnChrome-MT-System.Memory.Tests.WorkItemExecution #112186
938645 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #107769
940776 dotnet/runtime WasmTestOnChrome-MT-System.ComponentModel.Annotations.Tests.WorkItemExecution
940639 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #112175
940626 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #112174
940643 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange #112176
940116 dotnet/runtime WasmTestOnChrome-MT-System.Formats.Asn1.Tests.WorkItemExecution #111598
939945 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
939829 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange #111666
939065 dotnet/runtime WasmTestOnChrome-MT-Microsoft.Extensions.FileSystemGlobbing.Tests.WorkItemExecution #111318
938098 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #111518
937946 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
937791 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Tests.WorkItemExecution #112084
937654 dotnet/runtime WasmTestOnChrome-MT-System.IO.Compression.Tests.WorkItemExecution #112079
937527 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #111891
937515 dotnet/runtime Workloads-NoWebcil-Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.WorkItemExecution #111982
937368 dotnet/runtime WasmTestOnChrome-MT-System.Text.Json.Tests.WorkItemExecution #112030
937307 dotnet/runtime WasmTestOnChrome-MT-System.IO.Compression.ZipFile.Tests.WorkItemExecution #112066
936833 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #107769
936524 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
936549 dotnet/runtime WasmTestOnChrome-MT-System.Reflection.Tests.WorkItemExecution #111454
936497 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #112047
935218 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #111318
935195 dotnet/runtime WasmTestOnChrome-MT-System.Collections.Tests.WorkItemExecution #111990
935127 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Tests.WorkItemExecution
935085 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
935001 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange #111445
935005 dotnet/runtime WasmTestOnChrome-MT-Microsoft.Extensions.FileSystemGlobbing.Tests.WorkItemExecution #112005
934460 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #111946
934828 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #111996
934839 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Tests.WorkItemExecution #111584
934542 dotnet/runtime WasmTestOnChrome-MT-System.Xml.Linq.xNodeBuilder.Tests.WorkItemExecution
934258 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #111514
934173 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #109901
934151 dotnet/runtime WasmTestOnChrome-MT-System.ServiceModel.Syndication.Tests.WorkItemExecution #111584
934012 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #99596
933780 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Tests.WorkItemExecution #111907
933616 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #111910
933631 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #111584
933392 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution
933228 dotnet/runtime WasmTestOnChrome-MT-System.IO.MemoryMappedFiles.Tests.WorkItemExecution #99596
933110 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Tests.WorkItemExecution #111584
933049 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Tests.WorkItemExecution
932726 dotnet/runtime WasmTestOnChrome-MT-System.Drawing.Primitives.Tests.WorkItemExecution #99596
932843 dotnet/runtime WasmTestOnChrome-MT-Wasm.Browser.Threads.Sample.WorkItemExecution #107769
932657 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #111584
932228 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Tests.WorkItemExecution #111545
932352 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #111910
932350 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
931986 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Tests.WorkItemExecution #111852
931882 dotnet/runtime WasmTestOnChrome-MT-System.Text.Json.Tests.WorkItemExecution #111852
931842 dotnet/runtime WasmTestOnChrome-MT-System.Composition.Tests.WorkItemExecution #111545
931745 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #111891
931559 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.ReflectionInvokeEmit.Tests.WorkItemExecution #111691
Displaying 100 of 189 results

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
24 68 189
@carlossanlop carlossanlop added arch-wasm WebAssembly architecture area-System.Net.Http os-linux Linux OS (any supported distro) Known Build Error Use this to report build issues in the .NET Helix tab os-browser Browser variant of arch-wasm labels Jul 12, 2024
Copy link
Contributor

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

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jul 12, 2024
Copy link
Contributor

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

@maraf
Copy link
Member

maraf commented Jul 15, 2024

The test succeed with WASM EXIT 42, but selenium WebDriver crashed when reading messages https://github.com/dotnet/xharness/blob/release/8.0/src/Microsoft.DotNet.XHarness.CLI/Commands/WASM/Browser/WasmBrowserTestRunner.cs#L214

@maraf maraf added this to the 8.0.x milestone Jul 15, 2024
@maraf maraf self-assigned this Jul 15, 2024
@maraf maraf removed the untriaged New issue has not been triaged by the area owner label Jul 15, 2024
@carlossanlop carlossanlop added Known Build Error Use this to report build issues in the .NET Helix tab and removed Known Build Error Use this to report build issues in the .NET Helix tab labels Aug 23, 2024
@carlossanlop
Copy link
Member Author

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

@ilonatommy ilonatommy added the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Sep 2, 2024
@carlossanlop
Copy link
Member Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-System.Net.Http blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab os-browser Browser variant of arch-wasm os-linux Linux OS (any supported distro)
Projects
None yet
Development

No branches or pull requests

3 participants