Skip to content

🐛 [firebase_analytics] missing google_app_id even with flutterfire configure on Android #9785

@absar

Description

@absar

Bug report

Describe the bug
After successfully configuring firebase using flutterfire configure, crashlytics works fine but Analytics is not working on Android and showing this log Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI there are many similar issues reported in this repo but all are closed mentioning to configure it with flutterfire configure however it's not working, even though firebase_options.dart file is generated with FirebaseOptions for Android.

  • We need some concrete info whether Analytics is supported on Android or not, as per the readme at this repo's root it is supported
  • If it is not supported using flutterfire configure what are the workarounds

Steps to reproduce

Steps to reproduce the behavior:

  1. Create any app and registered it as an android app in firebase
  2. Configure firebase using flutterfire configure
  3. It will generate firebase_options.dart file with FirebaseOptions for Android
  4. Run the app, it will show log Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI
Full log - Click To Expand
I/FirebaseApp(12345): Device unlocked: initializing all Firebase APIs for app [DEFAULT]
I/FirebaseCrashlytics(12345): Initializing Firebase Crashlytics 18.3.1 for com.abc.xyz
D/FirebaseCrashlytics(12345): Crashlytics automatic data collection ENABLED by API.
D/FirebaseCrashlytics(12345): AnalyticsConnector now available.
D/FirebaseCrashlytics(12345): Registered Firebase Analytics listener.
D/FirebaseCrashlytics(12345): Mapping file ID is: null
D/FirebaseCrashlytics(12345): Checking for cached settings...
D/FirebaseCrashlytics(12345): Loaded cached settings: {"settings_version":3,"cache_duration":86400,"features":{"collect_logged_exceptions":true,"collect_reports":true,"collect_analytics":false,"prompt_enabled":false,"push_enabled":false,"firebase_crashlytics_enabled":false,"collect_anrs":true,"collect_metric_kit":false},"app":{"status":"activated","update_required":false,"report_upload_variant":2,"native_report_upload_variant":2},"fabric":{"org_id":"THIS_IS_REPLACED","bundle_id":"com.abc.xyz"},"on_demand_upload_rate_per_minute":10,"on_demand_backoff_base":1.2,"on_demand_backoff_step_duration_seconds":60,"expires_at":1666710695025}
D/FirebaseCrashlytics(12345): Crashlytics automatic data collection ENABLED by API.
D/FirebaseCrashlytics(12345): Opening a new session with ID XXXXXXTHIS_IS_REPLACED
D/FirebaseCrashlytics(12345): Successfully configured exception handler.
D/FirebaseCrashlytics(12345): Registered Firebase Analytics event receiver for breadcrumbs
D/FirebaseCrashlytics(12345): Loaded userId THIS_IS_REPLACED for session THIS_IS_REPLACED
E/FA      (12345): Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI
E/FA      (12345): Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI

Expected behavior

Android app should be able to log Analytics

Sample project

Any Android project configured with flutterfire configure


Flutter doctor

Click To Expand
[√] Flutter (Channel stable, 3.3.5, on Microsoft Windows [Version 10.0.19044.2130], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0-rc1)
[√] Chrome - develop for the web
[√] Android Studio (version 2021.3)
[√] IntelliJ IDEA Ultimate Edition (version 2021.1)
[√] Connected device (3 available)
[√] HTTP Host Availability


Flutter dependencies

Click To Expand, adding only firebase related deps
- firebase_analytics 10.0.2 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter]
- firebase_core 2.1.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_crashlytics 3.0.2 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions