[GH-ISSUE #6901] Crash on launch in 2026.4.1 (F-Droid flavor): NPE in CardTextAnalyzerImpl.<init> due to ML Kit registrars failing to instantiate (NoSuchMethodException on no-arg constructors) #109421

Closed
opened 2026-06-06 04:28:40 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @atharen on GitHub (May 10, 2026).
Original GitHub issue: https://github.com/bitwarden/android/issues/6901

Steps To Reproduce

Had the app fail to launch. Just plugged in the log into Claude, and told it to find me a bug report.
Did read it, but not familiar with the codebase to verify with the investigation.
But environment facts are accurate.

Note: between filing this and now, 2026.4.1 fdroid variant appears to have been removed from GitHub Releases (current Latest is 2026.4.0-bwpm for com.x8bit.bitwarden-fdroid.apk). I'm filing this anyway because the specific crash signature here — NPE in CardTextAnalyzerImpl. rooted in ComponentDiscovery failing to instantiate ML Kit registrars — does not appear documented separately, and is likely to re-appear in a re-released 2026.4.x unless the upstream R8 keep-rule issue is addressed alongside any fix to the NPE itself.

Steps To Reproduce

  1. Install Bitwarden Password Manager 2026.4.1 (21464) F-Droid flavor — APK com.x8bit.bitwarden-fdroid.apk from the v2026.4.1-bwpm GitHub release. (Installed via Obtainium in my case.)
  2. Open the app from the launcher.
  3. Splash screen appears for ~80 ms; the app dies before reaching the unlock/login screen.
  4. Android relaunches the activity; it crashes again with the same exception. The app is in a perma‑crash loop and is unusable.

This happens on a fresh launch — no user input is required, the user does not even reach the master password prompt. Reproduced consistently across multiple cold starts; clearing app data and reinstalling does not resolve it.

Likely root cause

The crash chain is rooted at app startup, not when the card scanner is opened. Earlier in the same logcat (during handleBindApplication, well before the NPE), Firebase's ComponentDiscovery reports three back‑to‑back InvalidRegistrarExceptions while MlKitInitProvider.attachInfo is running:

W ComponentDiscovery: Could not instantiate com.google.mlkit.common.internal.CommonComponentRegistrar
    Caused by: java.lang.NoSuchMethodException: com.google.mlkit.common.internal.CommonComponentRegistrar.<init> []

W ComponentDiscovery: Could not instantiate com.google.mlkit.vision.text.internal.TextRegistrar
    Caused by: java.lang.NoSuchMethodException: com.google.mlkit.vision.text.internal.TextRegistrar.<init> []

W ComponentDiscovery: Could not instantiate com.google.mlkit.vision.common.internal.VisionCommonRegistrar
    Caused by: java.lang.NoSuchMethodException: com.google.mlkit.vision.common.internal.VisionCommonRegistrar.<init> []

These are only logged at WARN level, so the app continues — but ML Kit's runtime is now in a half-initialized state. When Compose later composes the root nav graph, CardDataParser is constructed without its TextRecognizer dependency wired up, then handed to CardTextAnalyzerImpl, whose constructor immediately dereferences that null field → fatal NPE → process killed → app relaunch → repeat.

These three classes are part of bundled ML Kit (com.google.mlkit:text-recognition and friends), shipped inside the APK rather than coming from Play Services. The classes themselves are present in the APK (otherwise this would be ClassNotFoundException, not NoSuchMethodException) — only their no-arg constructors are missing. That signature points directly at R8/ProGuard stripping the constructors of these registrar classes in the release build. ML Kit ships consumer ProGuard rules in its AAR that should preserve them via reflection, so something in the 2026.4.1 R8 configuration is either dropping or overriding those rules.

This is almost certainly tied to PR #6720 / PM-34125 ("Add card text analysis pipeline"), which is the changelog entry for 2026.4.1 that introduced both CardTextAnalyzerImpl and the new ML Kit text-recognition dependency.

Because the F-Droid flavor is built with a different dependency/rule set from the Play Store flavor (no Firebase Messaging, etc.), it is plausible this is specific to the F-Droid build variant and that Play Store users do not hit it — that would also explain the apparent absence of duplicate reports. Worth diffing proguard-rules*.pro and the consumerProguardFiles chain between flavors for 2026.4.1, and confirming with a Play-Store-flavor smoke test of a clean launch.

A second observation, separate from the root cause: the failure surfaces during Compose composition of the root nav graph (u05.invoke line 1388 in the obfuscated code) rather than only when the card-scanner destination is navigated to. It looks like CardTextAnalyzerImpl is being constructed eagerly somewhere in the graph wiring, so a defense-in-depth fix in the app code — even if the ML Kit init issue is fixed elsewhere — would be to make the analyzer construction lazy / scoped to the card-scanner screen, so a misconfigured ML Kit pipeline can never take down the whole app on launch again.

This crash is distinct from the avatar-color crash in #6800 (which was a NumberFormatException in hexToColor on the top app bar) — different exception, different code path, different feature. I checked open issues and could not find this CardTextAnalyzerImpl crash filed separately, hence this report.

Expected Result

The unlock / login screen is displayed.

Actual Result

The app crashes during initial Compose composition (AndroidComposeView.onAttachedToWindowsetOnViewTreeOwnersAvailable) with:

java.lang.NullPointerException: Attempt to read from field 'fjc gic.a' on a null object reference
in method 'void com.bitwarden.ui.platform.feature.cardscanner.util.CardTextAnalyzerImpl.<init>
(com.bitwarden.ui.platform.feature.cardscanner.util.CardDataParser)'
    at com.bitwarden.ui.platform.feature.cardscanner.util.CardTextAnalyzerImpl.<init>(...:31)
    at l95.a(...:30)
    at u05.invoke(...:1388)                       <-- root nav graph composable
    ...
    at pl.onAttachedToWindow(...:389)
    at android.view.View.dispatchAttachedToWindow(View.java:23294)

(Full stack trace in the attached logcat.)

Screenshots or Videos

Logcat attached. App never renders any UI before the crash, so no screenshot is meaningful.

Bitwarden log sanitized.txt

Additional Context

  • Reproduces on every cold launch; clearing app data and reinstalling does not resolve it.
  • Downgrading to 2026.4.0 (F-Droid flavor, which predates PM-34125) avoids the crash entirely.
  • F-Droid flavor does not include Firebase Cloud Messaging, but MlKitInitProvider is still installed by bundled ML Kit and runs at process start.

Build Version

2026.4.1 (21464) — F-Droid flavor APK (com.x8bit.bitwarden-fdroid.apk) from the v2026.4.1-bwpm GitHub release, installed via Obtainium. APK certificate SHA-256: DE6EC91431557995297BF3E65BC80349BC603A04708160618C86BC9994171C90 (matches the official Bitwarden F-Droid signing certificate).

What server are you connecting to?

US

Self-host Server Version

N/A

Environment Details

  • Device: Google Pixel 9 Pro XL (codename komodo), arm64-v8a
  • OS: GrapheneOS, Android 16 base — build fingerprint google/komodo/komodo:16/BP4A.260205.002/2026050701:user/release-keys, security patch 2026-05-07
  • Google Play Services: sandboxed GMS via GrapheneOS GmsCompatLib. (Noting this for completeness, but I do not believe it is the cause: the registrars failing are part of bundled ML Kit shipped inside the Bitwarden APK, not Play Services components, and the NoSuchMethodException symptom is a build-time minification issue, not a runtime/GMS one.)
  • Install type: Sideload via Obtainium (GitHub releases, F-Droid flavor)
  • Profile: Android secondary user (full.secondary)

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
Originally created by @atharen on GitHub (May 10, 2026). Original GitHub issue: https://github.com/bitwarden/android/issues/6901 ### Steps To Reproduce Had the app fail to launch. Just plugged in the log into Claude, and told it to find me a bug report. Did read it, but not familiar with the codebase to verify with the investigation. But environment facts are accurate. Note: between filing this and now, 2026.4.1 fdroid variant appears to have been removed from GitHub Releases (current Latest is 2026.4.0-bwpm for com.x8bit.bitwarden-fdroid.apk). I'm filing this anyway because the specific crash signature here — NPE in CardTextAnalyzerImpl.<init> rooted in ComponentDiscovery failing to instantiate ML Kit registrars — does not appear documented separately, and is likely to re-appear in a re-released 2026.4.x unless the upstream R8 keep-rule issue is addressed alongside any fix to the NPE itself. ### Steps To Reproduce 1. Install Bitwarden Password Manager **2026.4.1 (21464)** F-Droid flavor — APK `com.x8bit.bitwarden-fdroid.apk` from the `v2026.4.1-bwpm` GitHub release. (Installed via Obtainium in my case.) 2. Open the app from the launcher. 3. Splash screen appears for ~80 ms; the app dies before reaching the unlock/login screen. 4. Android relaunches the activity; it crashes again with the same exception. The app is in a perma‑crash loop and is unusable. This happens on a fresh launch — no user input is required, the user does not even reach the master password prompt. Reproduced consistently across multiple cold starts; clearing app data and reinstalling does not resolve it. ### Likely root cause The crash chain is rooted at **app startup**, not when the card scanner is opened. Earlier in the same logcat (during `handleBindApplication`, *well before* the NPE), Firebase's `ComponentDiscovery` reports three back‑to‑back `InvalidRegistrarException`s while `MlKitInitProvider.attachInfo` is running: ``` W ComponentDiscovery: Could not instantiate com.google.mlkit.common.internal.CommonComponentRegistrar Caused by: java.lang.NoSuchMethodException: com.google.mlkit.common.internal.CommonComponentRegistrar.<init> [] W ComponentDiscovery: Could not instantiate com.google.mlkit.vision.text.internal.TextRegistrar Caused by: java.lang.NoSuchMethodException: com.google.mlkit.vision.text.internal.TextRegistrar.<init> [] W ComponentDiscovery: Could not instantiate com.google.mlkit.vision.common.internal.VisionCommonRegistrar Caused by: java.lang.NoSuchMethodException: com.google.mlkit.vision.common.internal.VisionCommonRegistrar.<init> [] ``` These are only logged at WARN level, so the app continues — but ML Kit's runtime is now in a half-initialized state. When Compose later composes the root nav graph, `CardDataParser` is constructed without its `TextRecognizer` dependency wired up, then handed to `CardTextAnalyzerImpl`, whose constructor immediately dereferences that null field → fatal NPE → process killed → app relaunch → repeat. These three classes are part of **bundled ML Kit** (`com.google.mlkit:text-recognition` and friends), shipped *inside* the APK rather than coming from Play Services. The classes themselves are present in the APK (otherwise this would be `ClassNotFoundException`, not `NoSuchMethodException`) — only their no-arg constructors are missing. That signature points directly at **R8/ProGuard stripping the constructors of these registrar classes in the release build**. ML Kit ships consumer ProGuard rules in its AAR that should preserve them via reflection, so something in the 2026.4.1 R8 configuration is either dropping or overriding those rules. This is almost certainly tied to **PR #6720 / PM-34125 ("Add card text analysis pipeline")**, which is the changelog entry for 2026.4.1 that introduced both `CardTextAnalyzerImpl` and the new ML Kit text-recognition dependency. Because the F-Droid flavor is built with a different dependency/rule set from the Play Store flavor (no Firebase Messaging, etc.), it is plausible this is **specific to the F-Droid build variant** and that Play Store users do not hit it — that would also explain the apparent absence of duplicate reports. Worth diffing `proguard-rules*.pro` and the `consumerProguardFiles` chain between flavors for 2026.4.1, and confirming with a Play-Store-flavor smoke test of a clean launch. A second observation, separate from the root cause: the failure surfaces during Compose composition of the *root* nav graph (`u05.invoke` line 1388 in the obfuscated code) rather than only when the card-scanner destination is navigated to. It looks like `CardTextAnalyzerImpl` is being constructed eagerly somewhere in the graph wiring, so a defense-in-depth fix in the app code — even if the ML Kit init issue is fixed elsewhere — would be to make the analyzer construction lazy / scoped to the card-scanner screen, so a misconfigured ML Kit pipeline can never take down the whole app on launch again. This crash is **distinct from the avatar-color crash in #6800** (which was a `NumberFormatException` in `hexToColor` on the top app bar) — different exception, different code path, different feature. I checked open issues and could not find this `CardTextAnalyzerImpl` crash filed separately, hence this report. ### Expected Result The unlock / login screen is displayed. ### Actual Result The app crashes during initial Compose composition (`AndroidComposeView.onAttachedToWindow` → `setOnViewTreeOwnersAvailable`) with: ``` java.lang.NullPointerException: Attempt to read from field 'fjc gic.a' on a null object reference in method 'void com.bitwarden.ui.platform.feature.cardscanner.util.CardTextAnalyzerImpl.<init> (com.bitwarden.ui.platform.feature.cardscanner.util.CardDataParser)' at com.bitwarden.ui.platform.feature.cardscanner.util.CardTextAnalyzerImpl.<init>(...:31) at l95.a(...:30) at u05.invoke(...:1388) <-- root nav graph composable ... at pl.onAttachedToWindow(...:389) at android.view.View.dispatchAttachedToWindow(View.java:23294) ``` (Full stack trace in the attached logcat.) ### Screenshots or Videos _Logcat attached. App never renders any UI before the crash, so no screenshot is meaningful._ [Bitwarden log sanitized.txt](https://github.com/user-attachments/files/27570490/Bitwarden.log.sanitized.txt) ### Additional Context - Reproduces on every cold launch; clearing app data and reinstalling does not resolve it. - Downgrading to 2026.4.0 (F-Droid flavor, which predates PM-34125) avoids the crash entirely. - F-Droid flavor does not include Firebase Cloud Messaging, but `MlKitInitProvider` is still installed by bundled ML Kit and runs at process start. ### Build Version **2026.4.1 (21464)** — F-Droid flavor APK (`com.x8bit.bitwarden-fdroid.apk`) from the `v2026.4.1-bwpm` GitHub release, installed via Obtainium. APK certificate SHA-256: `DE6EC91431557995297BF3E65BC80349BC603A04708160618C86BC9994171C90` (matches the official Bitwarden F-Droid signing certificate). ### What server are you connecting to? US ### Self-host Server Version N/A ### Environment Details - **Device:** Google Pixel 9 Pro XL (codename `komodo`), arm64-v8a - **OS:** GrapheneOS, Android 16 base — build fingerprint `google/komodo/komodo:16/BP4A.260205.002/2026050701:user/release-keys`, security patch 2026-05-07 - **Google Play Services:** sandboxed GMS via GrapheneOS `GmsCompatLib`. (Noting this for completeness, but I do not believe it is the cause: the registrars failing are part of *bundled* ML Kit shipped inside the Bitwarden APK, not Play Services components, and the `NoSuchMethodException` symptom is a build-time minification issue, not a runtime/GMS one.) - **Install type:** Sideload via Obtainium (GitHub releases, F-Droid flavor) - **Profile:** Android secondary user (full.secondary) ### Issue Tracking Info - [x] I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
GiteaMirror added the app:password-managerbug labels 2026-06-06 04:28:40 -05:00
Author
Owner

@bitwarden-bot commented on GitHub (May 10, 2026):

Thank you for your report! We've added this to our internal board for review.
ID: PM-36986

<!-- gh-comment-id:4415802101 --> @bitwarden-bot commented on GitHub (May 10, 2026): Thank you for your report! We've added this to our internal board for review. ID: [PM-36986](https://bitwarden.atlassian.net/browse/PM-36986) [PM-36986]: https://bitwarden.atlassian.net/browse/PM-36986?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Author
Owner
<!-- gh-comment-id:4415841350 --> @pamperer562580892423 commented on GitHub (May 10, 2026): Another user here. See: - https://github.com/bitwarden/android/issues/6884 - response from a BW employee: https://github.com/bitwarden/android/issues/6884#issuecomment-4408002645 - fix: https://github.com/bitwarden/android/pull/6888 and https://github.com/bitwarden/android/pull/6890
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#109421