When I get data from Room.onStateChange I don't receive my players

I have a players Map Schema on my State, I receive my changes on my client, but the array players [] its empty. Is this a normal behavior?

I had the idea that onStateChange method includes the current state of the application, but the players MapState comes as an object without relevant data about Players. I changed that call to room.state.onChange = () => {} and it seems to be a better way to update my client-side state

hey bro, did you resolve this issue?

The same thing occurred when today I created a new server. I am not able to get the contents of a map.

@virtumonde Try updating your node packages and change the client side codebase as of changes in new version changelog, as there was update in colyseus new version same thing happened to me.

@nag0121 Let me try.

It didn't solve my problem. At least in my case it is not a client version mismatch.

I am an idiot. I forgot that at the begging of the client connection you can't access the state via room.state, it is blank. I do receive that changed version of the state however.

Now it's broken again. Will check tomorrow.

For whoever may read this: check the state with room.onStateChange, not right away you are connecting to the room.