-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
HTTP: Cannot read property 'Symbol(asyncId)' of nullΒ #14368
Copy link
Copy link
Closed
Labels
async_hooksIssues and PRs related to the async hooks subsystem.Issues and PRs related to the async hooks subsystem.confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.
Metadata
Metadata
Assignees
Labels
async_hooksIssues and PRs related to the async hooks subsystem.Issues and PRs related to the async hooks subsystem.confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.
Type
Fields
Give feedbackNo fields configured for issues without a type.
It appears like the addition of async_hooks API into the http module (commit 4a7233c) causes an edge case to occur with 'write after end'. Here is a stack trace:
This is an unhandled exception, thrown all the way up to OutgoingMessage.prototype.write, causing crashes when used with streams in some cases. It appears like
msg.socket[async_id_symbol]is causing the error due tomsg.socketbeing null. I have slimmed down the code into as bare as I could. Here is my code:The second block works as intended (emits the error event). It appears like this bug occurs in all versions after v8.0.0.