Skip to content

regression: Node.JS process doesn't exit on Windows #2970

@barjin

Description

@barjin

The Node.JS process using a napi-rs-built package hangs indefinitely when it should exit on Windows. At this stage, the process doesn't accept any signals (CTRL+C etc.) and has to be killed.

No sightings of such behavior on Linux / MacOS.

I bisected the napi-rs history - this error is not present in eef8221, but reproduces with every version after 913e42f (so likely introduced in #2850).

import { Impit } from "./index.wrapper.js";

const impit = new Impit();
const response = await impit.fetch("http://localhost:3000/");

console.log(await response.text());
// Logs the response text, but hangs indefinitely afterwards
// Removing all async calls => doesn't hang and exits as expected.

Unfortunately, my knowledge of NAPI internals is limited. Feel free to let me know if I can provide any more information. Thank you for this project!

Original report at apify/impit#290

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions