Repository navigation
Cannot read property 'emit' of null in _http_client.js #20690
Description
Activity
note: problem disappeared when I upgraded to node v8.11.1
cc @nodejs/http
- addedhttpIssues and PRs related to the http subsystem.Issues and PRs related to the http subsystem.
on May 13, 2018 @xloem have you tried it on earlier versions of 6.x? Is this a new regression?
I'm afraid that now I have found a way to make it work I'm not available to test this a lot as it takes so long to trigger it. I'm sorry. An obvious approach would be to git bisect between the two versions, but this would take many weeks to complete.
I am also seeing this error after upgrading from v8.11.1 to v8.11.2. Scanning the changelog for v8.11.2, the error seems to be plausibly related to #18865, which seems to have landed in both 6.14.2 and 8.11.2
Reacted by xloemPinging @lpinca.
@lpinca the API docs include an example of how to emit the 'agentRemove' event from userland code to remove an socket from an agent.
https://nodejs.org/dist/latest-v8.x/docs/api/http.html#http_class_http_agentthis code reproduces the TypeError for me on v8.11.2:
require('http').get('http://0.0.0.0', (res)=>{}).once('socket', (socket)=>{ socket.emit('agentRemove'); });@jordanrogers thanks! Didn't think about that use case. I will open a PR to null the property without relying on the
'agentRemove'event and add a regression test.Reacted by Tobias Nießen- addedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.
on May 16, 2018 It's funny that this did go unnoticed for 3 months but I guess that is not a common use case.
- added a commit that references this issue
on May 16, 2018 - added a commit that references this issue
on May 22, 2018 2 remaining items
I apologize in advance if there is a procedure that I'm not following here, but I couldn't find any for formally requesting backporting of fixes.
Is there a plan to backport this fix into the 6.X and 8.X branches? This bug is biting us on servers running both of those versions.
Thanks in advance.
@bedney it should be backported, not sure why it didn't happen yet. I'll add the required labels to the PR to backport.
Reacted by William J. Edney- added a commit that references this issue
on Jul 13, 2018 - added a commit that references this issue
on Aug 16, 2018 Hi, it appears that this issue still exists in 8.11.4, so we are still stuck at 8.11.1. Is there a plan to fix in 8.11, or is 8.12 the nearest fix version?
There will not be another 8.11 release.
Is this fixed in 8.12?
Reacted by Mathew NelsonI can confirm that this is fixed in 8.12
Reacted by Mathew Nelson- added a commit that references this issue
on May 5, 2024 - added a commit that references this issue
on Jul 27, 2026
I'm getting the following error on every run of registry-static:
It's happening reliably for me at 317673 while processing ng2-comps. I haven't tried with an empty output folder yet because it takes me a few days to get that far into the database.