Skip to content
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

req.emit is not a function #8431

Closed
carbonrobot opened this issue Sep 7, 2016 · 3 comments
Closed

req.emit is not a function #8431

carbonrobot opened this issue Sep 7, 2016 · 3 comments
Labels
https Issues or PRs related to the https subsystem.

Comments

@carbonrobot
Copy link

  • Version: 6.4.0
  • Platform: Windows 64bit
  • Subsystem: _http_client.js

req.emit('close');

When an HTTP request fails with an error, req.emit is not a function. I can reproduce in our application, but having difficulty creating a minimum sample. This is a call against an HTTPS endpoint that is returning a 500 error.

TypeError: req.emit is not a function
at TLSSocket.socketCloseListener (_http_client.js:271:7)
at emitOne (events.js:101:20)
at TLSSocket.emit (events.js:188:7)
at TCP._handle.close as _onclose

node-error

@mcollina
Copy link
Member

mcollina commented Sep 7, 2016

@carbonrobot we should try to replicate the problem. It seems tricky enough and we need to add a unit test anyway.

Would you mind trying to open a TLS socket against an HTTPS endpoint, and then close the socket? Maybe it's a TLS connection being dropped before any data is transferred.

@carbonrobot
Copy link
Author

@mcollina will do. I'm working on extracting the relevant code to make a minimal sample.

@mscdex mscdex added http Issues or PRs related to the http subsystem. https Issues or PRs related to the https subsystem. and removed http Issues or PRs related to the http subsystem. labels Sep 7, 2016
@carbonrobot
Copy link
Author

Root cause was the following issue. Closing at not related to Nodejs.

davidmarkclements/fast-safe-stringify#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
https Issues or PRs related to the https subsystem.
Projects
None yet
Development

No branches or pull requests

3 participants