firebase-android-sdk icon indicating copy to clipboard operation
firebase-android-sdk copied to clipboard

Apple login Unable to resume activity {com.xxx.xxx/com.google.firebase.auth.internal.GenericIdpActivity}: java.lang.NullPointerException: null reference

Open 530l opened this issue 1 year ago • 10 comments

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow with the firebase tag.
  • For general Firebase discussion, use the firebase-talk google group.
  • For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: _____Android Studio Iguana | 2023.2.1 Patch 1

  • Firebase Component: _____ Firestore auth (Database, Firestore, Storage, Functions, etc)

  • Component version: _____ distributionUrl=https://services.gradle.org/distributions/gradle-7.2-bin.zip classpath 'com.android.tools.build:gradle:7.1.3'

    classpath 'com.google.gms:google-services:4.3.5'

    // Import the Firebase BoM implementation(platform("com.google.firebase:firebase-bom:32.7.4")) implementation("com.google.firebase:firebase-analytics-ktx") //google login implementation("com.google.firebase:firebase-auth-ktx") implementation("com.google.android.gms:play-services-auth:21.0.0")

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

    Apple login callback 

What happened? How can we make the problem occur? This could be a description, log/console output, etc. Process: com.xxx.xxxx, PID: 6930 java.lang.RuntimeException: Unable to resume activity {com.xxx.xxx/com.google.firebase.auth.internal.GenericIdpActivity}: java.lang.NullPointerException: null reference at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5055) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5088) at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:54) at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:211) at android.os.Looper.loop(Looper.java:300) at android.app.ActivityThread.main(ActivityThread.java:8348) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028) Caused by: java.lang.NullPointerException: null reference at com.google.android.gms.common.internal.Preconditions.checkNotNull(com.google.android.gms:play-services-basement@@18.2.0:1) at com.google.android.gms.internal.firebase-auth-api.zzags.(com.google.firebase:firebase-auth@@22.3.1:36) at com.google.firebase.auth.internal.GenericIdpActivity.onResume(com.google.firebase:firebase-auth@@22.3.1:178) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1584) at android.app.Activity.performResume(Activity.java:8729) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5044) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5088)  at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:54)  at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)  at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)  at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)  at android.os.Handler.dispatchMessage(Handler.java:106)  at android.os.Looper.loopOnce(Looper.java:211)  at android.os.Looper.loop(Looper.java:300)  at android.app.ActivityThread.main(ActivityThread.java:8348)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028) 

Relevant Code:

// TODO(you): code here to reproduce the problem

Copy the GenericIdpFragment inside quickstart- android and run it. Occasionally it will work, but most likely it will report the same error as above.

530l avatar Mar 20 '24 05:03 530l

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Mar 20 '24 05:03 google-oss-bot

Running device in redmi note 11pro android 13

530l avatar Mar 20 '24 09:03 530l

Hi @530l, thank you for reaching out and reporting the issue. I tried reproducing the issue, but no luck. Were you able to reproduce the issue? If by any chance, can you share the steps on how to replicate the issue? Thanks.

lehcar09 avatar Apr 01 '24 12:04 lehcar09

Hi @lehcar09 , Login page using the Apple way to log in, jump to an external browser, after a successful login, it will be transferred back to their own app login page, the login page is not closed for the time being, to repeat this action, I operate like this.

530l avatar Apr 03 '24 03:04 530l

Hey @530l, thanks for the additional steps. I'm wondering if the issue is due to a race condition or specific device. Could you answer a few questions below for us to further investigate this:

  1. How often does this issue occur when testing?
  2. Does this issue only occurring on the specific devices? or does it also occur on emulators of different versions?
  3. You mentioned copying the GenericIdpFragment from the quickstart. Are you encounter this issue from the quickstart app or on a separate app?

Thanks in advance!

argzdev avatar Apr 03 '24 11:04 argzdev

Hey, @argzdev 1 . Quite often. 2 . Redmi note 11pro android 13 Definitely this problem occurs. 3 .This issue occurs in both the quickstart app and the standalone app.

530l avatar Apr 07 '24 01:04 530l

Occur every time for me.

I had test in many devices and emulator.

Caused by: Java. Lang-Nu1l1PointerException: nul1 reference
at com- google. android.gms. common. internal. Preconditions.checkNotNull(com. goog le. android.gms:[email protected]:1)
at com.google.android.gms. internal. firebase-auth-api. zzaaa. <init> (com. google. firebase: firebase-authae21.0.8:5)
at com.google. firebase. auth. internal. GenericIdpActivity. onResume (com. google. firebase: firebase-authae21.0.8:20)
androld.app. Instrumentation. cal ActivityonResume (instrunentation.Java:1417)
at android. app.Activity. performResume (Activity. java:8351)
androld.app.ActivityThread.performResumeActivity(ActivityThread. java:4897)

W-quan avatar Jun 06 '24 12:06 W-quan

@W-quan can you share the steps to reproduce the issue and the device/ emulator version? Aside from that, If by any chance, can you share an MCVE to help us investigate the issue? Thanks!

lehcar09 avatar Jun 14 '24 09:06 lehcar09

图片

My device: MacBook Pro M3

W-quan avatar Jun 14 '24 09:06 W-quan

Hey @530l. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Jun 21 '24 01:06 google-oss-bot