Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Android googleSignInResult can be null and crash the app #1473

Closed
jpierront opened this issue Nov 8, 2019 · 2 comments · Fixed by #1474
Closed

Android googleSignInResult can be null and crash the app #1473

jpierront opened this issue Nov 8, 2019 · 2 comments · Fixed by #1474

Comments

@jpierront
Copy link
Contributor

Hello,

Crashlytics report a lot of "Cannot read property 'isSuccess' of null" while android google sign in. (Just after screen_view firebase_screen_class: SignInHubActivity)

It seems that const googleSignInResult = com.google.android.gms.auth.api.Auth.GoogleSignInApi.getSignInResultFromIntent(eventData.intent); can be null and crash on googleSignInResult.isSuccess(); call.

I still can't reproduce it but it often comes back in Crashlitics on several Android versions (6, 7, 8, 9).

@EddyVerbruggen
Copy link
Owner

Hi, please submit a PR if you know which line causes it.

jpierront added a commit to jpierront/nativescript-plugin-firebase that referenced this issue Nov 8, 2019
@jpierront
Copy link
Contributor Author

It should avoid app crash, but it doesn’t explain why it’s happening.

Android API doc explains that it happen when we provide the wrong Intent to the getSignInResultFromIntent method. But I do not understand why this happens ... and only occasionally.

https://developers.google.com/android/reference/com/google/android/gms/auth/api/signin/GoogleSignInApi.html#public-abstract-googlesigninresult-getsigninresultfromintent-intent-data

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants