You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 1, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 1, 2022. It is now read-only.
Internal error in node-inspect. Please report this bug. #60
When the port is busy – node-inspect throws a timeout exception which is logged as an internal error.
Version: v9.7.1
Platform: Windows 10 x64
Subsystem: node-inspect
node debug .
(node:14108) [DEP0068] DeprecationWarning: `node debug` is deprecated. Please use `node inspect` instead.
There was an internal error in node-inspect. Please report this bug.
Timeout (2000) waiting for 127.0.0.1:9229 to be free
Error: Timeout (2000) waiting for 127.0.0.1:9229 to be free
at Timeout.setTimeout [as _onTimeout] (node-inspect/lib/_inspect.js:54:14)
at ontimeout (timers.js:466:11)
at tryOnTimeout (timers.js:304:5)
at Timer.listOnTimeout (timers.js:267:5)
Would logging a message followed by process.exit(1) in the timer callback work?
Suggestion by @jkrems:
Alternatively: making it a non-fatal error. "Failed to start app. Please check that the port isn't used by anything else. Use run to try again." etc.. Another solution would be to use a custom code and/or error class (StartupError) and exclude that from the internal error message. But that seems a bit more hacky.
@bnoordhuis I think it will work. But I'm not sure is it good to process.exit(1) in 2 places 🤔
@jkrems I'm not quite sure what you mean by making it non-fatal error. To not reject? Create another type of handler? Could you give me an example?
By "non-fatal error" I meant starting the repl instead of exiting the node-inspect process. Then the user just needs to type restart to retry if they fixed the other process. That might also address cases where the app crashed, the user is trying to run it again (run<enter>), and they run into the same problem (another process is blocking the port).
But I'd be more than happy to merge a simpler solution that just hides away the "internal error" message somehow. There's always time to improve the UX even further in the future.
Activity
hybrist commentedon Mar 21, 2018
Suggestion by @bnoordhuis:
Suggestion by @jkrems:
LEQADA commentedon Mar 21, 2018
@bnoordhuis I think it will work. But I'm not sure is it good to
process.exit(1)in 2 places 🤔@jkrems I'm not quite sure what you mean by making it non-fatal error. To not reject? Create another type of handler? Could you give me an example?
hybrist commentedon Mar 21, 2018
By "non-fatal error" I meant starting the repl instead of exiting the
node-inspectprocess. Then the user just needs to typerestartto retry if they fixed the other process. That might also address cases where the app crashed, the user is trying to run it again (run<enter>), and they run into the same problem (another process is blocking the port).hybrist commentedon Mar 21, 2018
But I'd be more than happy to merge a simpler solution that just hides away the "internal error" message somehow. There's always time to improve the UX even further in the future.
fix: Stop asking to report a blocked port
hybrist commentedon May 31, 2018
Potential fix is here: #62