question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting error with latest update........

See original GitHub issue

Actual 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:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Schmoopiiecommented, Jun 9, 2017

If you have bufferutil as a dependency, make sure you are using bufferutil@1 because bufferutil@2 is compatible only with ws@>=2.0.2.

0reactions
d0p3tcommented, Aug 14, 2017

@AlcaDesign I misinterpreted my issue. I have a compatability issue with using autobahn and tmi.js at the same time. With autobahn as a dependency, tmi.js gives the bufferutil error as described here by @eaaliprantis

tmi.js depends on ws v1 while autobahn uses ws v3. Since autobahn will be using the newest ws v3, thus requiring bufferutil v3, tmi.js does not function anymore as it uses bufferutil v1. The issue can be resolved by either downgrading autobahn’s ws and bufferutil or upgrading tmi.js to use the latest ws.

I have tested this myself with a simple application that connects to Twitch and when installing ws 3.1.0 with tmi.js the bufferutil error is gone.

Replace dependencies in tmi.js’s package.json with:

  "dependencies": {
    "request": "2.74.0",
    "ws": "3.1.0"
  }, 

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

If your iPhone or iPad won't update - Apple Support
Go to Settings > General > [Device name] Storage. · Find the update in the list of apps. · Tap the update, then...
Read more >
7 Ways to Fix 'iPhone Software Update Failed' Error
Here are some solutions to fix iPhone software update failed error. Read on the blog to know step by step guide tutorial.
Read more >
How To Fix “An Error Occurred While Checking For A Software ...
The error message generally occurs while updating the iOS with a poor network connection. However, the error can arise due to various other ......
Read more >
Fix Windows Update errors - Microsoft Support
The steps in this guided walk-through should help with all Windows Update errors and other issues—you don't need to search for the specific...
Read more >
Fix Chrome update problems & failed updates - Google Support
Uninstall Chrome. · Make sure your computer meets the system requirements. · Download Chrome again and try reinstalling. If you keep seeing an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found