Skip to content

regression: UnhandledPromiseRejection is not fired until process is terminated #24209

Closed
@aslushnikov

Description

@aslushnikov
  • Version: v9.11.2, v10.11.0 and v11.1.0
  • Platform: x86_64 GNU/Linux

Repro

  1. save this is script.js:
Promise.reject(1);
setTimeout(() => {}, 2000);
  1. run node script.js

Expected: the UnhandledPromiseRejection is reported as soon as it happens; the node.js process
exits after 2 seconds.
Actual: nothing happens for 2 seconds, then the node.js process exits and only then prints UnhandledPromieRejection.

This works as expected in v8.12.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    promisesIssues and PRs related to ECMAScript promises.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions