Hi Playfab Support Team
I am getting strange behaviour on GetLeaderboard method. Don't know why OnPlayFabError callback invokes just after OnGetLeaderBoardSuccess callback, it shouldn't happen.
PlayFabClientAPI.GetLeaderboard (request,OnGetLeaderBoardSuccess,OnPlayFabError);
public void OnPlayFabError(PlayFabError error)
{
Debug.Log (error.HttpStatus) prints Client failed to parse response from server;
Debug.Log (error.ErrorMessage); prints
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
at PlayfabLeaderboardController.OnGetLeaderBoardSuccess (PlayFab.ClientModels.GetLeaderboardResult result) [0x0005e] in /Volumes/Local Disk/Projects/ResearchLab/PlayFabInsaneEaglesLeaderboard/Assets/Scripts/PlayfabLeaderboardController.cs:93
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000d0] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000eb] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000b9] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Delegate.cs:443
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00018] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/MulticastDelegate.cs:71
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Delegate.cs:415
at PlayFab.Internal.ResultContainer`1[PlayFab.ClientModels.GetLeaderboardResult].HandleResults (PlayFab.CallRequestContainer callRequest, System.Delegate resultCallback, PlayFab.ErrorCallback errorCallback, System.Action`2 resultAction) [0x00093] in /Volumes/Local Disk/Projects/ResearchLab/PlayFabInsaneEaglesLeaderboard/Assets/PlayFabSDK/Internal/ResultContainer.cs:53
UnityEngine.Debug:Log(Object)
PlayfabLeaderboardController:OnPlayFabError(PlayFabError) (at Assets/Scripts/PlayfabLeaderboardController.cs:101)
PlayFab.Internal.ResultContainer`1:HandleResults(CallRequestContainer, Delegate, ErrorCallback, Action`2) (at Assets/PlayFabSDK/Internal/ResultContainer.cs:84)
PlayFab.<GetLeaderboard>c__AnonStorey7A:<>m__77(CallRequestContainer) (at Assets/PlayFabSDK/Public/PlayFabClientAPI.cs:943)
PlayFab.CallRequestContainer:InvokeCallback() (at Assets/PlayFabSDK/Public/PlayFabErrors.cs:255)
PlayFab.Internal.<MakeRequestViaUnity>c__Iterator2:MoveNext() (at Assets/PlayFabSDK/Internal/PlayFabHTTP.cs:260)
}
Thanks
Sabin George