playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.44k stars 959 forks source link

Successful authentication sign out player immediately if load achievements fails #3028

Open DiegoDePalacio opened 3 years ago

DiegoDePalacio commented 3 years ago

In the process of Authentication, a callback notifying a successful sign-in is called, but sign out the player silently if LoadAchievements is not possible.

This leads to unexpected situations on the app or game using the GooglePlayGames' AndroidClient.

IMHO, the authentication process should also have a callback to notify the app that loading achievements was not possible and maybe even allow to leave the player signed in, even in the case the LoadAchievements failed, if such achievements are not going to be used at all by the app.

nickfourtimes commented 2 years ago

I'm having the same issue. I didn't have any achievements defined for my game, and I was getting this error; I tried defining a single test achievement and trying again, but the error persisted.

The only solution I've found so far is commenting out L150 of AndroidClient.cs: LoadAchievements(ignore => { });

With this line in place, my attempt to authenticate immediately results in the following error written out to logcat, and the user is automatically signed out: 2021-10-05 19:54:42.691 17556 17556 Info Unity LoadAchievements failed: com.google.android.gms.common.api.ApiException: 26502: CLIENT_RECONNECT_REQUIRED

However, once I comment out that line, I no longer see that error, and the user remains authenticated. However, I'm not sure if that's a sustainable solution, if & when I want to add achievements into my game.

mohumohu-corp commented 2 years ago

I'm in the exact same situation. I do not have a single Achivements set up, but I get this error.