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

java.lang.RuntimeException com.google.android.gms:play-services-auth@@20.7.0:23 #5768

Closed
efstathiosntonas opened this issue Mar 7, 2024 · 9 comments

Comments

@efstathiosntonas
Copy link

efstathiosntonas commented Mar 7, 2024

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: Android Studio Iguana | 2023.2.1
  • Firebase Component: Authentication
  • Component version: 20.7.0

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

getting this stacktrace:

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
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3635)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3792)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7838)
        at java.lang.reflect.Method.invoke(Method.java:-2)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
        at com.google.android.gms.auth.api.signin.internal.SignInHubActivity.onCreate(com.google.android.gms:play-services-auth@@20.7.0:23)
        at android.app.Activity.performCreate(Activity.java:8051)
        at android.app.Activity.performCreate(Activity.java:8031)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3608)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3792)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7838)
        at java.lang.reflect.Method.invoke(Method.java:-2)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)


Relevant Code:

// TODO(you): code here to reproduce the problem
@google-oss-bot
Copy link
Contributor

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@argzdev
Copy link
Contributor

argzdev commented Mar 8, 2024

Hey @efstathiosntonas, thanks for reaching out. I'm guessing this have something to do with the sign ins. Could you share which provider is causing this issue? (e.g. Google Sign In, Email/Password). Also are there any specific steps to reproduce this issue?

@efstathiosntonas
Copy link
Author

the providers I'm using are Facebook, Phone and Apple Sign in.

I'm using react-native-firebase@19.0.1 so I'm not quite sure what code might trigger this.

cc: @mikehardy

@efstathiosntonas
Copy link
Author

efstathiosntonas commented Mar 8, 2024

I got some users complaining that they never received SMS code and one of them mentioned Facebook wasn't working neither.

@lehcar09
Copy link
Contributor

Hi @efstathiosntonas, it doesn’t look like a straightforward issue. I’ve tried reproducing this on my side with Firebase Auth in native Android, but no luck. The play-services-auth library is added separately in Firebase Auth for Google Sign In, unlike with React Native Firebase Auth for Google Sign In.

I wonder if it’s an issue that’s specific within React Native Firebase and if the issue will be fixed by updating the play-service-auth library version. Looking through our internal bugs, it looks like there was a recent fix that was applied to the latest version of com.google.android.gms:play-services-auth:21.0.0. Maybe the invertase team could update this dependency. Have you tried filing an issue on their repository?

@efstathiosntonas
Copy link
Author

@efstathiosntonas
Copy link
Author

efstathiosntonas commented Apr 11, 2024

@lehcar09 Since react-native-firebase updated to include play-services-auth:21.0.0 I will close this down, so far no issues on our bug tracker.

Will reopen if I ever see this again. Thank you both guys for looking into this.

@mikehardy the release notes points to 404 instead of navigating here, just fyi:
https://github.com/invertase/react-native-firebase/blob/main/CHANGELOG.md#1911-2024-03-26

@mikehardy
Copy link

Thanks @efstathiosntonas - saw you mentioned that earlier but fell off my radar. Repaired the changelog and it looks much better after manual fix here invertase/react-native-firebase@8ef9249 cheers

@efstathiosntonas
Copy link
Author

efstathiosntonas commented Apr 11, 2024

Thanks Mike, in my mind I thought it was a release page but after seing your commit I realized it is an .md (plus the fact I linked the .md 🤦‍♂️), I would have opened a PR instead of nagging you here 😅

@firebase firebase locked and limited conversation to collaborators May 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants