browser-Release-wasm-Mono_Release-WasmTestOnChrome fails with WebSocketException
Build Information
Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=657270 Build error leg or test failing: WasmTestOnChrome-MT-System.Net.Http.Functional.Tests.WorkItemExecution Pull request: https://github.com/dotnet/runtime/pull/101188
Error Message
Fill the error message using step by step known issues guidance.
{
"ErrorMessage": "The remote party closed the WebSocket connection without completing the close handshake",
"BuildRetry": false,
"ExcludeConsoleLog": false
}
Known issue validation
Build: :mag_right: https://dev.azure.com/dnceng-public/public/_build/results?buildId=657270
Error message validated: [The remote party closed the WebSocket connection without completing the close handshake]
Result validation: :white_check_mark: Known issue matched with the provided build.
Validation performed at: 4/26/2024 6:13:23 PM UTC
Report
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 5 | 11 | 36 |
Tagging subscribers to this area: @dotnet/ncl See info in area-owners.md if you want to be subscribed.
This is complaint by the xharness which is hosting the web server. It doesn't mean that the test failed. It's probably caused by WebWorker being killed while the web-socket which is shipping console log is still open.
I think we should just silence the xharness WasmBrowserTestRunner.RunConsoleMessagesPump is such case or make it just warning.
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN4RQAG12KRC", Request id "0HN4RQAG12KRC:00000001": An unhandled exception was thrown by the application.
System.Net.WebSockets.WebSocketException (2): The remote party closed the WebSocket connection without completing the close handshake.
at System.Net.WebSockets.ManagedWebSocket.ThrowEOFUnexpected()
at System.Net.WebSockets.ManagedWebSocket.EnsureBufferContainsAsync(Int32 minimumRequiredBytes, CancellationToken cancellationToken)
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TResult](Memory`1 payloadBuffer, CancellationToken cancellationToken)
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TResult](Memory`1 payloadBuffer, CancellationToken cancellationToken)
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
at System.Threading.Tasks.ValueTask`1.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state)
--- End of stack trace from previous location ---
at Microsoft.DotNet.XHarness.CLI.Commands.Wasm.WasmBrowserTestRunner.RunConsoleMessagesPump(WebSocket socket, CancellationToken token) in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/WASM/Browser/WasmBrowserTestRunner.cs:line 174
at Microsoft.DotNet.XHarness.CLI.Commands.WebServer.TestWebServerStartup.<>c__DisplayClass3_0.<<Configure>b__2>d.MoveNext() in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/WebServer.cs:line 174
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
No failures after the fix: https://github.com/dotnet/xharness/pull/1231.