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

[browser][MT] WebSocket is already in CLOSING or CLOSED state #97260

Closed
buyaa-n opened this issue Jan 21, 2024 · 5 comments
Closed

[browser][MT] WebSocket is already in CLOSING or CLOSED state #97260

buyaa-n opened this issue Jan 21, 2024 · 5 comments
Assignees
Labels
arch-wasm WebAssembly architecture area-System.Net 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
Milestone

Comments

@buyaa-n
Copy link
Member

buyaa-n commented Jan 21, 2024

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=535317
Build error leg or test failing: WasmTestOnBrowser-System.Net.WebSockets.Client.Tests.WorkItemExecution
Pull request: #97177

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "WebSocket is already in CLOSING or CLOSED state",
  "BuildRetry": false,
  "ErrorPattern": "",
  "ExcludeConsoleLog": false
}

From log:

[23:20:50] fail: [out of order message from the browser]: http://127.0.0.1:38015/_framework/dotnet.runtime.js 2 WebSocket is already in CLOSING or CLOSED state.
[23:20:50] info: [2024-01-20T23:20:50.279Z] [PASS] System.Net.WebSockets.Client.Tests.InvokerCloseTest.CloseOutputAsync_ServerInitiated_CanReceive(server: ws://127.0.0.1:38015/WebSocket/EchoWebSocket.ashx)
[23:20:50] info: [2024-01-20T23:20:50.281Z] [STRT] System.Net.WebSockets.Client.Tests.InvokerCloseTest.CloseOutputAsync_ServerInitiated_CanReceive(server: wss://127.0.0.1:41071/WebSocket/EchoWebSocket.ashx)
[23:20:50] fail: [out of order message from the browser]: http://127.0.0.1:38015/_framework/dotnet.runtime.js 2 WebSocket is already in CLOSING or CLOSED state.
[23:22:13] warn: MONO_WASM [0xdc19c-main]: WebSocket error {}
[23:22:13] fail: [out of order message from the browser]: http://127.0.0.1:38015/_framework/dotnet.runtime.js 2 WebSocket connection to 'ws://127.0.0.1:38015/WebSocket/EchoWebSocket.ashx?subprotocol=CustomProtocol' failed: Error during WebSocket handshake: Response must not include 'Sec-WebSocket-Protocol' header if not present in request: CustomProtocol
[23:22:13] info: [2024-01-20T23:22:13.323Z] [PASS] System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_PassNoSubProtocol_ServerRequires_ThrowsWebSocketException(server: ws://127.0.0.1:38015/WebSocket/EchoWebSocket.ashx)
[23:22:13] info: [2024-01-20T23:22:13.324Z] [STRT] System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_PassNoSubProtocol_ServerRequires_ThrowsWebSocketException(server: wss://127.0.0.1:41071/WebSocket/EchoWebSocket.ashx)
[23:22:13] warn: MONO_WASM [0xdc19c-main]: WebSocket error {}
[23:22:13] fail: [out of order message from the browser]: http://127.0.0.1:38015/_framework/dotnet.runtime.js 2 WebSocket connection to 'wss://127.0.0.1:41071/WebSocket/EchoWebSocket.ashx?subprotocol=CustomProtocol' failed: Error during WebSocket handshake: Response must not include 'Sec-WebSocket-Protocol' header if not present in request: CustomProtocol
[23:22:13] info: [2024-01-20T23:22:13.379Z] [PASS] System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_PassNoSubProtocol_ServerRequires_ThrowsWebSocketException(server: wss://127.0.0.1:41071/WebSocket/EchoWebSocket.ashx)
[23:22:13] info: [2024-01-20T23:22:13.382Z] [STRT] System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException
[23:22:13] warn: MONO_WASM [0xdc19c-main]: WebSocket error {}
[23:22:13] fail: [out of order message from the browser]: http://127.0.0.1:38015/_framework/dotnet.runtime.js 2 WebSocket connection to 'ws://127.0.0.1:43179/' failed: Connection closed before receiving a handshake response

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=535317
Error message validated: WebSocket is already in CLOSING or CLOSED state
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 1/23/2024 10:27:54 AM UTC

Report

Build Definition Test Pull Request
603285 dotnet/runtime WasmTestOnBrowser-System.Net.Http.Functional.Tests.WorkItemExecution #99703
602501 dotnet/runtime WasmTestOnBrowser-System.Net.Http.Functional.Tests.WorkItemExecution #98858
591649 dotnet/runtime WasmTestOnBrowser-System.Net.Http.Functional.Tests.WorkItemExecution #99349
591783 dotnet/runtime WasmTestOnBrowser-System.Net.Http.Functional.Tests.WorkItemExecution #99347
590127 dotnet/runtime WasmTestOnBrowser-System.Net.Http.Functional.Tests.WorkItemExecution #99327
583366 dotnet/runtime WasmTestOnBrowser-System.Net.Http.Functional.Tests.WorkItemExecution #99070
580589 dotnet/runtime WasmTestOnBrowser-System.Net.Http.Functional.Tests.WorkItemExecution #95001
579201 dotnet/runtime WasmTestOnBrowser-System.Net.Http.Functional.Tests.WorkItemExecution #98802
578246 dotnet/runtime WasmTestOnBrowser-System.Net.Http.Functional.Tests.WorkItemExecution #98852
576845 dotnet/runtime WasmTestOnBrowser-System.Net.Http.Functional.Tests.WorkItemExecution #98802
576320 dotnet/runtime WasmTestOnBrowser-System.Net.Http.Functional.Tests.WorkItemExecution #98802
575939 dotnet/runtime WasmTestOnBrowser-System.Net.Http.Functional.Tests.WorkItemExecution #98802
575598 dotnet/runtime WasmTestOnBrowser-System.Net.Http.Functional.Tests.WorkItemExecution #98802
574940 dotnet/runtime WasmTestOnBrowser-System.Net.Http.Functional.Tests.WorkItemExecution #98118

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 13
@buyaa-n buyaa-n added 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 labels Jan 21, 2024
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jan 21, 2024
@ghost
Copy link

ghost commented Jan 21, 2024

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

Issue Details

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=534656
Build error leg or test failing: WasmTestOnBrowser-System.Net.WebSockets.Client.Tests.WorkItemExecution
Pull request: #97177

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "out of order message from the browser",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

From log:

[23:20:50] fail: [out of order message from the browser]: http://127.0.0.1:38015/_framework/dotnet.runtime.js 2 WebSocket is already in CLOSING or CLOSED state.
[23:20:50] info: [2024-01-20T23:20:50.279Z] [PASS] System.Net.WebSockets.Client.Tests.InvokerCloseTest.CloseOutputAsync_ServerInitiated_CanReceive(server: ws://127.0.0.1:38015/WebSocket/EchoWebSocket.ashx)
[23:20:50] info: [2024-01-20T23:20:50.281Z] [STRT] System.Net.WebSockets.Client.Tests.InvokerCloseTest.CloseOutputAsync_ServerInitiated_CanReceive(server: wss://127.0.0.1:41071/WebSocket/EchoWebSocket.ashx)
[23:20:50] fail: [out of order message from the browser]: http://127.0.0.1:38015/_framework/dotnet.runtime.js 2 WebSocket is already in CLOSING or CLOSED state.
[23:22:13] warn: MONO_WASM [0xdc19c-main]: WebSocket error {}
[23:22:13] fail: [out of order message from the browser]: http://127.0.0.1:38015/_framework/dotnet.runtime.js 2 WebSocket connection to 'ws://127.0.0.1:38015/WebSocket/EchoWebSocket.ashx?subprotocol=CustomProtocol' failed: Error during WebSocket handshake: Response must not include 'Sec-WebSocket-Protocol' header if not present in request: CustomProtocol
[23:22:13] info: [2024-01-20T23:22:13.323Z] [PASS] System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_PassNoSubProtocol_ServerRequires_ThrowsWebSocketException(server: ws://127.0.0.1:38015/WebSocket/EchoWebSocket.ashx)
[23:22:13] info: [2024-01-20T23:22:13.324Z] [STRT] System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_PassNoSubProtocol_ServerRequires_ThrowsWebSocketException(server: wss://127.0.0.1:41071/WebSocket/EchoWebSocket.ashx)
[23:22:13] warn: MONO_WASM [0xdc19c-main]: WebSocket error {}
[23:22:13] fail: [out of order message from the browser]: http://127.0.0.1:38015/_framework/dotnet.runtime.js 2 WebSocket connection to 'wss://127.0.0.1:41071/WebSocket/EchoWebSocket.ashx?subprotocol=CustomProtocol' failed: Error during WebSocket handshake: Response must not include 'Sec-WebSocket-Protocol' header if not present in request: CustomProtocol
[23:22:13] info: [2024-01-20T23:22:13.379Z] [PASS] System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_PassNoSubProtocol_ServerRequires_ThrowsWebSocketException(server: wss://127.0.0.1:41071/WebSocket/EchoWebSocket.ashx)
[23:22:13] info: [2024-01-20T23:22:13.382Z] [STRT] System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException
[23:22:13] warn: MONO_WASM [0xdc19c-main]: WebSocket error {}
[23:22:13] fail: [out of order message from the browser]: http://127.0.0.1:38015/_framework/dotnet.runtime.js 2 WebSocket connection to 'ws://127.0.0.1:43179/' failed: Connection closed before receiving a handshake response
Author: buyaa-n
Assignees: -
Labels:

area-System.Net, blocking-clean-ci, Known Build Error

Milestone: -

@CarnaViire CarnaViire added the os-browser Browser variant of arch-wasm label Jan 22, 2024
@pavelsavara pavelsavara self-assigned this Jan 22, 2024
@pavelsavara pavelsavara added the arch-wasm WebAssembly architecture label Jan 22, 2024
@ghost
Copy link

ghost commented Jan 22, 2024

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

Issue Details

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=534656
Build error leg or test failing: WasmTestOnBrowser-System.Net.WebSockets.Client.Tests.WorkItemExecution
Pull request: #97177

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "out of order message from the browser",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

From log:

[23:20:50] fail: [out of order message from the browser]: http://127.0.0.1:38015/_framework/dotnet.runtime.js 2 WebSocket is already in CLOSING or CLOSED state.
[23:20:50] info: [2024-01-20T23:20:50.279Z] [PASS] System.Net.WebSockets.Client.Tests.InvokerCloseTest.CloseOutputAsync_ServerInitiated_CanReceive(server: ws://127.0.0.1:38015/WebSocket/EchoWebSocket.ashx)
[23:20:50] info: [2024-01-20T23:20:50.281Z] [STRT] System.Net.WebSockets.Client.Tests.InvokerCloseTest.CloseOutputAsync_ServerInitiated_CanReceive(server: wss://127.0.0.1:41071/WebSocket/EchoWebSocket.ashx)
[23:20:50] fail: [out of order message from the browser]: http://127.0.0.1:38015/_framework/dotnet.runtime.js 2 WebSocket is already in CLOSING or CLOSED state.
[23:22:13] warn: MONO_WASM [0xdc19c-main]: WebSocket error {}
[23:22:13] fail: [out of order message from the browser]: http://127.0.0.1:38015/_framework/dotnet.runtime.js 2 WebSocket connection to 'ws://127.0.0.1:38015/WebSocket/EchoWebSocket.ashx?subprotocol=CustomProtocol' failed: Error during WebSocket handshake: Response must not include 'Sec-WebSocket-Protocol' header if not present in request: CustomProtocol
[23:22:13] info: [2024-01-20T23:22:13.323Z] [PASS] System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_PassNoSubProtocol_ServerRequires_ThrowsWebSocketException(server: ws://127.0.0.1:38015/WebSocket/EchoWebSocket.ashx)
[23:22:13] info: [2024-01-20T23:22:13.324Z] [STRT] System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_PassNoSubProtocol_ServerRequires_ThrowsWebSocketException(server: wss://127.0.0.1:41071/WebSocket/EchoWebSocket.ashx)
[23:22:13] warn: MONO_WASM [0xdc19c-main]: WebSocket error {}
[23:22:13] fail: [out of order message from the browser]: http://127.0.0.1:38015/_framework/dotnet.runtime.js 2 WebSocket connection to 'wss://127.0.0.1:41071/WebSocket/EchoWebSocket.ashx?subprotocol=CustomProtocol' failed: Error during WebSocket handshake: Response must not include 'Sec-WebSocket-Protocol' header if not present in request: CustomProtocol
[23:22:13] info: [2024-01-20T23:22:13.379Z] [PASS] System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_PassNoSubProtocol_ServerRequires_ThrowsWebSocketException(server: wss://127.0.0.1:41071/WebSocket/EchoWebSocket.ashx)
[23:22:13] info: [2024-01-20T23:22:13.382Z] [STRT] System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException
[23:22:13] warn: MONO_WASM [0xdc19c-main]: WebSocket error {}
[23:22:13] fail: [out of order message from the browser]: http://127.0.0.1:38015/_framework/dotnet.runtime.js 2 WebSocket connection to 'ws://127.0.0.1:43179/' failed: Connection closed before receiving a handshake response

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=534656
Error message validated: out of order message from the browser
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 1/21/2024 2:21:15 AM UTC

Report

Build Definition Test Pull Request
535319 dotnet/runtime WasmTestOnBrowser-System.Threading.Tasks.Parallel.Tests.WorkItemExecution #97270
535337 dotnet/runtime Workloads-Wasm.Build.Tests.BuildPublishTests.WorkItemExecution #97096
535317 dotnet/runtime WasmTestOnBrowser-System.Net.WebSockets.Client.Tests.WorkItemExecution #97270
535095 dotnet/runtime WasmTestOnBrowser-System.Numerics.Tensors.Tests.WorkItemExecution #97282
535009 dotnet/runtime WasmTestOnBrowser-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #97270
534977 dotnet/runtime WasmTestOnBrowser-System.Runtime.InteropServices.JavaScript.Tests.WorkItemExecution #97270
534656 dotnet/runtime WasmTestOnBrowser-System.Net.WebSockets.Client.Tests.WorkItemExecution #97177
534478 dotnet/runtime WasmTestOnBrowser-System.Net.WebSockets.Client.Tests.WorkItemExecution #97152
534443 dotnet/runtime WasmTestOnBrowser-System.Net.WebSockets.Client.Tests.WorkItemExecution #97098
534303 dotnet/runtime WasmTestOnBrowser-System.Net.WebSockets.Client.Tests.WorkItemExecution #96941
534263 dotnet/runtime WasmTestOnBrowser-System.Net.WebSockets.Client.Tests.WorkItemExecution #97192

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
6 11 11
Author: buyaa-n
Assignees: pavelsavara
Labels:

arch-wasm, area-System.Net, blocking-clean-ci, untriaged, Known Build Error, os-browser

Milestone: -

@pavelsavara
Copy link
Member

I updated the search filter because out of order message from the browser is too generic and happens even when everything is OK.

@pavelsavara pavelsavara added this to the 9.0.0 milestone Jan 22, 2024
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jan 22, 2024
@pavelsavara pavelsavara changed the title WasmTestOnBrowser-System.Net.WebSockets.Client.Tests failed on browser-wasm linux Release LibraryTests_Threading_Smoke CI leg [browser][MT] WebSocket is already in CLOSING or CLOSED state Feb 22, 2024
@pavelsavara
Copy link
Member

@ilonatommy do we know what fixed this ?

@ilonatommy
Copy link
Member

Most probably the fact that we used to reject all the attempts to receive when the socket was closed and now we keep letting the receive request to pass as long as there is indeed something in the buffer to be received, regardless of the WS state. #99612

@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-System.Net 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
Projects
None yet
Development

No branches or pull requests

4 participants