-
Notifications
You must be signed in to change notification settings - Fork 56
Description
I have the problem, that the NakamaBaseClient.listMatches() always throws an exception as soon as there are actually matches on the server. So I tried to debug the issue. What I found is:
In nakama_api_client.dart line 1418 we have in the listMatches() function:
return res.matches?.map((e) => model.Match.fromJson(e.toJson())).toList(growable: false) ?? [];
So i checked, what toJson() and Match.fromJson() is actually doing.
toJson() is pointing to this function in api_client.gen.g.dart line 474-481 (sorry for using screenshots, I couldn't get the formatting work):

And this is the Match.fromJson() in match.freezed.dart line 17-28

So in my opinion, this will always throw, because the toJson() doesn't set the key 'runtimeType' and the fromJson does throw when this key is not set.
Just for the sake of completeness, this is also the error I get:

I am not sure how this should be fixed, because the whole code generation library is new to me, maybe someone know how it should be?
I am using nakama 1.3.0