heroiclabs / nakama-dart

Pure Dart Client for Nakama Server
https://heroiclabs.com/docs/nakama/client-libraries/dart
152 stars 48 forks source link

Using payload with RPC does not work on the web. #107

Open korkis opened 1 month ago

korkis commented 1 month ago

RPC works fine on Desktop and Android. It seems that the web error occurs because NakamaRestApiClient is used. On a PC, it is called using NakamaGrpcClient and there is no error.

WEB

REQUEST http://127.0.0.1:7350/v2/rpc/hello POST Content-Type: application/json {"matchId":"1cb4a808-d22f-4e10-b2ff-d366a9684143."}

RESPONSE { "error": "json: cannot unmarshal object into Go value of type string", "message": "json: cannot unmarshal object into Go value of type string", "code": 3 }

korkis commented 3 weeks ago

I think this requires adding unwrap=true to the url if there is a payload. However, it seems that the source code for these parts is automatically generated by the main.go file.