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

firebase-auth:22.2.1 - com.google.android.gms.internal.firebase-auth-api.zzwk: java.lang.ArrayIndexOutOfBoundsException #5266

Closed
DeuceTheCoder opened this issue Aug 21, 2023 · 17 comments

Comments

@DeuceTheCoder
Copy link

[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 Giraffe | 2022.3.1
  • Firebase Component: Firebase Auth
  • Component version: 22.2.1

[REQUIRED] Step 3: Describe the problem

Since upgrading our Firebase BOM from 32.2.0 to 32.2.2, we've received a number of obfuscated crash reports in Firebase Crashlytics that we are unable to reproduce or diagnose.

Steps to reproduce:

Have not been able to reproduce. Crashes generally occur within a second of the session start

Relevant Code:

Fatal Exception: com.google.android.gms.internal.firebase-auth-api.zzwk: java.lang.ArrayIndexOutOfBoundsException: length=2; index=-1
       at com.google.firebase.auth.internal.zzbt.zzd(zzbt.java:38)
       at com.google.firebase.auth.FirebaseAuth.zzT(com.google.firebase:firebase-auth@@22.1.1:14)
       at com.google.firebase.auth.zzx.zza(zzx.java:1)
       at com.google.android.gms.internal.firebase-auth-api.zzzc.zzb(com.google.firebase:firebase-auth@@22.1.1:3)
       at com.google.android.gms.internal.firebase-auth-api.zzabs.zzj(com.google.firebase:firebase-auth@@22.1.1:1)
       at com.google.android.gms.internal.firebase-auth-api.zzabp.zzq(com.google.firebase:firebase-auth@@22.1.1:2)
       at com.google.android.gms.internal.firebase-auth-api.zzaaq.zzq(com.google.firebase:firebase-auth@@22.1.1:1)
       at com.google.android.gms.internal.firebase-auth-api.zzxj.zzb(com.google.firebase:firebase-auth@@22.1.1:2)
       at com.google.android.gms.internal.firebase-auth-api.zzaca.zzc(com.google.firebase:firebase-auth@@22.1.1:12)
       at com.google.android.gms.internal.firebase-auth-api.zzaca.zzb(com.google.firebase:firebase-auth@@22.1.1:14)
       at com.google.android.gms.internal.firebase-auth-api.zzabf.zzf(com.google.firebase:firebase-auth@@22.1.1:4)
       at com.google.android.gms.internal.firebase-auth-api.zzys.zzp(com.google.firebase:firebase-auth@@22.1.1:4)
       at com.google.android.gms.internal.firebase-auth-api.zzaar.zzj(com.google.firebase:firebase-auth@@22.1.1:3)
       at com.google.android.gms.internal.firebase-auth-api.zzzc.zzc(com.google.firebase:firebase-auth@@22.1.1:1)
       at com.google.android.gms.internal.firebase-auth-api.zzabt.run(com.google.firebase:firebase-auth@@22.1.1:1)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at com.google.firebase.concurrent.CustomThreadFactory.lambda$newThread$0(CustomThreadFactory.java:47)
       at java.lang.Thread.run(Thread.java:1012)

Caused by:

Caused by java.lang.ArrayIndexOutOfBoundsException: length=2; index=-1
       at java.util.ArrayList.get(ArrayList.java:439)
       at com.google.firebase.auth.internal.zzbt.zzd(zzbt.java:19)
       at com.google.firebase.auth.FirebaseAuth.zzT(com.google.firebase:firebase-auth@@22.1.1:14)
       at com.google.firebase.auth.zzx.zza(zzx.java:1)
       at com.google.android.gms.internal.firebase-auth-api.zzzc.zzb(com.google.firebase:firebase-auth@@22.1.1:3)
       at com.google.android.gms.internal.firebase-auth-api.zzabs.zzj(com.google.firebase:firebase-auth@@22.1.1:1)
       at com.google.android.gms.internal.firebase-auth-api.zzabp.zzq(com.google.firebase:firebase-auth@@22.1.1:2)
       at com.google.android.gms.internal.firebase-auth-api.zzaaq.zzq(com.google.firebase:firebase-auth@@22.1.1:1)
       at com.google.android.gms.internal.firebase-auth-api.zzxj.zzb(com.google.firebase:firebase-auth@@22.1.1:2)
       at com.google.android.gms.internal.firebase-auth-api.zzaca.zzc(com.google.firebase:firebase-auth@@22.1.1:12)
       at com.google.android.gms.internal.firebase-auth-api.zzaca.zzb(com.google.firebase:firebase-auth@@22.1.1:14)
       at com.google.android.gms.internal.firebase-auth-api.zzabf.zzf(com.google.firebase:firebase-auth@@22.1.1:4)
       at com.google.android.gms.internal.firebase-auth-api.zzys.zzp(com.google.firebase:firebase-auth@@22.1.1:4)
       at com.google.android.gms.internal.firebase-auth-api.zzaar.zzj(com.google.firebase:firebase-auth@@22.1.1:3)
       at com.google.android.gms.internal.firebase-auth-api.zzzc.zzc(com.google.firebase:firebase-auth@@22.1.1:1)
       at com.google.android.gms.internal.firebase-auth-api.zzabt.run(com.google.firebase:firebase-auth@@22.1.1:1)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at com.google.firebase.concurrent.CustomThreadFactory.lambda$newThread$0(CustomThreadFactory.java:47)
       at java.lang.Thread.run(Thread.java:1012)
@google-oss-bot
Copy link
Contributor

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

@prameshj
Copy link

Thanks for reporting.. we are working on a fix. Meanwhile can you confirm if this is happening for users that are logging in anonymously or using any other provider?

This could happen if the FirebaseUser did not have any provider info or user id associated with them. We will include additional logging along with the fix to help future debugging easier.

@MarjanaKarzek
Copy link

@DeuceTheCoder thanks for reporting the issue! I was just about to create an issue report for it myself.
@prameshj we are experiencing the same issue in version 22.1.1 even.
We are also unable to reproduce the issue but have noticed it happens on app start and might therefore be a bug within the initialisation of FirebaseApp.

@Vignesh-772
Copy link

@prameshj This is happening when user are logging in anonymously.

@argzdev
Copy link
Contributor

argzdev commented Aug 22, 2023

Hi all, if others also encounter this issue, please do leave a thumbs up on the original author's post so we can track the severity of the issue. Thanks!

@prameshj
Copy link

@prameshj This is happening when user are logging in anonymously.

Are you seeing this for new users who are logging in anonymously? Or are these previously created users, which are now just reopening the app?

I am asking because this issue can happen only if there is no firebase info associated with the user json, which indicates a malformed representation of the user, that is in persistence.

@Vignesh-772
Copy link

Vignesh-772 commented Aug 23, 2023

@prameshj Not sure about when it is happening. We don't have stack trace for the origin.
This is how we implemented we will check getCurrentUser() if it is gives null then we are calling signInAnonymously().

@MarjanaKarzek
Copy link

We are not calling signInAnonymously() in our app

@vashisthg
Copy link

I am also getting a lot of crashes due to this in our production app in play store.

@prameshj
Copy link

prameshj commented Sep 1, 2023

Thanks for the responses. We hope to make the fix available in a following release soon.

As mentioned above, the issue should only happen if the persisted user info was in a malformed state, need not necessarily because of anonymous auth. If you do find a specific repro, please add details here (about the user sign in method, how long the account info was persisted for). This does not block the release of the fix, we are doing that in parallel. Thanks!

@ShivamGoyal1899
Copy link

@prameshj @NhienLam Any update on the fix for this? By when will this be rolled out?

@prameshj
Copy link

prameshj commented Sep 8, 2023

We will be including the fix in the upcoming release (should happen within the next 2 weeks). We will update here once the release notes are published.

@argzdev
Copy link
Contributor

argzdev commented Sep 18, 2023

Hi folks, a new version of Firebase Auth has been released. That said could you try the latest version 22.1.2 and see if the issue still persists? Thanks!

@google-oss-bot
Copy link
Contributor

Hey @DeuceTheCoder. 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!

@argzdev
Copy link
Contributor

argzdev commented Sep 25, 2023

HI folks, since we're no longer receiving any updates related to this. I'll close this for now. Feel free to let me know if we have to reopen this. Thanks!

@argzdev argzdev closed this as completed Sep 25, 2023
@AdHrithik
Copy link

AdHrithik commented Sep 27, 2023

Is this issue solved in flutter package as well? If not, when can we expect it?

@argzdev
Copy link
Contributor

argzdev commented Sep 27, 2023

Hi @AdHrithik, checking the latest release notes in the flutterfire repo, it doesn't seem to be included. Please reach out to the flutterfire team to get updates regarding their planned release date with the fix.

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

10 participants