firebase / firebase/firebase-android-sdk

Firebase-auth - Can't get the number of an unknown enum value

Open
#8,280 2 comments 0 reactions 0 assignees View on GitHub
api: auth api: firestore
Dominant language
Java
Stars
2.6k
Forks
710
Avg merge
2d 9h
Merged PRs (30d)
31

Description

### [REQUIRED] Step 2: Describe your environment

- Android Studio version: Android Studio Quail 1 | 2026.1.1
- Firebase Component: Authentication
- Component version: 24.0.1

### [REQUIRED] Step 3: Describe the problem

#### Steps to reproduce:

On app startup, the application eagerly initializes Firestore (which forces FirebaseAuth initialization). For only one 1-2 users (for about 50 000 users) — appears to be those with pre-existing persisted auth state written by a previous SDK version — FirebaseAuth.
throws while (de)serializing an internal protobuf enum, crashing the whole app at Application.onCreate.

It is not reproducible on a fresh install / signed-out state; it only reproduces for this user with existing persisted auth state, which is why we cannot trigger it on demand. It is a hard, non-recoverable startup crash for affected users.

The failure is:

```
java.lang.IllegalArgumentException: Can't get the number of an unknown enum value.
at com.google.android.gms.internal.firebase-auth-api.zzxz.zza(com.google.firebase:firebase-auth@@24.0.1:2)
at com.google.android.gms.internal.firebase-auth-api.zzxh$zzb.zza(com.google.firebase:firebase-auth@@24.0.1:35)
at com.google.android.gms.internal.firebase-auth-api.zzxh$zzb$zza.zza(com.google.firebase:firebase-auth@@24.0.1:11)
at com.google.android.gms.internal.firebase-auth-api.zzbm.zzb(com.google.firebase:firebase-auth@@24.0.1:130)
at com.google.android.gms.internal.firebase-auth-api.zzbm.zzd(com.google.firebase:firebase-auth@@24.0.1:143)
at com.google.android.gms.internal.firebase-auth-api.zzbm.zzd(com.google.firebase:firebase-auth@@24.0.1:143)
at com.google.android.gms.internal.firebase-auth-api.zzbw.zza(com.google.firebase:firebase-auth@@24.0.1:2)
at com.google.android.gms.internal.firebase-auth-api.zzmy$zza.zza(com.google.firebase:firebase-auth@@24.0.1:18)
at com.google.firebase.auth.internal.zzby.zzb(com.google.firebase:firebase-auth@@24.0.1:7)
at com.google.firebase.auth.internal.zzcb.zza(com.google.firebase:firebase-auth@@24.0.1:81)
at com.google.firebase.auth.FirebaseAuth.(com.google.firebase:firebase-auth@@24.0.1:349)
at com.google.firebase.auth.FirebaseAuthRegistrar.lambda$getComponents$0(com.google.firebase:firebase-auth@@24.0.1:11)
at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0(...)
at com.google.firebase.firestore.auth.FirebaseAuthCredentialsProvider.(FirebaseAuthCredentialsProvider.java:78)
at com.google.firebase.firestore.FirebaseFirestore.newInstance(FirebaseFirestore.java:196)
at com.google.firebase.firestore.FirebaseFirestore.getInstance(FirebaseFirestore.java:129)
at .ProfileRepositoryImpl.(ProfileRepositoryImpl.kt) // calls FirebaseFirestore.getInstance()
... (Hilt-injected @Singleton created during Application.onCreate)
Caused by: java.lang.IllegalArgumentException: Can't get the number of an unknown enum value.
```

#### Relevant Code:

Crash is reached simply by initializing Firestore, which forces FirebaseAuth init.

```
private val firestore = FirebaseFirestore.getInstance()
```

It seems to be introduced since we have updated firebase-bom from 34.5.0 to 34.12.0

Thanks a lot.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.