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
Cannot read property 'Symbol(kNativeFields)' using http2 session removeAllListeners #29457
When using the removeAllListeners on a http2 stream inside an on("close"...) generates this error
TypeError: Cannot read property 'Symbol(kNativeFields)' of undefined
at ClientHttp2Stream.streamListenerRemoved (internal/http2/core.js:453:21)
at ClientHttp2Stream.emit (events.js:209:13)
at ClientHttp2Stream.EventEmitter.emit (domain.js:476:20)
at ClientHttp2Stream.removeListener (events.js:347:18)
at ClientHttp2Stream.Readable.removeListener (_stream_readable.js:893:47)
at ClientHttp2Stream.removeAllListeners (events.js:418:14)
at ClientHttp2Stream.Readable.removeAllListeners (_stream_readable.js:909:51)
at ClientHttp2Stream.removeAllListeners (events.js:407:16)
at ClientHttp2Stream.Readable.removeAllListeners (_stream_readable.js:909:51)
The code generating it is:
... // creating http2 session and a http2 client stream
stream.on("close", () => {
stream.removeAllListeners();
Thanks for the bug report. This shouldn’t be too hard to fix, but a full reproduction would still be appreciated (just calling stream.removeAllListeners() inside its "close" event doesn’t seem sufficient).
Activity
addaleax commentedon Sep 5, 2019
Thanks for the bug report. This shouldn’t be too hard to fix, but a full reproduction would still be appreciated (just calling
stream.removeAllListeners()inside its"close"event doesn’t seem sufficient).addaleax commentedon Sep 5, 2019
Ah, nvm, it just needs an additional listener for
priorityorframeErrorto be present beforehand.http2: no crash on stream listener removal w/ destroyed session
http2: do not crash on stream listener removal w/ destroyed session
http2: do not crash on stream listener removal w/ destroyed session
http2: do not crash on stream listener removal w/ destroyed session
http2: do not crash on stream listener removal w/ destroyed session
http2: do not crash on stream listener removal w/ destroyed session
http2: do not crash on stream listener removal w/ destroyed session
http2: do not crash on stream listener removal w/ destroyed session