Hi, i launch my app and this problems start showing up in Crashlytics. They are all related to PlayFab and wanted to know how can i fix them. (They happen from time to time, they are not consistant)
For Example I have a button that only shows up when you have "x" ammount of currency:
PlayFabClientAPI.GetUserInventory(
new GetUserInventoryRequest { },
GetResult =>
{
virtualCurrency = GetResult.VirtualCurrency;
var value = (virtualCurrency["TK"] - ticketAmount);
if (value >= 5)
{
playButton.gameObject.SetActive(true);
}
else
{
playButton.gameObject.SetActive(false);
}
},
GetError => { });
And i'm getting this error:
UnityEngine.UI.Graphic.SetVerticesDirty (UnityEngine.UI.Graphic)
UnityEngine.UI.Text.set_text (UnityEngine.UI.Text)
PlayButton.<Awake>b__10_2 (PlayButton)
System.Action`1[T].Invoke (System.Action`1[T])
System.Action.Invoke (System.Action)
PlayFab.Internal.PlayFabUnityHttp.OnResponse (PlayFab.Internal.PlayFabUnityHttp)
PlayFab.Internal.PlayFabUnityHttp+<Post>d__12.MoveNext (PlayFab.Internal.PlayFabUnityHttp+<Post>d__12)
UnityEngine.SetupCoroutine.InvokeMoveNext (UnityEngine.SetupCoroutine)
PlayFab.Internal.PlayFabUnityHttp:OnResponse (PlayFab.Internal)
PlayFab.Internal.<Post>d__12:MoveNext (PlayFab.Internal)
UnityEngine.SetupCoroutine:InvokeMoveNext (UnityEngine)
Non-fatal Exception: java.lang.Exception: NullReferenceException : Object reference not set to an instance of an object.
at UnityEngine.UI.Graphic.SetVerticesDirty(UnityEngine.UI.Graphic)
at UnityEngine.UI.Text.set_text(UnityEngine.UI.Text)
at PlayButton.<Awake>b__10_2(PlayButton)
at System.Action`1[T].Invoke(System.Action`1[T])
at System.Action.Invoke(System.Action)
at PlayFab.Internal.PlayFabUnityHttp.OnResponse(PlayFab.Internal.PlayFabUnityHttp)
at PlayFab.Internal.PlayFabUnityHttp+<Post>d__12.MoveNext(PlayFab.Internal.PlayFabUnityHttp+<Post>d__12)
at UnityEngine.SetupCoroutine.InvokeMoveNext(UnityEngine.SetupCoroutine)
at PlayFab.Internal.PlayFabUnityHttp:OnResponse(PlayFab.Internal)
at PlayFab.Internal.<Post>d__12:MoveNext(PlayFab.Internal)
at UnityEngine.SetupCoroutine:InvokeMoveNext(UnityEngine)
This is just one example there are plenty more errors like this with different things (getting data from Data Title, setting a score to the leaderbord, sending a request to a cloud script, etc) I'm not able to recreate them, this only happens to certain people downloading the app.