#Sign in required error

1 messages · Page 1 of 1 (latest)

brisk fjord
#

Hi, when i click achievements or custom leaderboard button i'm getting 'sign in required' error in my game. also when I build example scene of the asset there's the same error for achievements, however default leaderboard is shown correctly. This is the script -> https://paste.ofcode.org/Uu4e2e3aC3kaQr53uRneJ3

rotund dust
#

Are you sure about calling leaderboards code after authentication only?

brisk fjord
#

I click the buttons after signed in. You mean this pop-up right?

rotund dust
#

Did you call Authenticate method of Game Services?

brisk fjord
#

yes it's here `private void Start()
{
if (isAuthenticated)
return;

    if (GameServices.IsAvailable())
    {
        GameServices.Authenticate();
    }
}`
brisk fjord
#

i add those logs `private void Start()
{
if (isAuthenticated)
{
_infoLeaderboardTxt.text = "Already authenticated";
return;
}

   if (GameServices.IsAvailable())
   {
       _infoAchievementsTxt.text = "Should be authenticate";
       GameServices.Authenticate();
   }

}`

#

and when the game opens it says 'should be authenticate'

#

but when i click custom leaderboard button this error is shown

#

also achievements doesnt work

rotund dust
#

Ok.

#

Can you please try running GameServicesDemo scene? If you notice the error over there too, can you add me a tester?

#

Sent you my email id in dm

brisk fjord
#

yes it seems that im authenticated but it gives the same error

#

default leaderboards just works fine in demo but i want to use custom leaderboard and the same error is shown for that too

brisk fjord
#

i added you as tester

brisk fjord
#

this is the achievements button

brisk fjord
#

hi, did you check it? @rotund dust

rotund dust
#

Yes. I can see the achievements displayed

#

Can you try with any other account to confirm?

#

After logging in, it directly showed up on clicking achievements icon.

brisk fjord
#

in my developer account still doesnt show up

#

but i try with different account and it's shown now

#

that's weird

rotund dust
#

Yea!

brisk fjord
#

thanks, now i'll try the leaderboard part

rotund dust
#

Sure!

brisk fjord
#

hi i get an error in this script -> https://paste.ofcode.org/3biCkBAP8pPrzSLvei8kTNk` '[VoxelBusters.CoreLibrary] System.InvalidCastException: Specified cast is not valid.
at (wrapper castclass) System.Object.__castclass_with_cache(object,intptr,intptr)
at CloudSaveManager.LoadData[T] (System.String key) [0x00016] in C:\PersonalProjects\Wordle-Project\Assets\Scripts\CloudSaveManager.cs:70
at CloudSaveManager.LoadAll () [0x00001] in C:\PersonalProjects\Wordle-Project\Assets\Scripts\CloudSaveManager.cs:54
at CloudSaveManager.OnSynchronizeComplete (VoxelBusters.EssentialKit.CloudServicesSynchronizeResult result) [0x00017] in C:\PersonalProjects\Wordle-Project\Assets\Scripts\CloudSaveManager.cs:147 '`

rotund dust
#

Please share your code entries at CloudSaveManager.cs:70

brisk fjord
#

private T LoadData<T>(string key) { string json = CloudServices.GetString(key); if (!string.IsNullOrEmpty(json)) { return (T)jsonProvider.FromJson(json); } return default; }

#

return (T)jsonProvider.FromJson(json); this is the 70

rotund dust
#

If you already have a class which is serializable, better use JsonUtility from unity (not jsonproivder)

#

If you want to use jsonProvider (we provide default one), note that the data from jsonProvider.FromJson(json) is actually an object which in this case will be IDictionary<string, object> and can't be type casted to T.

brisk fjord
#

and i add some debugs. when i run it, it says '[CloudSaveManager] Invalid or empty JSON for key 'commonPlayerData': '"CommonPlayerData"', [CloudSaveManager] Invalid or empty JSON for key 'playerDataTr': '"PlayerDataTr"', [CloudSaveManager] Invalid or empty JSON for key 'playerDataEn': '"PlayerDataEn"'

brisk fjord
brisk fjord
#

i think i solved it! now i'll try it on the device