android-basic-samples
android-basic-samples copied to clipboard
NullPointerException: Null uri on com.google.android.gms.games.internal.zzbv.onViewAttachedToWindow
Hello,
Some users that were apparently logged in before to their Games account in my app are experiencing this runtime crash.
Google Play Games Service version included in app : v19.0.0
:
Fatal Exception: java.lang.NullPointerException: Null uri at android.os.Parcel.readException + 1699(Parcel.java:1699) at android.os.Parcel.readException + 1646(Parcel.java:1646) at com.google.android.gms.internal.games.zzb.zzb + 22(com.google.android.gms:play-services-games@@19.0.0:22) at com.google.android.gms.games.internal.zzbq.zza + 24(com.google.android.gms:play-services-games@@19.0.0:24) at com.google.android.gms.games.internal.zzg.zza + 673(com.google.android.gms:play-services-games@@19.0.0:673) at com.google.android.gms.games.internal.zzbv.zzct + 44(com.google.android.gms:play-services-games@@19.0.0:44) at com.google.android.gms.games.internal.zzbv.zzc + 79(com.google.android.gms:play-services-games@@19.0.0:79) at com.google.android.gms.games.internal.zzbv.onViewAttachedToWindow + 49(com.google.android.gms:play-services-games@@19.0.0:49) at android.view.View.dispatchAttachedToWindow + 16649(View.java:16649) at android.view.ViewGroup.dispatchAttachedToWindow + 3149(ViewGroup.java:3149) at android.view.ViewGroup.dispatchAttachedToWindow + 3156(ViewGroup.java:3156) at android.view.ViewGroup.dispatchAttachedToWindow + 3156(ViewGroup.java:3156)
Do you have any idea what could possibly cause this crash ? These are mainly users using Samsung Galaxy S6 Edge running on Android 7.
on my activites.onResume(), I call this for displaying achievments unlock popups, in case the user is signed in to their Play Games account
public void onPlayGameSignedIn() {
try {
CrashlyticsTracker.log("onPlayGameSignedIn");
GoogleSignInAccount lastAccount = GoogleSignIn.getLastSignedInAccount(this);
if (lastAccount != null && GoogleSignIn.hasPermissions(lastAccount, Games.SCOPE_GAMES_LITE)) {
Games.getGamesClient(this, lastAccount).setViewForPopups(findViewById(android.R.id.content));
}
} catch (Exception e) {
Timber.d("Impossible to initialize achievements popups for Google Play Games");
}
}