Skip to content

[wasm] Test failure when AOT'ed with SIMD support - JSException : TypeError: globalThis.WebSocket is not a constructor #75098

Description

@radical
  • System.Net.Http.Functional.Tests compiled with AOT, and SIMD support, running with nodejs.

  • Build, and log:

Starting:    System.Net.Http.Functional.Tests.dll
[FAIL] System.Net.Http.Functional.Tests.HttpRequestMessageTest.HttpRequest_BodylessMethod_NoContentLength(method: "DELETE")
System.Runtime.InteropServices.JavaScript.JSException : TypeError: globalThis.WebSocket is not a constructor
   at System.Net.WebSockets.BrowserWebSocket.ConnectAsyncCore(Uri , List`1 , CancellationToken )
   at System.Net.WebSockets.ClientWebSocket.ConnectAsyncCore(Uri , HttpMessageInvoker , CancellationToken )
   at System.Net.Test.Common.LoopbackServer.ListenAsync()
   at System.Net.Test.Common.LoopbackServer.CreateServerAsync(Func`2 funcAsync, Options options)
   at System.Net.Http.Functional.Tests.HttpRequestMessageTest.HttpRequest_BodylessMethod_NoContentLength(String method)
--- End of stack trace from previous location ---
    at Object.Ca [as ws_wasm_create] (file:///datadisks/disk1/work/ADA60980/w/C6810A80/e/wasm_build/AppBundle/dotnet.js:5:86421)
    at _bound_js_INTERNAL_ws_wasm_create (https://dotnet.generated.invalid/_bound_js_INTERNAL_ws_wasm_create:10:21)
    at Object.Ss (file:///datadisks/disk1/work/ADA60980/w/C6810A80/e/wasm_build/AppBundle/dotnet.js:5:51753)
    at _mono_wasm_invoke_bound_function (file:///datadisks/disk1/work/ADA60980/w/C6810A80/e/wasm_build/AppBundle/dotnet.js:6029:76)
    at aot_wrapper_System_dot_Runtime_dot_InteropServices_dot_JavaScript_System_dot_Runtime_dot_InteropServices_dot_JavaScript__Interop_sl_Runtime__InvokeJSFunction_pinvoke_void_iicl7_void_2a_void_iicl7_void_2a_ (<anonymous>:wasm-function[83392]:0x14295a4)
    at System_Net_WebSockets_Client_System_Net_WebSockets_BrowserInterop_WebSocketCreate_string_string___intptr_System_Action_2_int_string (<anonymous>:wasm-function[56320]:0xfb79f7)
    at System_Net_WebSockets_Client_System_Net_WebSockets_BrowserInterop_UnsafeCreate_string_string___System_Buffers_MemoryHandle_System_Action_2_int_string (<anonymous>:wasm-function[56321]:0xfb7ac3)
...

cc @radekdoulik @pavelsavara

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions