YassSoliman / chatroom-project

A chatroom made using socket.io
https://practical-chatroom.herokuapp.com/
0 stars 0 forks source link

Crypto js seems to crash the server #17

Open YassSoliman opened 6 years ago

YassSoliman commented 6 years ago

If a user is still connected to the server when it restarts the server cant open.

> node app.js

Server started on *:3000
crypto.js:99
  this._handle.update(data, encoding);
               ^

TypeError: Data must be a string or a buffer
    at Hash.update (crypto.js:99:16)
    at new User (/home/yasser/Programming/NodeJs/chatroom-project/Object/User.js:5:49)
    at Socket.<anonymous> (/home/yasser/Programming/NodeJs/chatroom-project/app.js:26:14)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at /home/yasser/Programming/NodeJs/chatroom-project/node_modules/socket.io/lib/socket.js:528:12
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)