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

javascript calling a method with return Task type in .net 9.0 preview6, the returned promise is always in pending state #104772

Closed
dczuo opened this issue Jul 12, 2024 · 1 comment · Fixed by #105464
Assignees
Labels
arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript in-pr There is an active PR which will close this issue when it is merged os-browser Browser variant of arch-wasm
Milestone

Comments

@dczuo
Copy link

dczuo commented Jul 12, 2024

Description

return Task is fine.

Reproduction Steps

c#

[JSExport]
internal static Task ReturnTask()
{
    return Task.CompletedTask;
}

javascript

let p = (await getAssemblyExports(assemblyName)).namespaceName.className.ReturnTask();
console.log(p);

Expected behavior

PromiseState is resolved

Actual behavior

PromiseState is pending

Regression?

Yes, .net8.0 is fine.

Known Workarounds

No response

Configuration

.NET SDK:9.0.100-preview.6.24328.19
Microsoft.NETCore.App: 9.0.0-preview.6.24327.7

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jul 12, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jul 12, 2024
@vcsjones vcsjones added area-System.Runtime.InteropServices.JavaScript and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jul 15, 2024
@lewing lewing added this to the 9.0.0 milestone Jul 15, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Jul 15, 2024
@lewing lewing added the os-browser Browser variant of arch-wasm label Jul 15, 2024
@pavelsavara pavelsavara added the arch-wasm WebAssembly architecture label Jul 29, 2024
@pavelsavara pavelsavara self-assigned this Jul 30, 2024
@pavelsavara
Copy link
Member

thanks for reporting it @dczuo

@dotnet-policy-service dotnet-policy-service bot added the in-pr There is an active PR which will close this issue when it is merged label Aug 1, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 31, 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.Runtime.InteropServices.JavaScript in-pr There is an active PR which will close this issue when it is merged os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants