microsoft / microsoft/node-api-dotnet
Streams are broken in electron
Open
@vmoroz is already working on this.
Since Mar 14, 2025.
- Dominant language
- C#
- Stars
- 783
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
I have the following trivial method:
public static Stream TestStream()
{
return new MemoryStream(System.Text.Encoding.UTF8.GetBytes("hello"));
}
I'm noticing a different behavior when I use it in Electron compared to Node.js - even though there's no error, the Electron version appears empty:
console.log(MyClass.testStream().read()); // null in electron, Buffer in Node.js
Potentially related to https://github.com/microsoft/node-api-dotnet/issues/383, although I'm unsure if this implementation somehow uses external buffers?
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.
Assessment
This issue has not been assessed yet.