TypeError: server.listenerCount is not a function
node:_http_server:1033 server.listenerCount('upgrade') > 0; ^ TypeError: server.listenerCount is not a function at parserOnIncoming (node:_http_server:1033:26) at HTTPParser.parserOnHeadersComplete (node:_http_common:118:17) at socketOnData (node:_http_server:823:22) at TlsSocket.emit (node:events:519:28) at addChunk (node:internal/streams/readable:559:12) at readableAddChunkPushByteMode (node:internal/streams/readable:510:3) at Readable.push (node:internal/streams/readable:390:5) at InternalSocket.onStreamRead [as onread] (node:internal/stream_base_commons:191:23) at InternalSocket.readData (/home/njentit/Developments/NODEJS/SHPxBOT/node_modules/mitm/lib/internal_socket.js:168:8) at InternalSocket.emit (node:events:519:28)
Hey,
Do you have some context for this error, too? Perhaps a small reproducible example and the Node.js version you used?
Had similar issue with any new Websocket() connection used. spotted via jest-offline. as a solution -> mock websocket
Hey! Perhaps you have a small reproducible example that just depends on Mitm.js? Is the Websocket you refer to the new native Node.js implementation?