microsoft / microsoft/node-api-dotnet
Trying to run NodeWorkers from an ASP.NET Core application
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 783
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
I've taken the code that's in NodejsEmbeddingTest.cs in the WorkerMessages and tried to get it to run in both a console and ASP.NET Core application, but it fails saying that a stream has been closed.
Specifically, it fails in RuntimeConfigureCallbackAdapter after the callback has been completed successfully and NodeEmbeddingStatus.OK is being returned. It just fails with no exception. Disabling Just my code revealed no other errors and nothing specifically crashed that I could find.
I do not have this issue when running the same exact code in the unit tests. Any ideas on what needs to be set up to enable this?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the NodejsEmbeddingTest.cs code in WorkerMessages with its execution in the console and ASP.NET Core applications, focusing on the stream-closed failure in RuntimeConfigureCallbackAdapter after NodeEmbeddingStatus.OK. Reproduce the issue outside the unit tests and identify the setup difference required for the callback to complete without closing the stream.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100