Repository navigation
Inspect debug> restart There was an internal error in node-inspect. ECONNRESET Error: read ECONNRESET #37224
Description
Activity
- 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 - addedinspectorIssues and PRs related to the V8 inspector protocol.Issues and PRs related to the V8 inspector protocol.
on Feb 9, 2021 I'm experiencing the same issue
node v15.5.1
Windows 10 Pro 20H2There 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)Same here.
node v15.0.1
Windows 10 Enterprise v1809debug> 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 confirm that this bug also happens with Node.js 15.0.0? And that it isn't there with Node.js 14.x?
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.
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 free14.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>Reacted by eiymba and Rich TrottBisecting 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.
Reacted by eiymba-
@ronag Do you have any idea what might be the cause of this? Or the correct fix? I imagine that somewhere
deps/node-inspectneeds 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.)Guess I'll ping @jkrems too in case he has any insight from the
node-inspectside.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.
Reacted by Rich TrottI 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 singlehttpReswithout 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.
Reacted by Rich Trott@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)?
19 remaining items
- added a commit that references this issue
on Apr 29, 2021 - added 2 commits that reference this issue
on Jul 16, 2021

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> restartHow 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?
Additional information