Skip to content

replServer.setupHistory() silently discards callback errors since v24.2.0 #60837

Description

@illusory-dream

Version

26.0.0-pre

Platform

Linux ubuntu 6.8.0-87-generic #88-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 09:28:41 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Microsoft Windows NT 10.0.26200.0 x64

Subsystem

No response

What steps will reproduce the bug?

  1. Add an intentional bad assert in the file of test case: test\parallel\test-repl-history-perm.js
Image
  1. Run python tools/test.py --mode=release parallel
  2. It reported "All tests passed."
Image

How often does it reproduce? Is there a required condition?

I can reproduce it everytime

What is the expected behavior? Why is that the expected behavior?

Test failed as 1 not equal 2 obviously.

What do you see instead?

[00:51]% 100|+ 3953|- 0]: Done

All tests passed.

Additional information

I try several versions of node. It seemed to happen from v24.2.0.
This is screenshot of v24.1.0

Image

Activity

  1. Renegade334 commented on Nov 24, 2025

    @Renegade334
    Member

    The test cases are reachable. The issue is that setupHistory() is not propagating errors thrown within the callback itself, and is just silently discarding them instead, which is a regression from #58225. (cc @puskin)

  2. added
    replIssues and PRs related to the REPL subsystem.
    on Nov 24, 2025
  3. changed the title [-]Some test cases seem unreachable?[/-] [+]`replServer.setupHistory()` silently discards callback errors since v24.2.0[/+] on Nov 26, 2025
  4. added a commit that references this issue on Nov 30, 2025
    0e8e266
  5. SudhansuBandha commented on Jun 17, 2026

    @SudhansuBandha
    Contributor

    this[kContext].once('flushHistory', () => {
    if (!this[kContext].closed) {
    this[kContext].resume();
    onReadyCallback(null, this[kContext]);
    }
    });

    I have observed since this is an event listener getting called hence the error propagation were not observed. Updating tests to asynchronous pattern is able to catch these assertion errors.

    I have created a PR for this.
    @Renegade334 @puskin

  6. github-actions commented on Sep 16, 2026

    @github-actions
    Contributor

    This issue has been marked as stale due to 90 days of inactivity.
    It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

  7. added
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    replIssues and PRs related to the REPL subsystem.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions