Getting error with latest update........
See original GitHub issueActual behaviour: D:\Projects\PlexusReMaster\src\node_modules\tmi.js\node_modules\ws\lib\Sender.js :206 bufferUtil.mask(data, mask, outputBuffer, dataOffset, dataLength); ^
TypeError: Cannot read property ‘mask’ of undefined
Expected behaviour: Logging in
Error log:
Insert your error log here
TypeError: Cannot read property ‘mask’ of undefined at Sender.frameAndSend (D:\Projects\PlexusReMaster\src\node_modules\tmi.js\n ode_modules\ws\lib\Sender.js:206:17) at D:\Projects\PlexusReMaster\src\node_modules\tmi.js\node_modules\ws\lib\Se nder.js:126:12 at Sender.applyExtensions (D:\Projects\PlexusReMaster\src\node_modules\tmi.j s\node_modules\ws\lib\Sender.js:287:5) at D:\Projects\PlexusReMaster\src\node_modules\tmi.js\node_modules\ws\lib\Se nder.js:120:10 at Sender.flush (D:\Projects\PlexusReMaster\src\node_modules\tmi.js\node_mod ules\ws\lib\Sender.js:268:3) at Sender.send (D:\Projects\PlexusReMaster\src\node_modules\tmi.js\node_modu les\ws\lib\Sender.js:130:8) at WebSocket.send (D:\Projects\PlexusReMaster\src\node_modules\tmi.js\node_m odules\ws\lib\WebSocket.js:266:18) at client._onOpen (D:\Projects\PlexusReMaster\src\node_modules\tmi.js\lib\cl ient.js:947:17) at WebSocket.onOpen (D:\Projects\PlexusReMaster\src\node_modules\tmi.js\node _modules\ws\lib\WebSocket.js:432:14) at emitNone (events.js:86:13)
Server configuration
- Operating system: Windows 10 Home Edition
- Node version (if applicable): 6.9.5
- NPM version (if applicable): 3.10.10
- tmi.js version: Latest
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
If you have
bufferutil
as a dependency, make sure you are usingbufferutil@1
becausebufferutil@2
is compatible only withws@>=2.0.2
.@AlcaDesign I misinterpreted my issue. I have a compatability issue with using
autobahn
andtmi.js
at the same time. Withautobahn
as a dependency,tmi.js
gives thebufferutil
error as described here by @eaaliprantistmi.js
depends onws
v1 while autobahn usesws
v3. Since autobahn will be using the newestws
v3, thus requiringbufferutil
v3,tmi.js
does not function anymore as it usesbufferutil
v1. The issue can be resolved by either downgrading autobahn’sws
andbufferutil
or upgradingtmi.js
to use the latestws
.I have tested this myself with a simple application that connects to Twitch and when installing
ws
3.1.0 withtmi.js
the bufferutil error is gone.Replace dependencies in
tmi.js
’spackage.json
with:Compatibility issues within
tmi.js
itself should not be an issue and this guarantees less compatibility errors with other packages. I’m willing to open up a pull request, if needed.