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
847491 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.Tests.WorkItemExecution #108876
846051 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange #108846
847306 dotnet/runtime WasmTestOnChrome-MT-System.Collections.Tests.WorkItemExecution #108876
847017 dotnet/runtime WasmTestOnChrome-MT-Wasm.Browser.Threads.Sample.WorkItemExecution #107769
846888 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #109001
846739 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108968
846754 dotnet/runtime WasmTestOnFirefox-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #108990
846663 dotnet/runtime WasmTestOnChrome-MT-Wasm.Browser.Threads.Sample.WorkItemExecution #108843
846212 dotnet/runtime Workloads-Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.WorkItemExecution #108970
845530 dotnet/runtime WasmTestOnFirefox-MT-System.Net.WebHeaderCollection.Tests.WorkItemExecution #107843
845330 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange #108949
845322 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange #108947
845163 dotnet/runtime WasmTestOnChrome-MT-Microsoft.Extensions.FileSystemGlobbing.Tests.WorkItemExecution
844098 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108910
845009 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
844982 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange
844600 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108924
844019 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
843799 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #108854
843683 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
843491 dotnet/runtime WasmTestOnChrome-MT-System.ServiceModel.Syndication.Tests.WorkItemExecution #108837
843225 dotnet/runtime WasmTestOnChrome-MT-System.Threading.Tasks.Tests.WorkItemExecution #108731
843135 dotnet/runtime WasmTestOnChrome-MT-System.IO.Compression.ZipFile.Tests.WorkItemExecution #108884
842890 dotnet/runtime WasmTestOnChrome-MT-System.Collections.Concurrent.Tests.WorkItemExecution #108837
842818 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
842787 dotnet/runtime WasmTestOnChrome-MT-Microsoft.Extensions.FileSystemGlobbing.Tests.WorkItemExecution #107843
842138 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #108856
842067 dotnet/runtime WasmTestOnChrome-MT-System.Threading.Channels.Tests.WorkItemExecution #108547
842088 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange
841950 dotnet/runtime WasmTestOnChrome-MT-System.Collections.NonGeneric.Tests.WorkItemExecution #108837
841936 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange #108713
840506 dotnet/runtime Workloads-Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.WorkItemExecution #108446
841441 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Tests.WorkItemExecution #108789
841336 dotnet/runtime WasmTestOnChrome-MT-System.IO.MemoryMappedFiles.Tests.WorkItemExecution
841028 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #103375
840024 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
839877 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108326
839864 dotnet/runtime WasmTestOnFirefox-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #108516
839799 dotnet/runtime Workloads-Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.WorkItemExecution #108785
839795 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange #108784
839221 dotnet/runtime WasmTestOnChrome-MT-System.Memory.Tests.WorkItemExecution #108707
839281 dotnet/runtime WasmTestOnChrome-MT-Wasm.Browser.Threads.Sample.WorkItemExecution
839237 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange #108713
838678 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange #108761
839075 dotnet/runtime WasmTestOnChrome-MT-System.IO.Compression.Tests.WorkItemExecution #108745
838936 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
838220 dotnet/runtime WasmTestOnChrome-MT-System.Memory.Tests.WorkItemExecution #108707
837923 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108636
837942 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108324
837780 dotnet/runtime WasmTestOnChrome-MT-System.ServiceModel.Syndication.Tests.WorkItemExecution #105427
837666 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
837575 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108711
837374 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #100048
836589 dotnet/runtime WasmTestOnFirefox-MT-System.Threading.Tasks.Dataflow.Tests.WorkItemExecution #108731
836275 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #108685
835920 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange #108666
834599 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
832390 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #108512
833101 dotnet/runtime WasmTestOnChrome-MT-System.Data.Common.Tests.WorkItemExecution #108687
833975 dotnet/runtime WasmTestOnChrome-MT-System.Linq.Expressions.Tests.WorkItemExecution
833651 dotnet/runtime Workloads-Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.WorkItemExecution #108495
833441 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #108401
833507 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Numerics.Tests.WorkItemExecution #108691
832575 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108677
831820 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108481
831213 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #105427
830277 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108514
830152 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108535
828423 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution #108482
827439 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107388
827212 dotnet/runtime WasmTestOnChrome-MT-Microsoft.Extensions.FileSystemGlobbing.Tests.WorkItemExecution #108546
826876 dotnet/runtime WasmTestOnFirefox-MT-System.Resources.Writer.Tests.WorkItemExecution #108535
826494 dotnet/runtime WasmTestOnFirefox-MT-System.Reflection.TypeExtensions.Tests.WorkItemExecution
826420 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108483
825855 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #105427
826136 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange #107021
826085 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107388
824964 dotnet/runtime WasmTestOnChrome-MT-System.Text.Json.Tests.WorkItemExecution
825397 dotnet/runtime Workloads-Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.WorkItemExecution #108446
825434 dotnet/runtime WasmTestOnFirefox-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #108498
825200 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution
824848 dotnet/runtime Workloads-NoWebcil-Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.WorkItemExecution #108446
823391 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Serialization.Xml.ReflectionOnly.Tests.WorkItemExecution #108385
823114 dotnet/runtime WasmTestOnFirefox-MT-System.Runtime.Loader.DefaultContext.Tests.WorkItemExecution #108370
822705 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #105427
822732 dotnet/runtime WasmTestOnChrome-MT-System.Reflection.Tests.WorkItemExecution
822595 dotnet/runtime WasmTestOnChrome-MT-System.Threading.Tasks.Extensions.Tests.WorkItemExecution #108370
822531 dotnet/runtime WasmTestOnChrome-MT-System.Memory.Tests.WorkItemExecution #107865
822341 dotnet/runtime WasmTestOnChrome-MT-System.Threading.Timer.Tests.WorkItemExecution #108370
822338 dotnet/runtime WasmTestOnChrome-MT-System.Threading.Timer.Tests.WorkItemExecution #108370
822015 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108188
821599 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107943
821572 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108324
821569 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108188
821481 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #108367
821473 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
821418 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution #107943
821306 dotnet/runtime WasmTestOnFirefox-MT-System.Xml.Schema.Extensions.Tests.WorkItemExecution
820941 dotnet/runtime WasmTestOnFirefox-MT-System.Runtime.CompilerServices.Unsafe.Tests.WorkItemExecution #108350
820264 dotnet/runtime WasmTestOnFirefox-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution #108184
Displaying 100 of 127 results

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
3 35 127
@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