-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using payload with RPC does not work on the web. #107
Comments
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. |
I have this problem too. In iOS and Android everything works fine but only null payloads work in web. I think there is a problem in json-encoding. |
Hi! I am using pub.dev(1.1.0) version |
Many improvements and bug fixes have been pushed to
I am not certain if this will resolve your issue, so I will attempt to reproduce it on my machine and will keep you updated. |
Yes, I'm using the latest version. finally I found a solution. in web, we have to encode to json twice. |
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
}
The text was updated successfully, but these errors were encountered: