Skip to content

Exception has occurred. #408

Description

@mdino
socket.onConnect((_) {
  print('Connected to server');
  socket.emit('joinGame', {'playerId': playerId, 'balance': balance, 'cpu': cpu, 'host': host,  'playerName': playerName,  'avatar': avatar});
});

Exception has occurred.
DartError: NoSuchMethodError: 'toJSON'
method not found
Receiver: Instance of 'IdentityMap<String, Object>'
Arguments: []

Why I always got exception on any socket.emit.. I try to Map it, json encode, decode (client and server side) everything and I always got the same error in visual studio.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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