I am using Socket.IO for a chat app I am making. I am a beginner with both node.js and android.
The chat actually works, but when a person leaves a chat room, any chat room, the app crashes and I have to restart it for another user/users to be able to chat again.
The error I get is the following:
C:\Users\Tasos\Desktop\node.js server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\ultron\index.js:80 if (this.ee._events.hasOwnProperty(event)) { ^
TypeError: this.ee._events.hasOwnProperty is not a function at Ultron.remove (C:\Users\Tasos\Desktop\node.js server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\ultron\index.js:80:27) at Ultron.destroy (C:\Users\Tasos\Desktop\node.js server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\ultron\index.js:116:8) at WebSocket.cleanupWebsocketResources (C:\Users\Tasos\Desktop\node.js server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\lib\WebSocket.js:851:36) at emitNone (events.js:91:20) at Socket.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9)
Any hints as to what could be at fault here?
Thanks in advance.
Make sure that the socket.io version is the latest
npm install socket.io --save
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With