microsoft / microsoft/node-api-dotnet

Trying to run NodeWorkers from an ASP.NET Core application

Open
#450 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.