Nakama official client

I am having this same issue. It looks like no response is been received back from the server, although checking the server logs, the message is successfully sent and received.

If I execute the code within a coroutine, it sends the message then waits.

If I pass a callback, the callback is never invoked.

Anyone has any ideas?

When enabling the websocket debug (in gameproject) this is the output when the socket.match_data_send() is invoked

DEBUG:SCRIPT: sending match data
WARNING:WEBSOCKET: Sent buffer: '\81\fe\00\84\17N&{' 8 bytes
WARNING:WEBSOCKET: Sent buffer: 'llE\12sl\1cY%l\nYz/R\18\7f\11B\1ac/y\08r BY-5\04\1fv:GY- lq\02]\07|,o=D\02U\16DH]=|8]*\04W5!V$t!B\1e5t\13W5#G\0ft&y\12sl\1cY/x\17\1a&\7fBB:x\10Lqc\12Kry\0b\1auzDV&v\17Nu(\13\1d.{\14\199 G\10v#G$&l[\06' 132 bytes

This is the server log. The last 2 logs are when the match_data_send() is invoked. I am processing the message and loggin the vaue which is Hello World. At this point in Defold, no response nor the callback is invoked.

{"level":"info","ts":"2024-06-09T18:19:54.719Z","caller":"server/session_ws.go:81","msg":"New WebSocket session connected","uid":"5f915cf2-b17a-49c8-8d17-efeea38f9907","sid":"decf94e2-268c-11ef-bec6-99837944f4bc","format":0}

{"level":"info","ts":"2024-06-09T18:20:07.031Z","caller":"server/match_handler.go:204","msg":"Match started","mid":"15d3edda-da84-4b2b-aaf6-3145bcb3c368"}

{"level":"debug","ts":"2024-06-09T18:20:08.514Z","caller":"server/pipeline.go:65","msg":"Received *rtapi.Envelope_MatchJoin message","uid":"5f915cf2-b17a-49c8-8d17-efeea38f9907","sid":"decf94e2-268c-11ef-bec6-99837944f4bc","cid":"1","message":{"MatchJoin":{"Id":{"MatchId":"0eda8e24-713a-4f7f-9bff-5bfcbb4413ec.nakama_1"},"metadata":{"tablePos":"1"}}}}

{"level":"debug","ts":"2024-06-09T18:20:08.515Z","caller":"server/session_ws.go:396","msg":"Sending *rtapi.Envelope_Match message","uid":"5f915cf2-b17a-49c8-8d17-efeea38f9907","sid":"decf94e2-268c-11ef-bec6-99837944f4bc","envelope":"cid:\"1\" match:{match_id:\"0eda8e24-713a-4f7f-9bff-5bfcbb4413ec.nakama_1\" authoritative:true label:{value:\"{\\\"fee\\\":1000,\\\"feeType\\\":\\\"chip\\\",\\\"league\\\":\\\"bronze\\\",\\\"numberOfPlayers\\\":2,\\\"open\\\":1,\\\"options\\\":[{\\\"name\\\":\\\"FAST1\\\"},{\\\"name\\\":\\\"FAST2\\\"},{\\\"name\\\":\\\"FAST3\\\"}],\\\"players\\\":{\\\"3\\\":{\\\"ai\\\":true,\\\"avatar\\\":\\\"avatar-3\\\",\\\"avatarUrl\\\":\\\"\\\",\\\"name\\\":\\\"AI Player 3\\\",\\\"tablePos\\\":3,\\\"username\\\":\\\"ai-3\\\"}},\\\"safeAmount\\\":250000}\"} self:{user_id:\"5f915cf2-b17a-49c8-8d17-efeea38f9907\" session_id:\"decf94e2-268c-11ef-bec6-99837944f4bc\" username:\"mycustomusername\"}}"}

{"level":"debug","ts":"2024-06-09T18:20:08.515Z","caller":"server/tracker.go:912","msg":"Processing presence event","joins":1,"leaves":0}

{"level":"debug","ts":"2024-06-09T18:20:27.858Z","caller":"server/pipeline.go:65","msg":"Received *rtapi.Envelope_MatchDataSend message","uid":"5f915cf2-b17a-49c8-8d17-efeea38f9907","sid":"decf94e2-268c-11ef-bec6-99837944f4bc","cid":"2","message":{"MatchDataSend":{"match_id":"0eda8e24-713a-4f7f-9bff-5bfcbb4413ec.nakama_1","op_code":5,"data":"WyJIZWxsbyBXb3JsZCJd"}}}

{"level":"info","ts":"2024-06-09T18:20:28.410Z","caller":"server/runtime_lua_nakama.go:2300","msg":"Received [\"Hello World\"] from mycustomusername","mid":"0eda8e24-713a-4f7f-9bff-5bfcbb4413ec","runtime":"lua"}

{"level":"info","ts":"2024-06-09T18:20:28.410Z","caller":"server/runtime_lua_nakama.go:2300","msg":"Key 1 contains value Hello World","mid":"0eda8e24-713a-4f7f-9bff-5bfcbb4413ec","runtime":"lua"}

Could you please create a ticket on GitHub in the Defold client repo? Please include as much info as possible and preferably a sample project.

1 Like

Sure, will do ASAP.

1 Like

A miminal sample project has been created based on the official Defold client repo. In the meantime, I will continue to debug after work tomorrow.

2 Likes