Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement/bump gms google auth version #382

Conversation

selcuk-sahin
Copy link
Contributor

@selcuk-sahin selcuk-sahin commented Jul 20, 2024

Seeing other folks resolve the
below error by updating the google-play SDK version, I made a change that increases default version to latest and allows clients to override this setting.

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.XXXXX/com.google.android.gms.auth.api.signin.internal.SignInHubActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference

firebase/firebase-android-sdk#5768

Also, added a check if gapi initialized correctly using initialize method.

As seen on issue #364, this also fixes crashes happens when signIn & signOut called before the initialization.
Instead of crashing, the plugin is now able to reject the promise gracefully.
ref: https://github.com/react-native-google-signin/google-signin/blob/f5ef438aeda0c40f68082dc0b1bddc04bbd6298c/android/src/main/java/com/reactnativegooglesignin/RNGoogleSigninModule.java#L174

@reslear
Copy link
Collaborator

reslear commented Jul 21, 2024

Good, you can test on local?

@selcuk-sahin
Copy link
Contributor Author

Good, you can test on local?

Yes, locally tested on my Android Device API (31) and a simulator (API 33). However, the mentioned error was on the Crashlytics Logs, so I hadn't reproduced that issue.

In my case, the plugin works the same before & after the change.

@selcuk-sahin
Copy link
Contributor Author

Also, added a check if gapi initialized correctly using initialize method. Please see the updated comment ⬆️

@reslear reslear merged commit e808d9e into CodetrixStudio:master Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants