You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AsyncLocalStore looses context in MakeCallback #43038
async_hooksIssues and PRs related to the async hooks subsystem.async_local_storageIssues and PRs related to the AsyncLocalStorage API.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
In this setup the complete callback is not called with the AsyncResource as target and this results in setting the wrong object as current resource in MakeCallback.
Calling callbacks with undefined/null/global as target is not that uncommon.
The before/after callbacks are called with the correct asyncId but AsyncLocalStore relies on the current resource.
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
async_hooksIssues and PRs related to the async hooks subsystem.async_local_storageIssues and PRs related to the AsyncLocalStorage API.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
Type
No type
Projects
No projects
Milestone
No milestone
Relationships
None yet
Development
No branches or pull requests
Issue actions
You can’t perform that action at this time.
✕
Wait! Don't Go Yet 🚀
Get our FREE eBook "10 Programming Tips That Changed Everything" when you subscribe!
Activity
Flarna commentedon May 10, 2022
fyi @nodejs/async_hooks
RafaelGSS commentedon May 10, 2022
It's happening only in Windows?
Flarna commentedon May 10, 2022
I haven't tried any other OS but I assume it's os independent. Just filled the form.
Also node down to at least 14 is effected.
github-actions commentedon Jun 25, 2026
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
github-actions commentedon Jul 27, 2026
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
src: keep ALS store in AsyncResource::MakeCallback
src: keep ALS store in AsyncResource::MakeCallback
src: keep ALS store in AsyncResource::MakeCallback
src: keep ALS store in AsyncResource::MakeCallback
src: keep ALS store in AsyncResource::MakeCallback