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

Crash during apple login on android

Open rajatsharma16 opened this issue 1 year ago • 4 comments

  • Android Studio version: Android Studio Giraffe | 2022.3.1 Patch 2
  • Firebase Component: Authentication
  • Component version: com.google.firebase:firebase-auth:22.1.2

I have implemented apple login on android, using firebase, based on this documentation. It is working fine in our testing and by and large in production as well.

However, we are noticing some crash instances of ActivityNotFoundException

Fatal Exception: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat={REDACTED}/... flg=0x50000000 (has extras) }
       at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2067)
       at android.app.Instrumentation.execStartActivity(Instrumentation.java:1727)
       at android.app.Activity.startActivityForResult(Activity.java:5343)
       at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:712)
       at android.app.Activity.startActivityForResult(Activity.java:5278)
       at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:693)
       at android.app.Activity.startActivity(Activity.java:5687)
       at android.app.Activity.startActivity(Activity.java:5640)
       at com.google.firebase.auth.internal.zzay.onComplete(com.google.firebase:firebase-auth@@22.1.2:13)
       at com.google.android.gms.tasks.zzi.run(com.google.android.gms:play-services-tasks@@18.0.2:1)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:223)
       at android.app.ActivityThread.main(ActivityThread.java:7695)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)

Device details:

Brand:Along - Windriver
Model:T88
Android 11

I have checked against this comment and this stackoverflow link. My androidx browser seems to be ok. However still once in a while, I observe this crash.

+--- com.google.firebase:firebase-auth:22.3.1 // this is the current development version, not live in prod yet.
|    +--- androidx.browser:browser:1.4.0

Any help is appreciated thanks.

rajatsharma16 avatar Feb 14 '24 11:02 rajatsharma16

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.

google-oss-bot avatar Feb 14 '24 11:02 google-oss-bot

Hi @rajatsharma16, thank you for reaching out. I've been trying to reproduce this issue but haven't been successful. Any chance you could provide an MCVE where the issue is reproducible?

lehcar09 avatar Feb 15 '24 15:02 lehcar09

Hi @lehcar09 sorry in this case am unable to think what could the MCVE be. I have pasted the stacktrace of a crash observed in production. I have myself not faced it while debugging, else I would have shared some steps.

What I know is that the user was attempting Apple login on the device mentioned above. It looks like that after successful oauth in an external browser, somehow it threw ActivityNotFoundException while trying to return to our app.

Edit: It is because the OS could not find a browser on that particular device.

rajatsharma16 avatar Feb 15 '24 16:02 rajatsharma16

Hi @rajatsharma16, can you share the code snippet of the sign in? Aside from that, can you share more information such as devices android version that are experiencing this behavior, full stacktrace, or anything that you find might be useful, it'll really help us out a lot.

lehcar09 avatar Feb 16 '24 19:02 lehcar09

Hey @rajatsharma16. 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 Feb 23 '24 02:02 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@rajatsharma16 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Mar 01 '24 02:03 google-oss-bot