playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.43k stars 953 forks source link

Sign in doesn't work on first load of the app #3198

Open henryfJones opened 1 year ago

henryfJones commented 1 year ago

I then loaded a new build onto the device and sign in failed. I then reponed the app and it works perfectly everytime. I then deleted the app and reinstalled it and now it won't sign in at all.

To Reproduce Steps to reproduce the behavior:

Expected behavior:

Sign in to complete successfully on first load of the app.

Observed behavior:

The app ran and failed to sign in to the Google Play account. I closed the app and reopened it and it worked perfectly every time I tried after that (6 or so times). Then to check the error logs again I uninstalled the app and redeployed it to the device to run it fresh and it now just doesn't sign in.

I noticed to related errors in the logs. The first is from GMSBackupTransport saying there was an exception on restoring data for next application. See image.

I also saw the SignInPerformer is complaining about the Android Manaifest failing to inclide a non-numeric Play Games Servies Application id. When checking the Android Manifest I see this that a space has been added intentially to force it not to be non-numerical.

The logs also respond showing the sign in function was attempted but the user was not authenticated so and error is raised saying the Sign-in status is cancelled.

Bug Report: https://drive.google.com/file/d/1D6xynNL97CgGeZqN1qs5w6wmoWkVp2lu/view?usp=sharing

image image image

Unity version: 2021.3.12f1 Google Play Games Plugin for Unity version: 0.11.01

Happened on devices running Android 10 & 12. Logs are from Android 12 device.

FakeAndrii commented 1 year ago

Have you resolved this issue by any chance? It appears that I am having it now

henryfJones commented 1 year ago

Have you resolved this issue by any chance? It appears that I am having it now

Unfortunately not.

FakeAndrii commented 1 year ago

Welp... Thanks for the reply

So far I have seen that it occurs when the user has manual account selection on for the app, and when permissions request popup is showing on the first launch. If I grant permissions to the app before the first launch from its settings menu it works ok. It is also working ok if I change permissions model to runtime. Looks like something native anyway.