Replies: 2 comments 2 replies
-
As you can see, there are open issue with MT and with web-workers. Is this scenario also related to a webworker ? We don't have automated tests for Electron. I don't know how different the V8 integration of promises would be there. Can you reproduce in a chrome browser and in firefox ? |
Beta Was this translation helpful? Give feedback.
-
Also are you sure that |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We're in the process of rebuilding an internal jQuery-based Electron application in Blazor + C#/WASM using a hybrid model: Replacing UI or backend code as we go. We run into the issue of .NET method calls being unreliable, and I have not seen any issue mentioning it so I wonder if I'm doing something wrong. I have the issue with both .NET 9.0, and the .NET 10 preview and both with the ST and MT runtime (
WasmEnableThreads
).Take this simple method to call. The contents actually turn out not to matter because when the method call hangs the managed code is never executed.
Small thing to make interop easier, note that iframes is used but dotnet itself also only initializes once in
window.top
itself.And the call itself (but as mentioned, it doesn't seem to matter what the signature or contents is):
Symptoms and observations:
[JSImport]
/[JSExport]
based calls. If we instead proxy through Blazor using[JSInvokable]
the issue does not occur. Must be noted though that JSInvokable appears to have ~20% overhead per call.WasmEnableThreads
is enabled or not (I took care to do a clean build given issue WasmEnableThreads incrementalism is broken #98502)So what does work is invoking through
myBlazorComponent.invokeMethodAsync('InitializeEfrDataStreamAsync')
and that works consistently.Additional context:
_framework
and_content
to the .NET development server. This is necessary in order to inject the proper COERS/CORP headers to supportSharedArrayBuffer
. Unfortunately it seems Electrons interception callbacks aren't properly called from web workers so this is a workaround.window.top
Unrelated issues in the same bucket: #106788 #114140 #114918 #76963
CC'ing @pavelsavara and @SteveSandersonMS who I had a conversation with in another issue.
Does anyone have any pointers or ideas?
Beta Was this translation helpful? Give feedback.
All reactions