Object has no member 'binaryToString'

Hi,

Unity client sends a message like this (documentation example) :


var id = "<matchid>";
var opCode = 1;
var newState = new Dictionary<string, string> {{"hello", "world"}}.ToJson();
socket.SendMatchStateAsync(matchId, opCode, newState);

The server receives the message and tries to parse it like this :

msg=JSON.parse(nk.binaryToString(message.data));

Problem is the server is stopping the match and throwing an error
“error”:"TypeError: Object has no member ‘binaryToString’ at matchLoop

From what I understand, it’s because the new state send from Unity is a string instead of being an Uint8Array like message.data is suppose to be.

The logger shows me the correct data when debugging message.data, so the client is correctly sending data and it’s not null.

What version of the Nakama are you running this on?

3.9.0+6f4c456b

Please update to Nakama v3.10.0 as this issue has been fixed there:

  • JavaScript runtime match data changed to use Uint8Array type.

All right.
To do so, I need to change this line in the docker file ?
FROM heroiclabs/nakama:3.9.0

It worked, thanks.