playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.46k stars 965 forks source link

Infinite loading after an attempt of Play Games authentication #2999

Closed mrShpit closed 3 years ago

mrShpit commented 3 years ago

Version 0.10.12

After trying to authorize in the Play Games services a green "Play Games" icon pops up after which a white panel appears with a loading circle animation where the process stucks. Request doesn't return any errors. This happened on all testing accounts and devices it was tried on.

I followed this tutorial. There were some differences in a process because projects linking feature has been updated in the new google console but the result is pretty the same. I have two OAuth client ids in the google cloud: Android and Web. They're linked to the corresponding credentials on the google console: for android and a game server. Android client's SHA-1 in the google cloud is the same as SHA-1 certificate fingerprint on the google console. Play Games Services configuration has "Published" status in the google console and I added all testing emails on the "Play Games Services testers" tab. They're also added to the the google cloud's OAuth consent screen "test users" list. I tried to clear google play games data on a device. I also reproduced it in both internal test and alpha test tracks.

Here is my log:

02-04 18:32:27.340 17716 25032 I Unity   :  [Play Games Plugin 0.10.12] 02/04/21 18:32:27 +02:00 DEBUG: Creating platform-specific Play Games client.
02-04 18:32:27.340 17716 25032 I Unity   : System.Action:Invoke()
02-04 18:32:27.340 17716 25032 I Unity   : GooglePlayGames.OurUtils.PlayGamesHelperObject:Update()
02-04 18:32:27.340 17716 25032 I Unity   :
02-04 18:32:27.340 17716 25032 I Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
02-04 18:32:27.340 17716 25032 I Unity   :
02-04 18:32:27.341 17716 25032 I Unity   :  [Play Games Plugin 0.10.12] 02/04/21 18:32:27 +02:00 DEBUG: Creating Android IPlayGamesClient Client
02-04 18:32:27.341 17716 25032 I Unity   : System.Action:Invoke()
02-04 18:32:27.341 17716 25032 I Unity   : GooglePlayGames.OurUtils.PlayGamesHelperObject:Update()
02-04 18:32:27.341 17716 25032 I Unity   :
02-04 18:32:27.341 17716 25032 I Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
02-04 18:32:27.341 17716 25032 I Unity   :
02-04 18:32:27.901  1012  1091 D ActivityManager: package  com.google.android.gms, user - 0 is SDcard whitelisted
02-04 18:32:27.912  1012  1100 I ActivityManager: Start proc 20496:com.google.android.gms.ui/u0a89 for activity {com.google.android.gms/com.google.android.gms.auth.api.signin.ui.SignInActivity}
02-04 18:32:27.919  1012  2334 I ActivityManager: DSS OFF for com.google.android.gms
02-04 18:32:28.341  1012  1446 D ActivityManager: Received ACTIVITY intent dd10cd0 Key{startActivity pkg=com.google.android.gms intent=act=com.google.android.gms.games.SIGN_IN flg=0x4000000 pkg=com.google.android.play.games flags=0x4000000 u=0} res=0 from uid 10089
02-04 18:32:28.352  1012  1091 D ActivityManager: package  com.google.android.play.games, user - 0 is SDcard whitelisted
02-04 18:32:28.364  1012  1100 I ActivityManager: Start proc 25101:com.google.android.play.games/u0a347 for activity {com.google.android.play.games/com.google.android.gms.games.ui.signin.SignInActivity}
02-04 18:32:28.370  1012  1446 I ActivityManager: DSS OFF for com.google.android.play.games
02-04 18:32:32.538  1012  3436 D ActivityManager: Received ACTIVITY intent 5518706 Key{startActivity pkg=com.google.android.gms intent=cat=[categoryhack:e565e0d5-1b04-42fe-b17f-629217f39f6a] cmp=com.google.android.gms/.signin.activity.SignInActivity flags=0x0 u=0} res=0 from uid 10347
02-04 18:32:33.162  1012  2334 E PackageManager: Failed to find package; permName: android.permission.INTERNET, uid: 99219, caller: 1000
02-04 18:32:33.163  1012  2334 D ActivityManager: package  com.google.android.gms, user - 0 is SDcard whitelisted
02-04 18:32:33.181  1012  1100 I ActivityManager: Start proc 25445:com.google.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0/u0i219 for  {com.google.android.gms/org.chromium.content.app.SandboxedProcessService0:0}
02-04 18:32:33.181  1012  1100 I ActivityManager: check webview name : com.google.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0check hostingname webview : {com.google.android.gms/org.chromium.content.app.SandboxedProcessService0:0}
02-04 18:32:33.195  1012  3477 D ActivityManager: The following uid has registered to recieve broadcast for proxy related updates 10089
02-04 18:32:33.209  1012  3477 I ActivityManager: DSS OFF for com.google.android.gms
02-04 18:32:33.390  1012  1706 D ActivityManager: [ML] packageName : **[HERE IS MY PACKAGE NAME]** uid : 0 type : ml
02-04 18:32:33.390  1012  1706 D ActivityManager: [ML] This Package is on the Memory

The only strange thing I can see here is "Failed to find package; permName: android.permission.INTERNET" though it's in the manifest and other internet features are working fine. I receive no logs after this until I tap on a background to cancel the process. Loading never finishes if I don't cancel it manually.

02-04 18:34:03.921  1012  1831 I ActivityManager: Killing 25445:com.google.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0/u0a89i219 (adj 0): isolated not needed
02-04 18:34:05.009 17716 17716 I Unity   : Returning an error code.
02-04 18:34:05.009 17716 17716 I Unity   : GooglePlayGames.Android.<>c__DisplayClass18_0:<Authenticate>b__0(Int32)
02-04 18:34:05.009 17716 17716 I Unity   : System.Action`1:Invoke(T)
02-04 18:34:05.009 17716 17716 I Unity   : System.Action`1:Invoke(T)
02-04 18:34:05.009 17716 17716 I Unity   : System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
02-04 18:34:05.009 17716 17716 I Unity   : UnityEngine.AndroidJavaProxy:Invoke(String, Object[])
02-04 18:34:05.009 17716 17716 I Unity   : UnityEngine._AndroidJNIHelper:InvokeJavaProxyMethod(AndroidJavaProxy, IntPtr, IntPtr)
02-04 18:34:05.009 17716 17716 I Unity   :
02-04 18:34:05.009 17716 17716 I Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
02-04 18:34:05.009 17716 17716 I Unity   :
02-04 18:34:05.026  1012  1091 I ActivityManager: Killing 24269:com.android.providers.calendar/u0a116 (adj 999): empty #37
02-04 18:34:05.088 17716 25032 I Unity   :  [Play Games Plugin 0.10.12] 02/04/21 18:34:05 +02:00 DEBUG: Authentication canceled

Thank you for your time and kind regards.

thechristopher commented 3 years ago

I have similar problem with same version (0.10.12). Sign in is stuck on loading circle - I can click back and select other account, but after that it's always big white rectangle with infinite spinner on top. I reproduced it in emulator and on real device.

JackLumers commented 3 years ago

Same problem! Can't figure it out almost a week aready

manwithsteelnerves commented 3 years ago

Seems like its an issue with the native libraries. Does anyone have a solution? @claywilkinson

dvillaseca commented 3 years ago

I had the same issue, you have to put the OAuth consent screen in production on the Google Cloud Platform

mrShpit commented 3 years ago

I had the same issue, you have to put the OAuth consent screen in production on the Google Cloud Platform

It helped. Consent screen appeared indeed and I was able to enter into a game. I feel myself stupid for not trying it before posting an issue but from the other side I never saw publishing a consent screen as a condition of an auth feature availability in an internal test while looking for an answer. Google Cloud even says that "App in testing mode will only be available to users you add to the list of test users" and I surely added them. I fail to see a point of a testing mode for a consent screen if it just doesn't work at all until published. And if I did something wrong earlier which caused testing mode to break - it would be nice to know what was that exactly to avoid in the future. Thanks to @dvillaseca for the answer. Much appreciate your help.

Thank you for your time and kind regards.

dvillaseca commented 3 years ago

You welcome I have configured google play games multiple times for different games, this change for the OAuth concent screen it's very recent. The setup it's much easier now but google always has this kind of tricks where you have to dig deep to find the issue

turh2019 commented 3 years ago

I had the same issue, you have to put the OAuth consent screen in production on the Google Cloud Platform

where is the consent screen and how i do this ?

JeremieF1984 commented 2 years ago

@turh2019 Google Cloud / APIs and Services / OAuth consent screen