Skip to content

Process doesn't exit after fetch completes in v0.5.4 and v0.6.0 (works in v0.5.3) #290

@laertes0

Description

@laertes0

Description

Starting from version 0.5.4, the Node.js process doesn't exit after completing a fetch request and becomes completely unresponsive. The same code works correctly in versions 0.5.2 and 0.5.3 where the process exits normally.

Environment

  • OS: Windows 11
  • Node.js: v22.20.0
  • impit versions tested:
    • ✅ 0.5.2 - works
    • ✅ 0.5.3 - works
    • ❌ 0.5.4 - hangs
    • ❌ 0.6.0 - hangs

Steps to Reproduce

Using the example code from the documentation:

import { Impit } from 'impit';

const impit = new Impit({
    browser: "chrome",
    ignoreTlsErrors: true,
});

const response = await impit.fetch("https://example.com");
console.log(response.status);
console.log(response.headers);
console.log(await response.text());

Run the script from cmd: node script.js

Expected Behavior

The process should exit after printing the response data.

Actual Behavior

The response data is printed correctly, but the process doesn't exit and becomes completely unresponsive:

  • The command prompt is frozen
  • Ctrl+C has no effect
  • Only closing the terminal window (Alt+F4) terminates the process

This suggests the process is completely hung rather than just waiting for something.

Workaround

Downgrading to version 0.5.3 resolves the issue.

Metadata

Metadata

Assignees

Labels

t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions