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
813844 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
813566 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107734
813486 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange
812591 dotnet/runtime WasmTestOnChrome-MT-System.Data.DataSetExtensions.Tests.WorkItemExecution #107639
812991 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #106875
812981 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108015
812976 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107913
812671 dotnet/runtime WasmTestOnFirefox-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #107836
812471 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #106977
812575 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107984
812350 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution
812257 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #106977
811917 dotnet/runtime WasmTestOnChrome-MT-System.Dynamic.Runtime.Tests.WorkItemExecution #107462
812168 dotnet/runtime WasmTestOnChrome-MT-Wasm.Browser.Threads.Sample.WorkItemExecution #107872
811936 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #106875
811892 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107913
811886 dotnet/runtime WasmTestOnChrome-MT-System.Text.Encoding.CodePages.Tests.WorkItemExecution #107980
811731 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107504
811585 dotnet/runtime WasmTestOnFirefox-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #107964
811531 dotnet/runtime WasmTestOnChrome-MT-System.Text.Encodings.Web.Tests.WorkItemExecution
811273 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
811375 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #107951
811251 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution
811046 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #107937
811162 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #107899
810898 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107639
810831 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #105427
810619 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107789
810537 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107909
810530 dotnet/runtime WasmTestOnFirefox-MT-System.Xml.Linq.Properties.Tests.WorkItemExecution #107907
810179 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107590
810160 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #106599
809971 dotnet/runtime WasmTestOnChrome-MT-System.ComponentModel.Primitives.Tests.WorkItemExecution #107792
809984 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.Tests.WorkItemExecution #106977
809910 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #106875
809340 dotnet/runtime WasmTestOnChrome-MT-System.IO.Compression.ZipFile.Tests.WorkItemExecution #107734
809201 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107737
809175 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107795
809028 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
808993 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #106599
808884 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution
808830 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #107833
808781 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
808653 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #106875
808363 dotnet/runtime WasmTestOnChrome-MT-Wasm.Browser.Threads.Sample.WorkItemExecution #107819
807854 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #107795
807654 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #107789
807658 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107734
807375 dotnet/runtime WasmTestOnChrome-MT-System.Text.Encoding.CodePages.Tests.WorkItemExecution
807224 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #107778
807152 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #106875
807070 dotnet/runtime WasmTestOnChrome-MT-Wasm.Browser.Threads.Sample.WorkItemExecution #107769
807049 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107166
807103 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #107713
806878 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
806269 dotnet/runtime WasmTestOnChrome-MT-System.Linq.Parallel.Tests.WorkItemExecution #107434
803719 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #107615
806302 dotnet/runtime WasmTestOnChrome-MT-System.Text.Json.Tests.WorkItemExecution #106875
806206 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #106977
806040 dotnet/runtime WasmTestOnFirefox-MT-System.Text.RegularExpressions.Tests.WorkItemExecution
805866 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #107027
805847 dotnet/runtime WasmTestOnChrome-MT-System.Collections.Concurrent.Tests.WorkItemExecution #107673
805189 dotnet/runtime WasmTestOnChrome-MT-Wasm.Browser.Threads.Sample.WorkItemExecution #107372
805051 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #106977
805013 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #106388
804271 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #107657
804882 dotnet/runtime WasmTestOnChrome-MT-System.Reflection.Tests.WorkItemExecution #107678
804813 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #107434
804697 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
804510 dotnet/runtime WasmTestOnChrome-MT-Wasm.Browser.Threads.Sample.WorkItemExecution #107670
804126 dotnet/runtime WasmTestOnFirefox-MT-System.IO.Compression.ZipFile.Tests.WorkItemExecution
803799 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #107593
803866 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107194
803931 dotnet/runtime WasmTestOnChrome-MT-Wasm.Browser.Threads.Sample.WorkItemExecution #106413
803423 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107602
803551 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #106873
2535177 dotnet-runtime WasmTestOnChrome-MT-Wasm.Browser.Threads.Sample.WorkItemExecution #42557
803455 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #107027
802262 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #107401
803056 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #107593
802883 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107464
802301 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107557
802555 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
802318 dotnet/runtime WasmTestOnFirefox-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #107558
802142 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #106873
802121 dotnet/runtime WasmTestOnChrome-MT-System.IO.MemoryMappedFiles.Tests.WorkItemExecution #107504
802100 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #107547
802166 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #107549
801826 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #106875
801723 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #107027
801664 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #106599
801672 dotnet/runtime Workloads-NoWebcil-Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.WorkItemExecution
801646 dotnet/runtime WasmTestOnChrome-MT-System.Threading.Tasks.Parallel.Tests.WorkItemExecution #107461
801550 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #107351
799099 dotnet/runtime WasmTestOnChrome-MT-System.IO.MemoryMappedFiles.Tests.WorkItemExecution #107395
801326 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution
801139 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
801027 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
801018 dotnet/runtime WasmTestOnFirefox-MT-System.Collections.NonGeneric.Tests.WorkItemExecution #107113
800765 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
Displaying 100 of 191 results

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
7 48 191
@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