question

admin-16 avatar image
admin-16 asked

PlayFabClientAPI.GetAccountInfo() cannot fetch Apple info. Unknown Argument.

Hello,

I am trying to request the Title Display Name for a username using the following call:

PlayFabClientAPI.GetAccountInfo(new GetAccountInfoRequest(), OnGetUsernameResult, OnGetUsernameError);

This is called after a successful Apple Sign In using the following call and within the success callback function (OnPlayfabAppleAuthCompleteFirstTime):

PlayFabClientAPI.LoginWithApple(new LoginWithAppleRequest { CreateAccount = true, IdentityToken = args.userInfo.idToken }, OnPlayfabAppleAuthCompleteFirstTime, OnPlayfabAppleAuthFailed);

Please note, Apple Sign In works currently in our live app (ID: 3476A) and we are trying to implement a simple fetch of the Title Display Name for the user.

However, I am getting an error/crash when the PlayFabClientAPI.GetAccountInfo call is made with the following error. It appears the Apple enum is missing or something from the platform list or something?

Thanks for your help!

---------

Uploading Crash Report

ArgumentException: Requested value 'Apple' was not found.

at System.Enum.TryParseEnum (System.Type enumType, System.String value, System.Boolean ignoreCase, System.Enum+EnumResult& parseResult) [0x00000] in <00000000000000000000000000000000>:0

at System.Enum.TryParseEnum (System.Type enumType, System.String value, System.Boolean ignoreCase, System.Enum+EnumResult& parseResult) [0x00000] in <00000000000000000000000000000000>:0

at System.Enum.Parse (System.Type enumType, System.String value, System.Boolean ignoreCase) [0x00000] in <00000000000000000000000000000000>:0

at PlayFab.Json.SimpleJsonInstance+PlayFabSimpleJsonCuztomization.DeserializeObject (System.Object value, System.Type type) [0x00000] in <00000000000000000000000000000000>:0

at PlayFab.Json.SimpleJsonInstance+PlayFabSimpleJsonCuztomization.DeserializeObject (System.Object value, System.Type type) [0x00000] in <00000000000000000000000000000000>:0

at PlayFab.Json.PocoJsonSerializerStrategy.DeserializeObject (System.Object value, System.Type type) [0x00000] in <00000000000000000000000000000000>:0

at PlayFab.Json.SimpleJsonInstance+PlayFabSimpleJsonCuztomization.DeserializeObject (System.Object value, System.Type type) [0x00000] in <00000000000000000000000000000000>:0

at PlayFab.Json.PocoJsonSerializerStrategy.DeserializeObject (System.Object value, System.Type type) [0x00000] in <00000000000000000000000000000000>:0

at PlayFab.Json.SimpleJsonInstance+PlayFabSimpleJsonCuztomization.DeserializeObject (System.Object value, System.Type type) [0x00000] in <00000000000000000000000000000000>:0

at PlayFab.Json.PocoJsonSerializerStrategy.DeserializeObject (System.Object value, System.Type type) [0x00000] in <00000000000000000000000000000000>:0

at PlayFab.Json.SimpleJsonInstance+PlayFabSimpleJsonCuztomization.DeserializeObject (System.Object value, System.Type type) [0x00000] in <00000000000000000000000000000000>:0

at PlayFab.Json.PlayFabSimpleJson.DeserializeObject[T] (System.String json, PlayFab.Json.IJsonSerializerStrategy jsonSerializerStrategy) [0x00000] in <00000000000000000000000000000000>:0

at PlayFab.Internal.PlayFabHttp+<>c__DisplayClass23_0`1[TResult].<_MakeApiCall>b__0 () [0x00000] in <00000000000000000000000000000000>:0

at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0

at PlayFab.Internal.PlayFabUnityHttp.OnResponse (System.String response, PlayFab.Internal.CallRequestContainer reqContainer) [0x00000] in <00000000000000000000000000000000>:0

at PlayFab.Internal.PlayFabUnityHttp+<Post>d__12.MoveNext () [0x00000] in <00000000000000000000000000000000>:0

at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0

PlayFab.Internal.<Post>d__12:MoveNext()

UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

Account Management
2 comments
10 |1200

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

admin-16 avatar image admin-16 commented ·

Couple other comments.

-PlayFabClientAPI.GetAccountInfo() function call crashes and neither of the success/failure callback functions are called when logged in through Apple Sign In

-Dev environment is Unity 2019.4.9f1

-Playfab SDK 2.82.200303

0 Likes 0 ·
Ivan Cai avatar image Ivan Cai ♦ commented ·

Please use postman to call GetAccountInfo, get GetAccountInfoResult and send json to us.Please note that hide sensitive and private information.

0 Likes 0 ·

1 Answer

·
Ivan Cai avatar image
Ivan Cai answered

Since your playfab sdk version is relatively old, there is no enum corresponding to Apple. Please update to the latest version.

This is the enum of your current sdk:

public enum UserOrigination
{
Organic,
Steam,
Google,
Amazon,
Facebook,
Kongregate,
GamersFirst,
Unknown,
IOS,
LoadTest,
Android,
PSN,
GameCenter,
CustomId,
XboxLive,
Parse,
Twitch,
WindowsHello,
ServerCustomId,
NintendoSwitchDeviceId,
FacebookInstantGamesId,
OpenIdConnect
}

This is the enum of the latest sdk:

public enum UserOrigination
{
Organic,
Steam,
Google,
Amazon,
Facebook,
Kongregate,
GamersFirst,
Unknown,
IOS,
LoadTest,
Android,
PSN,
GameCenter,
CustomId,
XboxLive,
Parse,
Twitch,
WindowsHello,
ServerCustomId,
NintendoSwitchDeviceId,
FacebookInstantGamesId,
OpenIdConnect,
Apple,
NintendoSwitchAccount
}
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.