firebase-auth publishes @UnknownInitialization but does not declare checker-qual, breaking Kotlin consumers
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- build-system, mobile-dev
Hướng nghiên cứu
Kiểm tra classes.jar và POM của AAR firebase-auth-24.2.0 đã phát hành, sau đó truy vết khai báo dependency firebase-auth tạo ra metadata đó. Tái hiện lỗi suy luận Kotlin với lambda IdTokenListener đã được báo cáo và xác minh rằng một consumer build sạch thành công mà không cần workaround compileOnly checker-qual.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[READ] Step 1: Are you in the right place?
Yes — this is a defect in the published com.google.firebase:firebase-auth artifact metadata.
[REQUIRED] Step 2: Describe your environment
- Android Studio version: n/a (Gradle CLI)
- Firebase Component: Authentication (
com.google.firebase:firebase-auth:24.2.0, viafirebase-bom:34.18.0) - Component version: 24.2.0
- Kotlin: 2.4.10 · AGP: 9.4.0-rc01 · Gradle: 9.7.1 · JDK 21
[REQUIRED] Step 3: Describe the problem
firebase-auth publishes classes annotated with org.checkerframework.checker.initialization.qual.UnknownInitialization, but its POM does not declare org.checkerframework:checker-qual. Consumers therefore have no way to resolve that annotation, and any Kotlin code that compiles against the annotated API and lets a type be inferred fails to compile.
Confirmed by scanning the artifact contents — the annotation reference is inside firebase-auth itself, not a transitive dependency:
$ unzip -p firebase-auth-24.2.0.aar classes.jar | strings | grep UnknownInitialization
# present in 24.2.0 and 24.1.0
and it is absent from the published POM (all 17 declared dependencies checked; androidx.*, play-services-*, firebase-*, kotlin-stdlib — no checker-qual).
Nothing else on the compile classpath supplies it either. firebase-auth pulls only the com.google.guava:listenablefuture stub, not full Guava — and full Guava is what historically put checker-qual on the classpath transitively. That is presumably why this was latent: the annotation is present in 24.1.0 as well, so an unrelated dependency change is what removed the accidental path to it.
Steps to reproduce:
Compile Kotlin against FirebaseAuth.IdTokenListener with an inferred lambda parameter, with checker-qual absent from the classpath:
FirebaseAuth.IdTokenListener { auth -> // `auth` type inferred
// ...
}
Relevant Code / error:
Type annotation class 'org.checkerframework.checker.initialization.qual.UnknownInitialization'
of the inferred type is inaccessible. Check the module classpath for missing or conflicting dependencies.
This reproduces through the official Flutter plugin (firebase_auth 6.6.0), whose IdTokenChannelStreamHandler.kt:23 is exactly that shape — :firebase_auth:compileDebugKotlin fails outright.
Note javac tolerates this (the JLS says unresolvable annotations are ignored), so Java consumers do not notice; Kotlin needs the annotation to resolve the inferred type, so only Kotlin consumers break.
Workaround (in a consumer's build, for anyone finding this):
dependencies { compileOnly("org.checkerframework:checker-qual:3.49.5") }
Suggested fix: declare checker-qual in firebase-auth's POM so it lands on consumers' compile classpath, or strip the annotation from the published class files if it is not meant to be part of the public API surface.
- Ngôn ngữ chính
- Java
- Star
- 2.6k
- Fork
- 733
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 72
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của firebase/firebase-android-sdk
-
api: remoteconfig
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
firebase/firebase-android-sdk#8827 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Crashlytics plugin writes build ID lists in directory listing order, so APKs can differ between machinesCó thể đã có người làm @mrober đã nhận 8 ngày trước. Đang mởapi: crashlytics
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
firebase/firebase-android-sdk#8789 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
api: auth
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
firebase/firebase-android-sdk#8505 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
firebase/firebase-android-sdk#8835 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
firebase/firebase-android-sdk#8832 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của firebase/firebase-android-sdk
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
NationalSecurityAgency/ghidra#10220 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
RIS export splits an organization name containing “and” into multiple authorsCó thể đã có người làm @Gautam-aman đã nhận hôm nay. Đang mởstatus: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
JabRef/jabref#17821 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
FailureContext.java rounds down thresholds in lastedAtLeast()Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày