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
"zlib.createGunzip()._transform" results in an abort #37884
Generally speaking, you should not call the internals of Node.js API objects and expect good results. _transform is a method that you should not call from other code, as noted by the streams docs.
So while this is fixable, I don't think it's necessarily worth doing so.
I'm confused since the docs mentioned that application code must not invoke this kind of APIs, why not declare them as private fields (or something like that)? BTW, zlib.createGunzip()._write("") can also trigger this abort. I'm not sure If there any possibility of misusing between write and _write.
I'm confused since the docs mentioned that application code must not invoke this kind of APIs, why not declare them as private fields (or something like that)?
Because they are supposed to be called by the streams superclasses (and by them only). I think putting them behind e.g. a symbol would make sense, but I’m not sure if that isn’t too big of a change to streams these days.
I'd like to see these transition into symbols but, by definition the symbols would still need to be exposed so we can't prevent direct calls entirely. We should at least make sure direct calls don't abort and do throw proper errors, however.
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.
Activity
addaleax commentedon Mar 24, 2021
Generally speaking, you should not call the internals of Node.js API objects and expect good results.
_transformis a method that you should not call from other code, as noted by the streams docs.So while this is fixable, I don't think it's necessarily worth doing so.
zyscoder commentedon Mar 25, 2021
I'm confused since the docs mentioned that application code must not invoke this kind of APIs, why not declare them as private fields (or something like that)? BTW,
zlib.createGunzip()._write("")can also trigger this abort. I'm not sure If there any possibility of misusing betweenwriteand_write.addaleax commentedon Mar 25, 2021
Because they are supposed to be called by the streams superclasses (and by them only). I think putting them behind e.g. a symbol would make sense, but I’m not sure if that isn’t too big of a change to streams these days.
jasnell commentedon Mar 27, 2021
I'd like to see these transition into symbols but, by definition the symbols would still need to be exposed so we can't prevent direct calls entirely. We should at least make sure direct calls don't abort and do throw proper errors, however.
github-actions commentedon Jun 27, 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 28, 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.