Hi there,
We have encountered a big problem with ONE of our new players who is unable to run our game. ( we have had 100s of players through the system and never seen this before).
The error in his log is as in the title, here is the callstack:
SerializationException: Invalid JSON string at PlayFab.Json.PlayFabSimpleJson.DeserializeObject (System.String json) [0x0000c] in <39d418abd8274a0f8516d0ce771644aa>:0 at PlayFab.Json.PlayFabSimpleJson.DeserializeObject (System.String json, System.Type type, PlayFab.Json.IJsonSerializerStrategy jsonSerializerStrategy) [0x00000] in <39d418abd8274a0f8516d0ce771644aa>:0 at PlayFab.Json.PlayFabSimpleJson.DeserializeObject[T] (System.String json, PlayFab.Json.IJsonSerializerStrategy jsonSerializerStrategy) [0x00000] in <39d418abd8274a0f8516d0ce771644aa>:0 at PlayFab.Json.SimpleJsonInstance.DeserializeObject[T] (System.String json) [0x00000] in <39d418abd8274a0f8516d0ce771644aa>:0 at PlayFab.Internal.PlayFabUnityHttp.OnResponse (System.String response, PlayFab.Internal.CallRequestContainer reqContainer) [0x0002b] in <39d418abd8274a0f8516d0ce771644aa>:0 UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object) UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) PlayFab.Internal.PlayFabUnityHttp:OnResponse(String, CallRequestContainer) PlayFab.Internal.<Post>d__20:MoveNext() UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
We normally handle errors nicely, but in this case we don't even get our success/failure callbacks and it falls over within the file:
PlayFabUnityHttp.cs - function OnResponse()We added some logging and was able to get the user to run a debug build for us and we printed out the response, our code added was:public void OnResponse(string response, CallRequestContainer reqContainer) try { #if PLAYFAB_REQUEST_TIMING var startTime = DateTime.UtcNow; #endif if (response == null) Debug.Log("Response is NULL"); else Debug.Log("Response is " + response); var serializer = PluginManager.GetPlugin<ISerializerPlugin>(PluginContract.PlayFab_Serializer); var httpResult = serializer.DeserializeObject<HttpResponseObject>(response); .... }
The printed response is clearly not JSON, thought it seems like it's trying to deserialize it thinking it is JSON, here's what the response was:
Response is �Sێ�0�^�i��$D�C�66��R9ě`h@`�eW��:�U/R�Z�{�g���(e{d�p� ��qP�Jt��)G*��|Q6l���Vë́Lj��3=�*�,Ͷfs�j.Tc��U]]�l�@۰ԁ5�58�V���"-�jy�Mk�vך�{�!�p`�O@�v������XX��x�������ɣ���2Mص��Q�d�#mv'�Q]N���������qX �W�QH]?k}*άw�תd��U��%�۹ז��v����NY�A��S%��|B՜4�@ ��K
? Very odd to us.
At this point it looks like the try fails and is caught, which simply spews out the exception into the log but never gives us a failure so our game just hangs.
This is EXTREMELY strange. We have tracked it down to what we believe is the calling function that fails
void _loginWithSteam() { Debug.Log("#PLAYFAB# _loginWithSteam()"); byte[] ticket = new byte[1024]; uint ticketLength; HAuthTicket hTicket = SteamUser.GetAuthSessionTicket(ticket, ticket.Length, out ticketLength); Array.Resize(ref ticket, (int)ticketLength); // Convert bytes to string StringBuilder sb = new StringBuilder(); foreach (byte b in ticket) { sb.AppendFormat("{0:x2}", b); } string hexTicket = sb.ToString(); var request = new LoginWithSteamRequest { CreateAccount = true, SteamTicket = hexTicket }; PlayFabClientAPI.LoginWithSteam(request, _onSteamLoginSuccess, _onSteamLoginFailure); }
We see that we enter this function, but we never have our prints from _onSteamLoginSuccess or _onSteamLoginFailure, so it looks like LoginWithSteam for this user is responding with that stuff above and is not making any sense to the Deserializer.
We would really appreciate some swift help on this as it's a live user who just got the game and we're actively trying to help him get into the game but it is just very alien.
I can and will provide any and all information you require :).
Our title ID is EAA9
Cheers