question

nacho77 avatar image
nacho77 asked

Login not working on WebGL based game

screen2.pngscreen1.png

Im having issues when log using Unity SDK on WebGL platform.

When I log with an already registered user, if the platform is android, its working, but when i change to WebGL, it gives me session ticket, but the PlayFabClientAPI.IsClientLoggedIn() is false, and when calling LoadUserData its says that im not logged. Am I missing something ? Thank you

screen1.png (38.9 KiB)
screen2.png (24.2 KiB)
10 |1200

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

brendan avatar image
brendan answered

What version of the PlayFab Unity SDK are you using, and what version of Unity?

3 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.

nachodeleon77 avatar image nachodeleon77 commented ·

Im using Unity version 5.5.0f3 and SDK version 2.12.161107

,

Im using Unity version 5.5.0f3 and SDK version 2.12.161107

0 Likes 0 ·
brendan avatar image brendan nachodeleon77 commented ·

I'd recommend updating to the latest version, as we've made a number of fixes and updates: https://github.com/PlayFab/UnitySDK/releases/tag/2.14.170102.

0 Likes 0 ·
nachodeleon77 avatar image nachodeleon77 commented ·

I just try with the new SDK version (2.14.170102.) but still not working

0 Likes 0 ·
nachodeleon77 avatar image
nachodeleon77 answered

Im getting this error on

Exception: Must be logged in to call this method

PlayFab.PlayFabClientAPI.GetUserInventory (PlayFab.ClientModels.GetUserInventoryRequest request, System.Action`1 resultCallback, System.Action`1 errorCallback, System.Object customData) (at Assets/PlayFabSdk/Client/PlayFabClientAPI.cs:740) PlayFabHandler.GetPurchasedCharacter () (at Assets/Scripts/PlayFabHandler.cs:52) PlayFabHandler.OnLoginCallback (PlayFab.ClientModels.LoginResult result) (at Assets/Scripts/PlayFabHandler.cs:25) PlayFab.Internal.PlayFabHttp+<MakeApiCall>c__AnonStorey0`1[PlayFab.ClientModels.LoginResult].<>m__1 () (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabHTTP.cs:170) PlayFab.Internal.PlayFabWww+<MakeApiCall>c__AnonStorey1.<>m__0 (System.String response) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:126) UnityEngine.Debug:LogException(Exception) PlayFab.Internal.<MakeApiCall>c__AnonStorey1:<>m__0(String) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:130) PlayFab.Internal.<Post>c__Iterator0:MoveNext() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:200) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

10 |1200

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

brendan avatar image
brendan answered

The error you're seeing would indicate that the Session Ticket is not set, which would imply that either a) the call to IsClientLoggedIn/LoadUserData is being called before the success callback from the login call has been invoked, or else it's simply not being stored correctly. Can you provide the code snippet showing how you're making the calls?

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.