playgameservices / android-basic-samples

Google Play game services - Android samples
Apache License 2.0
971 stars 973 forks source link

IllegalStateException @ GamesClientImpl.zzb #266

Closed trimax-items closed 6 years ago

trimax-items commented 6 years ago

I'm using android game services 11.8.0 and my users get the following crash without message. The stack trace is reported in google play developer console and I have no idea how to reproduce it:

java.lang.IllegalStateException: at com.google.android.gms.common.internal.zzbq.zza (Unknown Source) at com.google.android.gms.games.internal.GamesClientImpl.zzb (Unknown Source) at com.google.android.gms.common.internal.zzab. (Unknown Source) at com.google.android.gms.common.internal.zzab. (Unknown Source) at com.google.android.gms.games.internal.GamesClientImpl. (Unknown Source) at com.google.android.gms.games.Games$zzb.zza (Unknown Source) at com.google.android.gms.common.api.GoogleApi.zza (Unknown Source) at com.google.android.gms.common.api.internal.zzbo. (Unknown Source) at com.google.android.gms.common.api.internal.zzbm.zzb (Unknown Source) at com.google.android.gms.common.api.internal.zzbm.handleMessage (Unknown Source) at android.os.Handler.dispatchMessage (Handler.java:98) at android.os.Looper.loop (Looper.java:148) at android.os.HandlerThread.run (HandlerThread.java:61)

mwgray commented 6 years ago

Hi @trimax-items,

Can you send the package/app name? How often are your users seeing this?

trimax-items commented 6 years ago

https://play.google.com/store/apps/details?id=net.codecanyon.trimax.wordsearch

It is reported as 94 crashes from 25 users in 3 three days.

mwgray commented 6 years ago

@trimax-items, I was able to download and install your app. I was able to get a similar callstack by logging in and tapping the ribbon/achievements icon:


01-10 12:59:34.058 22039-22293/? E/AndroidRuntime: FATAL EXCEPTION: GoogleApiHandler
                                                   Process: net.codecanyon.trimax.wordsearch, PID: 22039
                                                   java.lang.IllegalStateException: Games APIs requires https://www.googleapis.com/auth/games_lite function.
                                                       at com.google.android.gms.common.internal.zzbq.zza(Unknown Source:8)
                                                       at com.google.android.gms.games.internal.GamesClientImpl.zzb(Unknown Source:62)
                                                       at com.google.android.gms.common.internal.zzab.<init>(Unknown Source:33)
                                                       at com.google.android.gms.common.internal.zzab.<init>(Unknown Source:25)
                                                       at com.google.android.gms.games.internal.GamesClientImpl.<init>(Unknown Source:8)
                                                       at com.google.android.gms.games.Games$zzb.zza(Unknown Source:21)
                                                       at com.google.android.gms.common.api.GoogleApi.zza(Unknown Source:45)
                                                       at com.google.android.gms.common.api.internal.zzbo.<init>(Unknown Source:37)
                                                       at com.google.android.gms.common.api.internal.zzbm.zzb(Unknown Source:16)
                                                       at com.google.android.gms.common.api.internal.zzbm.handleMessage(Unknown Source:486)
                                                       at android.os.Handler.dispatchMessage(Handler.java:102)
                                                       at android.os.Looper.loop(Looper.java:164)
                                                       at android.os.HandlerThread.run(HandlerThread.java:65)

If you are getting this error, see this Stack Overflow thread to address it.

trimax-items commented 6 years ago

The above exception disappears when I implement silent sign in but the real problem still persists.

mwgray commented 6 years ago

Can you clarify what you mean by the 'real problem'?

It looks like silent sign in needs to be pushed to the users for the crashes to stop.

trimax-items commented 6 years ago

I've just updated my app with silent sign in. What I mean by real problem is the case I initiated at the top of this page. It is the IllegalStateException without a message from GamesClientImpl.

mwgray commented 6 years ago

It looks like these call stacks are the same, so likely this error should clear up over time as users get the updated app.

trimax-items commented 6 years ago

Updated the app but still getting the exception from the new version.

mwgray commented 6 years ago

I'm still seeing the app crash with the same repro setups on the Jan 11, 2018 version.

trimax-items commented 6 years ago

Can you please tell me the steps to reproduce it?

mwgray commented 6 years ago

Same as before; Fresh install, I downloaded the app, logged in and tapped the award ribbon button.

On Fri, Jan 12, 2018 at 9:42 AM, trimax-items notifications@github.com wrote:

Can you please tell me the steps to reproduce it?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/playgameservices/android-basic-samples/issues/266#issuecomment-357305026, or mute the thread https://github.com/notifications/unsubscribe-auth/AJCK_gddtoPosrqyZUjH2ez5q-zIx9BAks5tJ5mhgaJpZM4RZRKl .

trimax-items commented 6 years ago

Does it crash when you do these:

  1. Tap the gear icon and open settings
  2. Tap the log out button at the bottom and then relogin tapping the same button
  3. Go to home screen and tap the award ribbon button. Thanks.
mwgray commented 6 years ago

Yep!

On Jan 12, 2018 11:04 AM, "trimax-items" notifications@github.com wrote:

Does it crash when you do these:

  1. Tap the gear icon and open settings
  2. Tap the log out button at the bottom and then relogin tapping the same button
  3. Go to home screen and tap the award ribbon button. Thanks.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/playgameservices/android-basic-samples/issues/266#issuecomment-357316729, or mute the thread https://github.com/notifications/unsubscribe-auth/AJCK_nBMAvcQ6LW0guqJ1_j9oD4gWtGnks5tJ6oygaJpZM4RZRKl .

trimax-items commented 6 years ago

Thanks mwgray, I think I will completely remove google play services from my app.

mwgray commented 6 years ago

Sorry to hear it; I'm pretty confident the issues you are facing are related to signing in and ensuring you have a valid session.

If you still want to try and work out the issue, feel free to re-open the ticket!