Skip to content

No method "bind" in _onMessage #68

@RobKohr

Description

@RobKohr

Happened when I tried to connect from dev version of Google Crome on windows.

Socket.IO-node/lib/socket.io/client.js:26
this.decoder.on('data', this._onMessage.bind(this));
^
TypeError: Object function (type, data){
switch (type){
case '0':
this._onDisconnect();
break;

case '1':
  var msg = decodeMessage(data);
  // handle json decoding
  if ('j' in msg[1]) msg[0] = JSON.parse(msg[0]);
  this.emit('message', msg[0], msg[1]);
  break;

case '2':
  this._onHeartbeat(data);

}
} has no method 'bind'
at [object Object]. (/home/constantsail/www/constantsail.com/socket_server/includes/Socket.IO-nod e/lib/socket.io/client.js:26:43)
at new (/home/constantsail/www/constantsail.com/socket_server/includes/Socket.IO-node/lib/socket .io/transports/websocket.js:8:10)
at [object Object]._onConnection (/home/constantsail/www/constantsail.com/socket_server/includes/Socket.IO-n ode/lib/socket.io/listener.js:176:74)
at [object Object].check (/home/constantsail/www/constantsail.com/socket_server/includes/Socket.IO-node/lib/ socket.io/listener.js:95:12)
at Server. (/home/constantsail/www/constantsail.com/socket_server/includes/Socket.IO-node/lib/soc ket.io/listener.js:41:14)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions