firebase-auth publishes @UnknownInitialization but does not declare checker-qual, breaking Kotlin consumers
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
調査の方向性
公開された firebase-auth-24.2.0 AAR の classes.jar と POM を調査し、そのメタデータを生成する firebase-auth 依存関係の宣言を追跡します。報告された IdTokenListener lambda で Kotlin の型推論失敗を再現し、compileOnly checker-qual workaround なしでクリーンな consumer build が成功することを確認します。
索引モデルが issue の本文から書いたものです。
説明
[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.
- 主要言語
- Java
- スター
- 2.6k
- フォーク
- 733
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 72
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
JabRef/jabref#17821 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
FailureContext.java rounds down thresholds in lastedAtLeast()対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信