A Missing Maven Dependency in Firebase Auth Just Broke Kotlin Builds Worldwide
Any Android or Flutter team upgrading to Kotlin 2.4 and using Firebase Auth with SAM conversions will hit a hard build failure unless they pin explicit types or ensure `checker-qual` arrives transitively. The fix is trivial once diagnosed, but the root cause — a missing POM dependency in Google's own SDK — went unnoticed for years, which erodes trust in upstream release hygiene.
Firebase's `firebase-auth` AAR has shipped for years with class files that reference a Checker Framework annotation (`@UnknownInitialization`) while its POM never declared the `checker-qual` dependency. The gap was harmless until two triggers landed at once: FlutterFire rewrote `firebase_auth` from Java to Kotlin, introducing SAM lambdas that rely on type inference, and Kotlin 2.4 upgraded the missing-annotation scenario from a warning to a hard compilation error.
The result is a `Type annotation class … is inaccessible` error that hits any Kotlin project using `FirebaseAuth.IdTokenListener` or `AuthStateListener` with inferred parameter types under Kotlin 2.4, unless another dependency happens to pull in `checker-qual` transitively. FlutterFire's fix sidesteps the upstream gap entirely by adding explicit parameter types (`auth: FirebaseAuth`) so the compiler never needs to read the broken annotation path.
The episode exposes a brittle supply chain: a metadata defect in a Google SDK sat dormant for years, surfaced only when a downstream rewrite and a compiler upgrade combined. Former Flutter founder Eric also called out Firebase's architecture publicly, noting the irony of Google pushing R8 optimization on developers while its own SDK ships with unresolved compile dependencies.
A metadata defect in a widely used Google SDK remained dormant for years because no trigger exercised it — a reminder that supply-chain gaps often survive until a toolchain upgrade turns them into hard failures.
The fix chosen (explicit types) is cheaper and more robust than correcting the upstream POM, but it means every downstream consumer must independently discover and apply the same workaround unless Firebase fixes the AAR.
Kotlin's stricter type-annotation handling in 2.4 is a net improvement for correctness, yet it surfaces latent bugs that were previously invisible, shifting breakage risk onto library publishers who never felt pressure to fix their metadata.
The episode undercuts Google's messaging around build optimization: a first-party SDK shipped with an undeclared compile dependency, while the same organization urges developers to adopt R8 and shrink their own dependency graphs.