runtime icon indicating copy to clipboard operation
runtime copied to clipboard

[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

Open carlossanlop opened this issue 1 year ago • 5 comments

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
}
  • PR:https://github.com/dotnet/runtime/pull/104630
  • Queue: browser-wasm linux Release WasmBuildTests
  • Job result: https://dev.azure.com/dnceng-public/public/_build/results?buildId=734813&view=logs&j=1fa93050-f528-55d3-a351-f8bf9ce5adbf&t=a9f1a437-3b59-5900-1137-ec6cae9a530c&l=142
  • Log file: https://helixre107v0xd1eu3ibi6ka.blob.core.windows.net/dotnet-runtime-refs-pull-104630-merge-834dc1579a1b4085ad/Workloads-NoWebcil-Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests/1/console.eacd6a90.log?helixlogtype=result
  • Output:
        [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: :mag_right: Result validation: :warning: Validation could not be done without an Azure DevOps build URL on the issue. Please add it to the "Build: :mag_right:" line. Validation performed at: 9/2/2024 9:36:11 AM UTC

Report

Build Definition Test Pull Request
869401 dotnet/runtime Workloads-NoWebcil-Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.WorkItemExecution dotnet/runtime#108906
869235 dotnet/runtime WasmTestOnChrome-MT-System.IO.MemoryMappedFiles.Tests.WorkItemExecution dotnet/runtime#109801
869149 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Tests.WorkItemExecution dotnet/runtime#109363
868709 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution dotnet/runtime#109772
868566 dotnet/runtime WasmTestOnChrome-MT-System.Reflection.Metadata.Tests.WorkItemExecution dotnet/runtime#109638
866912 dotnet/runtime WasmTestOnFirefox-MT-System.IO.FileSystem.Tests.WorkItemExecution dotnet/runtime#109707
866509 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution dotnet/runtime#109540
865840 dotnet/runtime WasmTestOnFirefox-MT-System.IO.FileSystem.Tests.WorkItemExecution dotnet/runtime#109678
866096 dotnet/runtime WasmTestOnFirefox-MT-System.Runtime.Tests.WorkItemExecution dotnet/runtime#109137
865989 dotnet/runtime WasmTestOnFirefox-MT-System.IO.FileSystem.Tests.WorkItemExecution dotnet/runtime#109638
865898 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution
865724 dotnet/runtime WasmTestOnFirefox-MT-System.Private.Xml.Tests.WorkItemExecution
864916 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange dotnet/runtime#109648
864790 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution dotnet/runtime#109634
864427 dotnet/runtime WasmTestOnFirefox-MT-System.Collections.Concurrent.Tests.WorkItemExecution
863922 dotnet/runtime WasmTestOnFirefox-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution
863764 dotnet/runtime WasmTestOnChrome-MT-Microsoft.Extensions.FileSystemGlobbing.Tests.WorkItemExecution dotnet/runtime#109584
863562 dotnet/runtime WasmTestOnFirefox-MT-Microsoft.Extensions.Configuration.Tests.WorkItemExecution dotnet/runtime#109540
863308 dotnet/runtime WasmTestOnFirefox-MT-System.IO.FileSystem.Tests.WorkItemExecution
863059 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange
862974 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.Tests.WorkItemExecution
862813 dotnet/runtime WasmTestOnFirefox-MT-System.Diagnostics.TraceSource.Tests.WorkItemExecution dotnet/runtime#109584
862819 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange dotnet/runtime#108906
862715 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Tests.WorkItemExecution dotnet/runtime#109544
862338 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution
860443 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution
860159 dotnet/runtime Workloads-Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.WorkItemExecution dotnet/runtime#109511
859673 dotnet/runtime WasmTestOnFirefox-MT-System.IO.Compression.Tests.WorkItemExecution
859273 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution
859186 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution dotnet/runtime#109363
858983 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution dotnet/runtime#108469
858785 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution
858680 dotnet/runtime WasmTestOnFirefox-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution dotnet/runtime#109454
858426 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution dotnet/runtime#109447
858382 dotnet/runtime WasmTestOnFirefox-MT-System.Private.Xml.Tests.WorkItemExecution dotnet/runtime#109232
858226 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.Loader.Tests.WorkItemExecution dotnet/runtime#109413
857959 dotnet/runtime WasmTestOnFirefox-MT-System.Runtime.Tests.WorkItemExecution
857523 dotnet/runtime WasmTestOnFirefox-MT-System.IO.FileSystem.Tests.WorkItemExecution dotnet/runtime#109278
857659 dotnet/runtime Workloads-Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.WorkItemExecution dotnet/runtime#108906
857377 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution dotnet/runtime#109079
857318 dotnet/runtime WasmTestOnChrome-MT-System.Text.Json.Tests.WorkItemExecution dotnet/runtime#109406
857266 dotnet/runtime WasmTestOnChrome-MT-System.Threading.RateLimiting.Tests.WorkItemExecution dotnet/runtime#104097
857072 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution dotnet/runtime#109393
856935 dotnet/runtime WasmTestOnFirefox-MT-Microsoft.Extensions.Configuration.UserSecrets.Tests.WorkItemExecution
856869 dotnet/runtime WasmTestOnFirefox-MT-System.IO.FileSystem.Tests.WorkItemExecution dotnet/runtime#109381
856133 dotnet/runtime WasmTestOnChrome-MT-System.IO.MemoryMappedFiles.Tests.WorkItemExecution dotnet/runtime#109363
855509 dotnet/runtime WasmTestOnFirefox-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution dotnet/runtime#104097
854889 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
853394 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange dotnet/runtime#109198
853397 dotnet/runtime WasmTestOnFirefox-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution dotnet/runtime#109229
853212 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution dotnet/runtime#109221
853042 dotnet/runtime WasmTestOnChrome-MT-Microsoft.Extensions.FileSystemGlobbing.Tests.WorkItemExecution
852731 dotnet/runtime Workloads-Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.WorkItemExecution dotnet/runtime#109198
852630 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution dotnet/runtime#109193
852578 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution dotnet/runtime#109118
852111 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution dotnet/runtime#109053
851775 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution dotnet/runtime#108999
851653 dotnet/runtime WasmTestOnFirefox-MT-System.Console.Manual.Tests.WorkItemExecution
851594 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange dotnet/runtime#108906
851504 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution dotnet/runtime#108731
850381 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution
849493 dotnet/runtime WasmTestOnFirefox-MT-System.Security.SecureString.Tests.WorkItemExecution dotnet/runtime#108999
849318 dotnet/runtime WasmTestOnChrome-MT-System.Private.Xml.Tests.WorkItemExecution
849193 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution dotnet/runtime#108188
848282 dotnet/runtime WasmTestOnChrome-MT-System.Reflection.Tests.WorkItemExecution dotnet/runtime#109053
848077 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange dotnet/runtime#109045
847491 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.Tests.WorkItemExecution dotnet/runtime#108876
846051 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange dotnet/runtime#108846
847306 dotnet/runtime WasmTestOnChrome-MT-System.Collections.Tests.WorkItemExecution dotnet/runtime#108876
847017 dotnet/runtime WasmTestOnChrome-MT-Wasm.Browser.Threads.Sample.WorkItemExecution dotnet/runtime#107769
846888 dotnet/runtime WasmTestOnChrome-MT-System.Net.WebSockets.Client.Tests.WorkItemExecution dotnet/runtime#109001
846739 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution dotnet/runtime#108968
846754 dotnet/runtime WasmTestOnFirefox-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution dotnet/runtime#108990
846663 dotnet/runtime WasmTestOnChrome-MT-Wasm.Browser.Threads.Sample.WorkItemExecution dotnet/runtime#108843
846212 dotnet/runtime Workloads-Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.WorkItemExecution dotnet/runtime#108970
845530 dotnet/runtime WasmTestOnFirefox-MT-System.Net.WebHeaderCollection.Tests.WorkItemExecution dotnet/runtime#107843
845330 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange dotnet/runtime#108949
845322 dotnet/runtime Wasm.Build.NativeRebuild.Tests.OptimizationFlagChangeTests.OptimizationFlagChange dotnet/runtime#108947
845163 dotnet/runtime WasmTestOnChrome-MT-Microsoft.Extensions.FileSystemGlobbing.Tests.WorkItemExecution
844098 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution dotnet/runtime#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 dotnet/runtime#108924
844019 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
843799 dotnet/runtime WasmTestOnChrome-MT-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution dotnet/runtime#108854
843683 dotnet/runtime WasmTestOnChrome-MT-System.IO.FileSystem.Tests.WorkItemExecution
843491 dotnet/runtime WasmTestOnChrome-MT-System.ServiceModel.Syndication.Tests.WorkItemExecution dotnet/runtime#108837
843225 dotnet/runtime WasmTestOnChrome-MT-System.Threading.Tasks.Tests.WorkItemExecution dotnet/runtime#108731
843135 dotnet/runtime WasmTestOnChrome-MT-System.IO.Compression.ZipFile.Tests.WorkItemExecution dotnet/runtime#108884

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
4 18 89

carlossanlop avatar Jul 12 '24 20:07 carlossanlop

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

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

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 avatar Jul 15 '24 10:07 maraf

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:

  • 9.0 PR: https://github.com/dotnet/runtime/pull/106878
  • Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=786393&view=logs&j=63c2d0c8-fec2-5788-81c8-f3ac95e8841f&t=744baa8c-2e26-50b3-27ca-51a0d84eca60
  • Log: https://helixre107v0xd1eu3ibi6ka.blob.core.windows.net/dotnet-runtime-refs-pull-106878-merge-469ebafd1a8446f1ab/WasmTestOnChrome-MT-System.Runtime.Tests/1/console.1dacad35.log?helixlogtype=result
  • Output:
[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

carlossanlop avatar Aug 23 '24 21:08 carlossanlop

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?

carlossanlop avatar Sep 04 '24 21:09 carlossanlop