-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[wasm] Invoking async [JSExport] and [JSImport] kills the process on node, but works in browser #92713
Comments
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsGiven following in C#: public static partial class Program
{
public static void Main () { }
[JSExport]
public static Task TestAsyncVoid () => Task.Delay(1);
} When invoking the method in node: const runtime = await dotnet.withExitCodeLogging().withConfig(config).create();
await runtime.runMain("EntryAssembly.dll", []);
const exports = await runtime.getAssemblyExports("EntryAssembly.dll");
await exports.Program.TestAsyncVoid();
console.log("finished"); — runtime exits without printing "finished" with the following log:
Same story with async I've also tried testing with bun, but it behaved the same. At the same time all this works fine in browser. Is there something I'm missing? Maybe some kind of switch or option when creating the runtime? Here is the repro (breaks on async calls in node, but works fine in browser): https://github.com/Elringus/JSInteropTest .NET 8 RC1
|
cc @pavelsavara |
Diff: https://github.com/dotnet/runtime/compare/b20f704cc00f390e5560a137deb8f0e64e863e1d..ef6283ac0a14c78d9e9fef4841545099bd7ad12b From: dotnet/runtime@b20f704 To: dotnet/runtime@ef6283a Commits: - Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230928.3 (#92816) dotnet/runtime@f1e4e90 - Changes from dotnet/runtime#92630 (#92753) dotnet/runtime@8632a75 - [release/8.0] [browser] Remove duplicated marshaling of return value for JSExport (#92886) dotnet/runtime@172d79a - fix dotnet/runtime#92713 (#92890) dotnet/runtime@8e365ee - [release/8.0] Update dependencies from dotnet/roslyn (#92503) dotnet/runtime@ef6283a [[ commit created by automation ]]
Diff: https://github.com/dotnet/runtime/compare/b20f704cc00f390e5560a137deb8f0e64e863e1d..ef6283ac0a14c78d9e9fef4841545099bd7ad12b From: dotnet/runtime@b20f704 To: dotnet/runtime@ef6283a Commits: - Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230928.3 (#92816) dotnet/runtime@f1e4e90 - Changes from dotnet/runtime#92630 (#92753) dotnet/runtime@8632a75 - [release/8.0] [browser] Remove duplicated marshaling of return value for JSExport (#92886) dotnet/runtime@172d79a - fix dotnet/runtime#92713 (#92890) dotnet/runtime@8e365ee - [release/8.0] Update dependencies from dotnet/roslyn (#92503) dotnet/runtime@ef6283a [[ commit created by automation ]]
Given following in C#:
When invoking the method in node:
— runtime exits without printing "finished" with the following log:
Same story with async
[JSImport]
's. Basically, any kind of concurrency doesn't work in node.I've also tried testing with bun, but it behaved the same.
At the same time all this works fine in browser.
Is there something I'm missing? Maybe some kind of switch or option when creating the runtime?
Here is the repro (breaks on async calls in node, but works fine in browser): https://github.com/Elringus/JSInteropTest
.NET 8 RC1
NodeJS v20.5.1
The text was updated successfully, but these errors were encountered: