-
Notifications
You must be signed in to change notification settings - Fork 19
fix ENOTCONN error in Node v10.1.0 #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Node v10.1.0 outputs the following error if process.stdin.end() is called: events.js:167 throw er; // Unhandled 'error' event ^ Error: shutdown ENOTCONN at ReadStream.Socket._final (net.js:369:25) at callFinal (_stream_writable.js:615:10) at process._tickCallback (internal/process/next_tick.js:63:19) Emitted 'error' event at: at emitErrorNT (internal/streams/destroy.js:82:8) at emitErrorAndCloseNT (internal/streams/destroy.js:50:3) at process._tickCallback (internal/process/next_tick.js:63:19) This PR replaces process.stdin.end() with process.stdin.destroy() to fix the issue. Fixes: workshopper/stream-adventure#213
Hi there, trying to use this workshopper in NodeSchool Lima and we all get the "shutdown ENOTCONN" error on Node v10.x. Any news on this PR? |
Hi Lupo! It seems like there is no maintainer for the adventure repo, as @martinheidegger told me in the workshoppers gitter, so this PR might take some time to be accepted. By the way, if anyone is interested in maintaining it, I suppose she/he could ask there. For now, I think that some temporary solutions are:
nvm install 10.0.0
nvm use 10.0.0 You should use 10.0.0 or any other version not in the 10.1.0 - 10.?.? problematic range. By the way, the root cause of this problem seems to be in the node repo, and apparently it will be fixed once the “libuv patch” is applied, as they said in this pull request.
Best wishes @lupomontero , and thanks again for your presentation here in NodersJS (Santiago, Chile) last month! |
BTW, I just checked the stream-adventure workshopper with node v11.0.0 and it no longer throws an error, yay 🚀 However, the workshopper doesn't exit automatically when it should (pressing the enter key makes the program exit tho). I've tested this PR with Node
|
I also don't get an error when using v11.0.0, and have to press enter (or some key combination, like Ctrl+d or Ctrl+c) to exit the program. That's at least an improvement :) This part of the nodejs docs is complex. I don't fully understand it at all. But It seems like process.stdin is a net.Socket (which is a Duplex stream) in our case, whereas in some other cases it is just a Readable stream, considering what the docs say here (I don't know how fd0 could refer to a file, though). I ran a sample code to confirm that process.stdin is a net.Socket, a stream.Duplex, a stream.Readable and a stream.Writable. Anyway, I think that it would be preferable to apply this PR, so that we use the less troublesome destroy() instead of the end() method. |
@cristianberroeta: totally agree that it would be preferable to apply this PR 👍 Today we are having another NodeSchool in Lima and some attendees are still running into this issue... @julianduque, I can see you were the last person to commit to master, is there any chance you (or anyone with write access) could look at this PR? Many thanks in advance. On the other hand, I'd like to volunteer to help maintain this repo if it helps ✋ cc/ @ccarruitero |
+1 to merge this PR. Like @lupomontero mentioned, we were using this workshopper in recently nodeschool's events in Lima. Aside, I would like to help maintaining this repo too. |
Thanks for merging @martinheidegger! Will you also update the npm adventure package to version 2.11.2? |
Thanks @martinheidegger! I hadn't noticed that deployment process. This repo only complies with 1 of the 4 pre-requisites mentioned there :( For now, can I just create a request ticket for deployment, as this PR seems to be an improvement and highly unlikely to generate an error? But afterwards it will probably be useful to comply with those 3 other deployment pre-requisites:
|
Basically yes - since you are maintaining this. (these are just strong suggestions) btw. this is also an organisation question 😉 |
Thanks @martinheidegger! I've just created the ticket. |
Node v10.1.0 throws an error when process.stdin.end() is called.
This PR replaces process.stdin.end() with process.stdin.destroy() to fix the issue.
For more information about the bug, visit:
workshopper/stream-adventure#213