playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.45k stars 961 forks source link

[Resolved] Sign-in request getting auto canceled. #3266

Closed HexdogStudio closed 1 year ago

HexdogStudio commented 1 year ago

I have succesfuly integrated the API inside my project, which seems working about 2 days, then without any modification both in the Console and the Editor side, It started canceling the authentication. I'm using Unity's built-in Social libray for authentication:

public static void SignIn(Action<bool> callback)
{
     PlayGamesPlatform.Activate();
     Social.localUser.Authenticate(callback);
}

I'm assuming everything was well setuped, becasue it worked for the first 2 days without any issue:

I'm getting this message:

09-12 21:31:12.534  7920  7944 W Unity   : *** [Play Games Plugin 0.11.01] 09. 12. 23 21:31:12 +02:00 ERROR: Returning an error code.

Also the game and all it's achievement is recognized by Google Play Games App, just the Authentication getting canceled for some reason, any idea?

Note: the game is in "Draft" stage at the Play Console, I don't think it's have any impact on the result.

Unity version: 2021.3.28f1 GPGS Plugin version: 0.11.01

skylorbeck commented 1 year ago

I'm having the same issue. Would be very happy if anyone has any info at all.

HexdogStudio commented 1 year ago

Back after a few days and I'm finally manage to solve the problem, there is how I done it:

  1. Create a new Cloud and Play Console project based on a different package name (otherwise I'm not sure its gona work with the old one)
  2. Create an Android client at the creditians on Google Cloud
  3. Add the client to your GPGS creditians
  4. Copy the Resoure XML and use It to setup your project
  5. Insert the client's id to the input field
  6. Finaly force resolve your project and you can build and test It

I'm using the following script for authentication:

public static void SignIn(Action<SignInStatus> callback)
{
    PlayGamesPlatform.Activate();
    PlayGamesPlatform.Instance.Authenticate(callback);
}

I have tested in the last 30 days and It's still working, Cloud Saving and Achievements as well. Hope It would help to someone else as well.

skylorbeck commented 1 year ago

Thank you very much for the update. I was afraid it would be a "start over" scenario.