Skip to content

Inspect debug> restart There was an internal error in node-inspect. ECONNRESET Error: read ECONNRESET  #37224

Description

@YATINDRA-07
  • Version: 15.2.0
  • Platform:Microsoft Windows NT 10.0.19041.0 x64
  • Subsystem:

What steps will reproduce the bug?

Whenever I use debugger and inspect option and after completing the debug in chrome, then giving restart command in vs code terminal here :
debug> restart

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

Every time when I enter restart in debug > screen

What is the expected behavior?

Restart the inspect/debugger in chrome

What do you see instead?

debug> restart
There was an internal error in node-inspect. Please report this bug.
read ECONNRESET
Error: read ECONNRESET
    at TCP.onStreamRead (node:internal/stream_base_commons:213:20)
    at TCP.callbackTrampoline (node:internal/async_hooks:129:14)

Additional information

Activity

  1. changed the title [-]Inspect debug> restart There was an internal error in node-inspect. Please report this bug. read ECONNRESET Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:213:20) at TCP.callbackTrampoline (node:internal/async_hooks:129:14)[/-] [+]Inspect debug> restart There was an internal error in node-inspect. ECONNRESET Error: read ECONNRESET [/+] on Feb 4, 2021
  2. added
    inspectorIssues and PRs related to the V8 inspector protocol.
    on Feb 9, 2021
  3. picklit commented on Feb 20, 2021

    @picklit

    I'm experiencing the same issue
    node v15.5.1
    Windows 10 Pro 20H2

    There was an internal error in node-inspect. Please report this bug.
    read ECONNRESET
    Error: read ECONNRESET
        at TCP.onStreamRead (node:internal/stream_base_commons:213:20)
        at TCP.callbackTrampoline (node:internal/async_hooks:131:14)
    
  4. MattLusher commented on Mar 22, 2021

    @MattLusher

    Same here.
    node v15.0.1
    Windows 10 Enterprise v1809

    debug> restart
    There was an internal error in node-inspect. Please report this bug.
    read ECONNRESET
    Error: read ECONNRESET
        at TCP.onStreamRead (node:internal/stream_base_commons:213:20)
        at TCP.callbackTrampoline (node:internal/async_hooks:129:14)
    
  5. Trott commented on Apr 12, 2021

    @Trott
    Member

    Is anyone able to confirm that this bug also happens with Node.js 15.0.0? And that it isn't there with Node.js 14.x?

  6. Trott commented on Apr 12, 2021

    @Trott
    Member

    Is anyone able to test with Node.js 14.5.0 and/or Node.js 14.4.0? 14.4.0 has node-inspect 1.x and 14.5.0 is the first version with node-inspect 2.0.0.

  7. eritbh commented on Apr 15, 2021

    @eritbh

    Is anyone able to confirm that this bug also happens with Node.js 15.0.0? And that it isn't there with Node.js 14.x?

    Confirmed not working on 15.0.0:

    Microsoft Windows [Version 10.0.19041.928]
    (c) Microsoft Corporation. All rights reserved.
    
    C:\Users\Erin>node --version
    v15.0.0
    
    C:\Users\Erin>node inspect test.js
    < Debugger listening on ws://127.0.0.1:9229/4feaf157-29ea-4552-bc83-7259da
    < 104fe9
    < For help, see: https://nodejs.org/en/docs/inspector
    < Debugger attached.
    Break on start in test.js:1
    > 1 let a = 1;
      2 a += 1;
      3 module.exports = a;
    debug> restart
    There was an internal error in node-inspect. Please report this bug.
    read ECONNRESET
    Error: read ECONNRESET
        at TCP.onStreamRead (node:internal/stream_base_commons:213:20)
        at TCP.callbackTrampoline (node:internal/async_hooks:129:14)
    

    Is anyone able to test with Node.js 14.5.0 and/or Node.js 14.4.0? 14.4.0 has node-inspect 1.x and 14.5.0 is the first version with node-inspect 2.0.0.

    14.4.0 seems like it's not working for an unrelated reason for me, so unable to confirm:

    C:\Users\Erin>node --version
    v14.4.0
    
    C:\Users\Erin>node inspect test.js
    Timeout (2000) waiting for 127.0.0.1:9229 to be free
    

    14.5.0 appears to be working as intended:

    C:\Users\Erin>node --version
    v14.5.0
    
    C:\Users\Erin>node inspect test.js
    < Debugger listening on ws://127.0.0
    < .1:9229/0df96a4b-f0d2-46f3-b975-52de39d64849
    < For help, see: https://nodejs.org/en/docs/inspector
    < Debugger attached.
    Break on start in test.js:1
    > 1 let a = 1;
      2 a += 1;
      3 module.exports = a;
    debug> restart
    < Debugger listening on ws://127.0.0.1:9229/0df96a4b-f0d2-46f3-b975-52de39d64849
    < For help, see: https://nodejs.org/en/docs/inspe
    debug> (node:8416) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead.
    (Use `node --trace-deprecation ...` to show where the warning was created)
    < Debugger listening on ws://127.0.0.1:9229/5337b1a4-e816-4ce9-b9df-8f5de3163c67
    < For help, see: https://nodejs.org/en/docs/inspector
    < Debugger attached.
    Break on start in test.js:1
    > 1 let a = 1;
      2 a += 1;
      3 module.exports = a;
    debug>
    
  8. eiymba commented on Apr 15, 2021

    @eiymba

    Inspector broken in node version 15 on windows

  9. Trott commented on Apr 15, 2021

    @Trott
    Member

    @eritbh @eiymba Working in 14.5.0 was definitely not the result I was expecting so that's a huge help. Thank you!

  10. Trott commented on Apr 16, 2021

    @Trott
    Member

    Bisecting on CI indicates 28e6626 introduced this problem.

    • 28e6626 was introduced in 15.0.0, so that's consistent with all 15.x versions showing this problem.

    • 28e6626 was introduced in 14.x as b634d4b, which first showed up in 14.3..0. Tests above indicate this bug is in 14.4.0 and disappears again in 14.5.0. Sure enough, the changelog for 14.5.0 shows that b634d4b was reverted. The revert ended up landing in 14.x as 7fdb507. So that explains why 14.5.0 started working again.

  11. Trott commented on Apr 16, 2021

    @Trott
    Member

    @ronag Do you have any idea what might be the cause of this? Or the correct fix? I imagine that somewhere deps/node-inspect needs modification and not the underlying core streams, but I'm having a hard time figuring out exactly what is going on. (It's a Windows-only problem which isn't helping me, unfortunately.)

  12. Trott commented on Apr 16, 2021

    @Trott
    Member

    Guess I'll ping @jkrems too in case he has any insight from the node-inspect side.

  13. eiymba commented on Apr 16, 2021

    @eiymba

    You can DM on twitter and we can sit down together and pair program it. Download liveshare VS code extension and I'll give you access to my terminal so you have a Windows environment to work with.

  14. hybrist commented on Apr 16, 2021

    @hybrist
    Contributor

    I have no good theory here. The reset of the TCP connection makes sense on restart but afaict we pretty consistently attach error handlers to the HTTP requests and responses in inspect_client.js. There is a single httpRes without an error handler. I'm not sure if attaching a noop error handler there is enough to fix this?

    P.S.: I don't understand though why the commit linked above would cause more ECONNRESET errors and/or why those errors would only happen on a specific platform.

  15. Trott commented on Apr 17, 2021

    @Trott
    Member

    @nodejs/platform-windows Any ideas how to debug this or what the cause might be? Maybe something to do with the way stdio on Windows is handled differently than on POSIX (buffering and so forth)?

  16. 19 remaining items

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

    inspectorIssues and PRs related to the V8 inspector protocol.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions