Firebase-auth - Can't get the number of an unknown enum value
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 冷清
调研方向
从堆栈跟踪中的 FirebaseAuth 初始化以及 ProfileRepositoryImpl.kt 中报告的 private val firestore = FirebaseFirestore.getInstance() 开始。使用较早 SDK 版本中持久化的身份验证状态,而不是全新安装,比较 Firebase BoM 34.5.0 和 34.12.0 之间的行为。如果 repository 支持,则通过回归测试或已确认的复现来识别并处理 unknown-enum 启动崩溃,即视为完成。
由索引模型根据 Issue 内容生成。
描述
[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.<init>(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.<init>(FirebaseAuthCredentialsProvider.java:78)
at com.google.firebase.firestore.FirebaseFirestore.newInstance(FirebaseFirestore.java:196)
at com.google.firebase.firestore.FirebaseFirestore.getInstance(FirebaseFirestore.java:129)
at <our code>.ProfileRepositoryImpl.<init>(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.
- 主要语言
- Java
- 星标
- 2.6k
- 派生
- 733
- 平均合并
- 2 天 15 小时
- 30 天内合并 PR
- 72
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
firebase/firebase-android-sdk 的其他 Issue
-
api: remoteconfig
难度 2/5 1-3 小时 新手友好度 78/100
firebase/firebase-android-sdk#8827 ·
维护者通常 1 天内回复
-
Crashlytics plugin writes build ID lists in directory listing order, so APKs can differ between machines可能已有人在做 @mrober 于 8 天前认领。 未关闭api: crashlytics
难度 2/5 1-3 小时 新手友好度 72/100
firebase/firebase-android-sdk#8789 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
api: auth
难度 2/5 1-3 小时 新手友好度 68/100
firebase/firebase-android-sdk#8505 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 15/100
firebase/firebase-android-sdk#8835 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
firebase/firebase-android-sdk#8832 ·
维护者通常 1 天内回复
查看 firebase/firebase-android-sdk 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
NationalSecurityAgency/ghidra#10220 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
维护者通常 1 天内回复
-
RIS export splits an organization name containing “and” into multiple authors可能已有人在做 @Gautam-aman 今天认领。 未关闭status: needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
FailureContext.java rounds down thresholds in lastedAtLeast()可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复