Hi Franco,
I am not sure the issue is anything to do with networking, it fully works from Unity editor and I think the error from brainCloud is potentially misleading.
I am using Unity 2021.3.8f1
After tracing it back tracing it back through, the error is being generated byBrainCloudComms.cs, specifically private void HandleResponseBundle(string jsonData), If I enable debugging and run on an iPhone, I get output of:
19:22:40.664 #BCC RESPONSE - 21/04/2023 19:22:40
{"packetId":0,"responses":[{"data":{"abTestingId":30,"lastLogin":1682102815319,"server_time":1682102815403,"refundCount":0,"timeZoneOffset":0.0,"experiencePoints":200,"maxBundleMsgs":10,"createdAt":1682102815302,"parentProfileId":null,"emailAddress":null,"experienceLevel":1,"countryCode":"GB","vcClaimed":0,"currency":{"coins":{"consumed":0,"balance":200,"purchased":0,"awarded":200}},"id":"b49b86a2-6b23-4467-8a8b-ab7208fa40f7","compressIfLarger":51200,"amountSpent":0,"previousLogin":null,"playerName":"player234147492","pictureUrl":null,"incoming_events":[],"sessionId":"e6r6fmaatt4u32891m6en7htct","languageCode":"en","vcPurchased":0,"isTester":false,"summaryFriendData":null,"loginCount":1,"emailVerified":true,"xpCapped":false,"profileId":"b49b86a2-6b23-4467-8a8b-ab7208fa40f7","newUser":"true","playerSessionExpiry":1200,"sent_events":[],"maxKillCount":11,"rewards":{"experiencePoints":200,"rewardDetails":{"xp":{"experienceLevels":[{"level":1,"rewards":{"experiencePoints":200,"currency":{"coins":200}}}],"experiencePoints":200}},"xpCapped":false,"currency":{"coins":{"consumed":0,"balance":200,"purchased":0,"awarded":200}},"experienceLevel":1,"rewards":{"experienceLevels":[1],"experiencePoints":200,"currency":{"coins":200}}},"statistics":{}},"status":200}]}
false
The function then tries to decode the json:
JsonResponseBundleV2 bundleObj = DeserializeJsonBundle(jsonData);
The next bit of output is then:
19:22:40.666 #BCC Only objects with default constructors can be deserialized. (BrainCloud.Internal.JsonResponseBundleV2)
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
BrainCloud.BrainCloudClient:Log(String)
BrainCloud.Internal.BrainCloudComms:DeserializeJsonBundle(String)
BrainCloud.Internal.BrainCloudComms:HandleResponseBundle(String)
BrainCloud.Internal.BrainCloudComms:Update()
BrainCloud.BrainCloudClient:Update(eBrainCloudUpdateType)
BrainCloudWrapper:RunCallbacks()
BrainCloudWrapper:Update()
Received an invalid json format response, check your network settings.
So data is definitely making it back from the server, but then if I log in from Unity editor, the response from BrainCloud looks similar?
{"packetId":0,"responses":[{"data":{"abTestingId":6,"lastLogin":1682102456093,"server_time":1682102456127,"refundCount":0,"timeZoneOffset":0.0,"experiencePoints":200,"maxBundleMsgs":10,"createdAt":1682102419336,"parentProfileId":null,"emailAddress":null,"experienceLevel":1,"countryCode":null,"vcClaimed":0,"currency":{"coins":{"consumed":0,"balance":200,"purchased":0,"awarded":200}},"id":"cd068c0b-d7f6-41de-85bd-8830631020e3","compressIfLarger":51200,"amountSpent":0,"previousLogin":1682102419345,"playerName":"kohatu918618012","pictureUrl":null,"incoming_events":[],"sessionId":"i405rjp0s9b3unisrfedpsem0b","languageCode":"en","vcPurchased":0,"isTester":false,"summaryFriendData":null,"loginCount":2,"emailVerified":true,"xpCapped":false,"profileId":"cd068c0b-d7f6-41de-85bd-8830631020e3","newUser":"false","playerSessionExpiry":1200,"sent_events":[],"maxKillCount":11,"rewards":{"rewardDetails":{},"currency":{},"rewards":{}},"statistics":{}},"status":200}]}