question

KimMyeonMin avatar image
KimMyeonMin asked

ArgumentException: 'unknown' is output when calling GetLeaderboardRequest.

Hi,

I was informed by the users that the ranking window was not open, so I checked it, and find out when calling GetLeaderboardRequest, an error occurred with the log 'ArgumentException: Requested value 'Unknown' was not found.'

I don't think I've touched about it, but I'd appreciate it if you could let me know if there's anything that could cause any problems.

The full text of the error is as follows:

ArgumentException: Requested value 'Unknown' was not found. System.Enum+EnumResult.SetFailure (System.Enum+ParseFailureKind failure, System.String failureMessageID, System.Object failureMessageFormatArgument) (at :0) System.Enum.TryParseEnum (System.Type enumType, System.String value, System.Boolean ignoreCase, System.Enum+EnumResult& parseResult) (at :0) System.Enum.Parse (System.Type enumType, System.String value, System.Boolean ignoreCase) (at :0) PlayFab.Json.SimpleJsonInstance+PlayFabSimpleJsonCuztomization.DeserializeObject (System.Object value, System.Type type) (at Assets/PlayFabSDK/Shared/Internal/ISerializer.cs:30) PlayFab.Json.SimpleJsonInstance+PlayFabSimpleJsonCuztomization.DeserializeObject (System.Object value, System.Type type) (at Assets/PlayFabSDK/Shared/Internal/ISerializer.cs:28) PlayFab.Json.PocoJsonSerializerStrategy.DeserializeObject (System.Object value, System.Type type) (at Assets/PlayFabSDK/Shared/Internal/SimpleJson.cs:1474) PlayFab.Json.SimpleJsonInstance+PlayFabSimpleJsonCuztomization.DeserializeObject (System.Object value, System.Type type) (at Assets/PlayFabSDK/Shared/Internal/ISerializer.cs:24) PlayFab.Json.PocoJsonSerializerStrategy.DeserializeObject (System.Object value, System.Type type) (at Assets/PlayFabSDK/Shared/Internal/SimpleJson.cs:1506) PlayFab.Json.SimpleJsonInstance+PlayFabSimpleJsonCuztomization.DeserializeObject (System.Object value, System.Type type) (at Assets/PlayFabSDK/Shared/Internal/ISerializer.cs:24) PlayFab.Json.PocoJsonSerializerStrategy.DeserializeObject (System.Object value, System.Type type) (at Assets/PlayFabSDK/Shared/Internal/SimpleJson.cs:1474) PlayFab.Json.SimpleJsonInstance+PlayFabSimpleJsonCuztomization.DeserializeObject (System.Object value, System.Type type) (at Assets/PlayFabSDK/Shared/Internal/ISerializer.cs:24) PlayFab.Json.PocoJsonSerializerStrategy.DeserializeObject (System.Object value, System.Type type) (at Assets/PlayFabSDK/Shared/Internal/SimpleJson.cs:1474) PlayFab.Json.SimpleJsonInstance+PlayFabSimpleJsonCuztomization.DeserializeObject (System.Object value, System.Type type) (at Assets/PlayFabSDK/Shared/Internal/ISerializer.cs:24) PlayFab.Json.PocoJsonSerializerStrategy.DeserializeObject (System.Object value, System.Type type) (at Assets/PlayFabSDK/Shared/Internal/SimpleJson.cs:1506) PlayFab.Json.SimpleJsonInstance+PlayFabSimpleJsonCuztomization.DeserializeObject (System.Object value, System.Type type) (at Assets/PlayFabSDK/Shared/Internal/ISerializer.cs:24) PlayFab.Json.PocoJsonSerializerStrategy.DeserializeObject (System.Object value, System.Type type) (at Assets/PlayFabSDK/Shared/Internal/SimpleJson.cs:1474) PlayFab.Json.SimpleJsonInstance+PlayFabSimpleJsonCuztomization.DeserializeObject (System.Object value, System.Type type) (at Assets/PlayFabSDK/Shared/Internal/ISerializer.cs:24) PlayFab.Json.PlayFabSimpleJson.DeserializeObject (System.String json, System.Type type, PlayFab.Json.IJsonSerializerStrategy jsonSerializerStrategy) (at Assets/PlayFabSDK/Shared/Internal/SimpleJson.cs:605) PlayFab.Json.PlayFabSimpleJson.DeserializeObject[T] (System.String json, PlayFab.Json.IJsonSerializerStrategy jsonSerializerStrategy) (at Assets/PlayFabSDK/Shared/Internal/SimpleJson.cs:610) PlayFab.Json.SimpleJsonInstance.DeserializeObject[T] (System.String json) (at Assets/PlayFabSDK/Shared/Internal/ISerializer.cs:85) PlayFab.Internal.PlayFabHttp+<>c__DisplayClass23_0`1[TResult].<MakeApiCall>b0 () (at Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabHTTP.cs:209) PlayFab.Internal.PlayFabUnityHttp.OnResponse (System.String response, PlayFab.Internal.CallRequestContainer reqContainer) (at Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabUnityHttp.cs:186) UnityEngine.Debug:LogException(Exception) PlayFab.Internal.PlayFabUnityHttp:OnResponse(String, CallRequestContainer) (at Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabUnityHttp.cs:224) PlayFab.Internal.d_12:MoveNext() (at Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabUnityHttp.cs:157) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

Thank you for your help.

+Also, statistics that are set to auto-initialize weekly are not initializing.

apisLeaderboards and Statistics
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Neils Shi avatar image
Neils Shi answered

Based on the stack trace, this error occurs while deserializing. To troubleshooting further, I want to know what is original response that you are trying to deserialize, and what field has the Unknown value? You can use Postman to get the raw data which may be easier to check with.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.