-
-
Notifications
You must be signed in to change notification settings - Fork 37.2k
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 and PRs for confirmed bugs.Issues and PRs for confirmed bugs.httpIssues and PRs related to the http subsystem.Issues and PRs related to the http subsystem.
Description
Activity
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 and PRs for confirmed bugs.Issues and PRs for confirmed bugs.httpIssues and PRs related to the http subsystem.Issues and PRs related to the http subsystem.
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.