firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.65k stars 3.96k forks source link

🐛 [Firebase_analytics] Android build has missing google_app_id after Flutter 3.0.0 upgrade #8767

Closed lloydrichards closed 2 years ago

lloydrichards commented 2 years ago

Bug report

Describe the bug I was really excited after Google IO to implement Flutter 3.0.0 and all the stable FlutterFire plugins but I have to say that these past two weeks have been a bit of a nightmare in confusing/out-of-date documentation and a complete lack of migration guides. My current problem/bug is that when I upgrade Firebase Analytics to just use FlutterFire I get a message during the Android build that it is missing the google_app_id and disables Analytics.

There is no clear guide on how to move from Flutter 2.10.0 / firebase_analytics: ^9.1.2 to Flutter 3.0.1 / firebase_analytics: ^9.1.8 so my first attempt was to remove parts of the Manual integration that were specified in the FutterFire docs before the update to official Firebase docs. I removed the google-service.json and the plugins for analytics, resulting in a dlopen failed: library "libflutter.so" not found error when building. After some StackOverflow I got the app building but now it would show E/FA ( 8840): Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI whenever a Analytic event would be normally sent.

I have since got it the work by re adding all the instruction from the Android getting started page link but as far as I'm reading the Flutter section, this is not the intended behaviour or DX ?

Steps to reproduce

Steps to reproduce the behavior:

  1. Working Flutter app with Firebase in v2.10.0
  2. Upgrade Flutter to 3.0.1
  3. Upgrade Firebase plugins to latest (firebase_analytics: ^9.1.8)
  4. Build Android app
  5. See dlopen failed: library "libflutter.so" not found
  6. Remove Android Manual setup for FlutterFire
  7. See E/FA ( 8840): Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI
  8. Re add Android setup for Firebase
  9. Works (?)

Expected behavior

When the official blog post says how things now have drastically reduced the number of steps it takes to get started, no longer requiring you to open any platform-specific IDEs , you feel a little cheated when you have to spend a whole day sorting this out with your dev team.


Additional context

E/FA ( 8840): Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI

Add any other context about the problem here.


Flutter doctor

flutter doctor ``` Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.0.1, on Microsoft Windows [Version 10.0.22000.675], locale en-US) [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.0.6) [√] Android Studio (version 2021.2) [√] VS Code (version 1.67.2) [√] Connected device (4 available) [√] HTTP Host Availability • No issues found! ```

Flutter dependencies

flutter pub deps -- --style=compact ``` Dart SDK 2.17.1 Flutter SDK 3.0.1 hive_manager 3.2.1+1 dependencies: - auto_route 4.0.1 [flutter path collection meta universal_html] - badges 2.0.2 [flutter] - cloud_firestore 3.1.16 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - dropdown_search 4.0.1 [flutter] - fake_cloud_firestore 1.2.2 [flutter cloud_firestore cloud_firestore_platform_interface collection plugin_platform_interface quiver rxdart] - firebase_analytics 9.1.8 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 3.3.18 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_auth_mocks 0.8.4 [flutter firebase_auth meta equatable] - firebase_core 1.17.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 2.8.0 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_dynamic_links 4.2.4 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_messaging 11.4.0 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_remote_config 2.0.7 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter] - firebase_storage 10.2.16 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine] - flutter_bloc 8.0.1 [flutter bloc provider] - flutter_cache_manager 3.3.0 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid] - flutter_facebook_auth 4.3.4 [flutter flutter_facebook_auth_platform_interface flutter_facebook_auth_web] - flutter_image_compress 1.1.0 [flutter] - flutter_local_notifications 9.5.3+1 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone] - flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math] - flutter_speed_dial 6.0.0 [flutter] - font_awesome_flutter 10.1.0 [flutter] - fpdart 0.0.14 - freezed_annotation 2.0.3 [collection json_annotation meta] - geocoding 2.0.4 [flutter geocoding_platform_interface] - geolocator 8.2.1 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows] - get_it 7.2.0 [async collection] - google_sign_in 5.3.2 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web] - google_sign_in_mocks 0.2.1 [flutter google_sign_in mockito] - image_picker 0.8.5+3 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_platform_interface] - injectable 1.5.3 [get_it] - json_annotation 4.5.0 [meta] - localizely_sdk 2.3.0 [intl http logger package_info path_provider petitparser shared_preferences uuid] - location 4.4.0 [flutter location_platform_interface location_web] - mapbox_gl 0.16.0 [flutter mapbox_gl_platform_interface mapbox_gl_web collection] - mapbox_search 3.0.1+2 [http] - mockito 5.2.0 [analyzer build code_builder collection dart_style matcher meta path source_gen test_api] - package_info_plus 1.4.2 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web] - path_provider 2.0.10 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows] - permission_handler 9.2.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface] - rxdart 0.27.3 - sign_in_with_apple 4.0.0 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web] - touchable 1.0.2 [flutter] - url_launcher 6.1.2 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows] - uuid 3.0.6 [crypto] - weather 2.0.1 [flutter http] dev dependencies: - auto_route_generator 4.0.0 [build source_gen analyzer path build_runner code_builder dart_style auto_route] - bloc_test 9.0.3 [bloc diff_match_patch meta mocktail test] - build_runner 2.1.11 [args async analyzer build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style frontend_server_client glob graphs http_multi_server io js logging meta mime package_config path pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml] - flutter_launcher_icons 0.9.2 [args image path yaml] - flutter_lints 2.0.1 [lints] - flutter_spinkit 5.1.0 [flutter] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph] - freezed 2.0.3+1 [analyzer build build_config collection meta source_gen freezed_annotation json_annotation] - injectable_generator 1.5.3 [build source_gen path glob analyzer code_builder dart_style injectable collection] - integration_test 0.0.0 [flutter flutter_driver flutter_test path vm_service archive async boolean_selector characters charcode clock collection crypto fake_async file matcher material_color_utilities meta source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math webdriver] - json_serializable 6.2.0 [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper] - network_image_mock 2.1.0 [flutter mockito] transitive dependencies: - _fe_analyzer_shared 38.0.0 [meta] - analyzer 3.4.1 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 3.1.11 [crypto path] - args 2.3.1 - async 2.8.2 [collection meta] - bloc 8.0.3 [meta] - boolean_selector 2.1.0 [source_span string_scanner] - build 2.3.0 [analyzer async convert crypto glob logging meta path] - build_config 1.0.0 [checked_yaml json_annotation path pubspec_parse yaml] - build_daemon 3.1.0 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 2.0.8 [analyzer async build crypto graphs logging path package_config pool pub_semver stream_transform yaml] - build_runner_core 7.2.3 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta path package_config pool timing watcher yaml] - built_collection 5.1.1 - built_value 8.3.2 [built_collection collection fixnum meta] - characters 1.2.0 - charcode 1.3.1 - checked_yaml 2.0.1 [json_annotation source_span yaml] - clock 1.1.0 - cloud_firestore_platform_interface 5.5.6 [collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 2.6.15 [cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - code_builder 4.1.0 [built_collection built_value collection matcher meta] - collection 1.16.0 - convert 3.0.1 [typed_data] - coverage 1.2.0 [args logging package_config path source_maps stack_trace vm_service] - cross_file 0.3.3 [js meta] - crypto 3.0.1 [collection typed_data] - csslib 0.17.1 [source_span] - dart_style 2.2.3 [analyzer args path pub_semver source_span] - dbus 0.7.3 [args ffi meta xml] - diff_match_patch 0.4.1 - equatable 2.0.3 [collection meta] - fake_async 1.3.0 [clock collection] - ffi 1.2.1 - file 6.1.2 [meta path] - firebase_analytics_platform_interface 3.1.6 [firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.4.0+13 [firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 6.2.6 [firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 3.3.15 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.4.0 [collection flutter meta plugin_platform_interface] - firebase_core_web 1.6.4 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_crashlytics_platform_interface 3.2.6 [collection firebase_core flutter meta plugin_platform_interface] - firebase_dynamic_links_platform_interface 0.2.3+2 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 3.5.0 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 2.4.0 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - firebase_remote_config_platform_interface 1.1.6 [firebase_core flutter meta plugin_platform_interface] - firebase_remote_config_web 1.0.12 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins js] - firebase_storage_platform_interface 4.1.6 [collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 3.2.15 [async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta] - fixnum 1.0.1 - flutter_driver 0.0.0 [file flutter flutter_test fuchsia_remote_debug_protocol path meta vm_service webdriver archive async boolean_selector characters charcode clock collection crypto matcher material_color_utilities platform process source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math] - flutter_facebook_auth_platform_interface 3.1.2 [flutter plugin_platform_interface] - flutter_facebook_auth_web 3.1.2 [flutter flutter_web_plugins js flutter_facebook_auth_platform_interface] - flutter_local_notifications_linux 0.4.2 [flutter flutter_local_notifications_platform_interface dbus path xdg_directories] - flutter_local_notifications_platform_interface 5.0.0 [flutter plugin_platform_interface] - flutter_plugin_android_lifecycle 2.0.6 [flutter] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - frontend_server_client 2.1.3 [async path] - fuchsia_remote_debug_protocol 0.0.0 [process vm_service file meta path platform] - geocoding_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - geolocator_android 3.1.8 [flutter geolocator_platform_interface] - geolocator_apple 2.1.4 [flutter geolocator_platform_interface] - geolocator_platform_interface 4.0.5 [flutter plugin_platform_interface vector_math meta] - geolocator_web 2.1.5 [flutter flutter_web_plugins geolocator_platform_interface] - geolocator_windows 0.1.1 [flutter geolocator_platform_interface] - glob 2.0.2 [async collection file path string_scanner] - google_sign_in_android 5.2.8 [flutter google_sign_in_platform_interface] - google_sign_in_ios 5.3.1 [flutter google_sign_in_platform_interface] - google_sign_in_platform_interface 2.1.3 [flutter quiver] - google_sign_in_web 0.10.1+2 [flutter flutter_web_plugins google_sign_in_platform_interface js] - graphs 2.1.0 [collection] - html 0.15.0 [csslib source_span] - http 0.13.4 [async http_parser meta path] - http_multi_server 3.2.0 [async] - http_parser 4.0.1 [collection source_span string_scanner typed_data] - image 3.1.3 [archive meta xml] - image_picker_android 0.8.4+13 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - image_picker_for_web 2.1.8 [flutter flutter_web_plugins image_picker_platform_interface] - image_picker_ios 0.8.5+5 [flutter image_picker_platform_interface] - image_picker_platform_interface 2.5.0 [cross_file flutter http plugin_platform_interface] - intl 0.17.0 [clock path] - io 1.0.3 [meta path string_scanner] - js 0.6.4 - lints 2.0.0 - location_platform_interface 2.3.0 [flutter meta plugin_platform_interface] - location_web 3.1.1 [flutter flutter_web_plugins http_parser js location_platform_interface meta] - logger 1.1.0 - logging 1.0.2 - mapbox_gl_dart 0.2.1 [js] - mapbox_gl_platform_interface 0.16.0 [flutter meta] - mapbox_gl_web 0.16.0 [flutter flutter_web_plugins meta mapbox_gl_platform_interface mapbox_gl_dart image] - matcher 0.12.11 [stack_trace] - material_color_utilities 0.1.4 - meta 1.7.0 - mime 1.0.2 - mocktail 0.3.0 [collection matcher test] - nested 1.0.0 [flutter] - node_preamble 2.0.1 - package_config 2.0.2 [path] - package_info 2.0.2 [flutter] - package_info_plus_linux 1.0.5 [package_info_plus_platform_interface flutter path] - package_info_plus_macos 1.3.0 [flutter] - package_info_plus_platform_interface 1.0.2 [flutter meta plugin_platform_interface] - package_info_plus_web 1.0.5 [flutter flutter_web_plugins http meta package_info_plus_platform_interface] - package_info_plus_windows 1.0.5 [package_info_plus_platform_interface ffi flutter win32] - path 1.8.1 - path_provider_android 2.0.14 [flutter path_provider_platform_interface] - path_provider_ios 2.0.9 [flutter path_provider_platform_interface] - path_provider_linux 2.1.6 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_macos 2.0.6 [flutter path_provider_platform_interface] - path_provider_platform_interface 2.0.4 [flutter platform plugin_platform_interface] - path_provider_windows 2.0.6 [ffi flutter path path_provider_platform_interface win32] - pedantic 1.11.1 - permission_handler_android 9.0.2+1 [flutter permission_handler_platform_interface] - permission_handler_apple 9.0.4 [flutter permission_handler_platform_interface] - permission_handler_platform_interface 3.7.0 [flutter meta plugin_platform_interface] - permission_handler_windows 0.1.0 [flutter permission_handler_platform_interface] - petitparser 4.4.0 [meta] - platform 3.1.0 - plugin_platform_interface 2.1.2 [meta] - pool 1.5.0 [async stack_trace] - process 4.2.4 [file path platform] - provider 6.0.3 [collection flutter nested] - pub_semver 2.1.1 [collection meta] - pubspec_parse 1.2.0 [checked_yaml collection json_annotation pub_semver yaml] - quiver 3.1.0 [matcher] - shared_preferences 2.0.15 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - shared_preferences_android 2.0.12 [flutter shared_preferences_platform_interface] - shared_preferences_ios 2.1.1 [flutter shared_preferences_platform_interface] - shared_preferences_linux 2.1.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface] - shared_preferences_macos 2.0.4 [flutter shared_preferences_platform_interface] - shared_preferences_platform_interface 2.0.0 [flutter] - shared_preferences_web 2.0.4 [flutter flutter_web_plugins shared_preferences_platform_interface] - shared_preferences_windows 2.1.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - shelf 1.3.0 [async collection http_parser path stack_trace stream_channel] - shelf_packages_handler 3.0.0 [path shelf shelf_static] - shelf_static 1.1.0 [convert http_parser mime path shelf] - shelf_web_socket 1.0.1 [shelf stream_channel web_socket_channel] - sign_in_with_apple_platform_interface 1.0.0 [flutter plugin_platform_interface meta] - sign_in_with_apple_web 1.0.1 [flutter flutter_web_plugins sign_in_with_apple_platform_interface js] - sky_engine 0.0.99 - source_gen 1.2.2 [analyzer async build dart_style glob meta path source_span yaml] - source_helper 1.3.2 [analyzer collection source_gen] - source_map_stack_trace 2.1.0 [path stack_trace source_maps] - source_maps 0.10.10 [source_span] - source_span 1.8.2 [collection path term_glyph] - sqflite 2.0.2+1 [flutter sqflite_common path] - sqflite_common 2.2.1+1 [synchronized path meta] - stack_trace 1.10.0 [path] - stream_channel 2.1.0 [async] - stream_transform 2.0.0 - string_scanner 1.1.0 [charcode source_span] - sync_http 0.3.0 - synchronized 3.0.0+2 - term_glyph 1.2.0 - test 1.21.1 [analyzer async boolean_selector collection coverage http_multi_server io js node_preamble package_config path pool shelf shelf_packages_handler shelf_static shelf_web_socket source_span stack_trace stream_channel typed_data web_socket_channel webkit_inspection_protocol yaml test_api test_core] - test_api 0.4.9 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - test_core 0.4.13 [analyzer async args boolean_selector collection coverage frontend_server_client glob io meta package_config path pool source_map_stack_trace source_maps source_span stack_trace stream_channel vm_service yaml matcher test_api] - timezone 0.8.0 [path] - timing 1.0.0 [json_annotation] - typed_data 1.3.0 [collection] - universal_html 2.0.8 [async csslib charcode collection html meta source_span typed_data universal_io] - universal_io 2.0.4 [collection crypto meta typed_data] - url_launcher_android 6.0.17 [flutter url_launcher_platform_interface] - url_launcher_ios 6.0.17 [flutter url_launcher_platform_interface] - url_launcher_linux 3.0.1 [flutter url_launcher_platform_interface] - url_launcher_macos 3.0.1 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.0.5 [flutter plugin_platform_interface] - url_launcher_web 2.0.11 [flutter flutter_web_plugins url_launcher_platform_interface] - url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface] - vector_math 2.1.2 - vm_service 8.2.2 - watcher 1.0.1 [async path] - web_socket_channel 2.2.0 [async crypto stream_channel] - webdriver 3.0.0 [archive matcher path stack_trace sync_http] - webkit_inspection_protocol 1.1.0 [logging] - win32 2.6.1 [ffi] - xdg_directories 0.2.0+1 [meta path process] - xml 5.3.1 [collection meta petitparser] - yaml 3.1.1 [collection source_span string_scanner] ```

darshankawar commented 2 years ago

Thanks for the report @lloydrichards.

Considering the error you are getting Missing google_app_id. Firebase Analytics disabled., this probably indicates the dart-initialization may not yet support firebase_analytics for Android because there have been similar reports like below:

https://github.com/firebase/flutterfire/issues/8098 https://github.com/firebase/flutterfire/issues/7972 https://github.com/firebase/flutterfire/issues/7866 https://github.com/firebase/flutterfire/issues/7639

https://github.com/firebase/flutterfire/pull/8167/files

So I am guessing you are probably hitting https://github.com/firebase/flutterfire/issues/8098

Let us know if above links helps. If not, we can make this a documentation issue for below scenario you mentioned:

There is no clear guide on how to move from Flutter 2.10.0 / firebase_analytics: ^9.1.2 to Flutter 3.0.1 / firebase_analytics: ^9.1.8 so my first attempt was to remove parts of the Manual integration that were specified in the FutterFire docs before the update to official Firebase docs. I removed the google-service.json and the plugins for analytics, resulting in a dlopen failed: library "libflutter.so" not found error when building. After some StackOverflow I got the app building but now it would show E/FA ( 8840): Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI whenever a Analytic event would be normally sent.

lloydrichards commented 2 years ago

From looking at all the other reports, it seems like it's just the same issue as before with no changes. I understand that analytics was marked with a ? before to indicate it not being fully supported on Android, but last I saw the plugin table it looked like everything had a tick on it.

If nothing has changed since before Google IO then it must be a documentation/marketing issue as I was very much convinced after everything i read and saw at IO that stable releases for flutter fire meant that something had been updated.

Maybe there's a good place to let Google/Flutter know that there are some mixed messages?

On Wed, 25 May 2022, 12:38 darshankawar, @.***> wrote:

Thanks for the report @lloydrichards https://github.com/lloydrichards.

Considering the error you are getting Missing google_app_id. Firebase Analytics disabled., this probably indicates the dart-initialization may not yet support firebase_analytics for Android because there have been similar reports like below:

8098 https://github.com/firebase/flutterfire/issues/8098

7972 https://github.com/firebase/flutterfire/issues/7972

7866 https://github.com/firebase/flutterfire/issues/7866

7639 https://github.com/firebase/flutterfire/issues/7639

https://github.com/firebase/flutterfire/pull/8167/files

So I am guessing you are probably hitting #8098 https://github.com/firebase/flutterfire/issues/8098

Let us know if above links helps. If not, we can make this a documentation issue for below scenario you mentioned:

There is no clear guide on how to move from Flutter 2.10.0 / firebase_analytics: ^9.1.2 to Flutter 3.0.1 / firebase_analytics: ^9.1.8 so my first attempt was to remove parts of the Manual integration that were specified in the FutterFire docs before the update to official Firebase docs. I removed the google-service.json and the plugins for analytics, resulting in a dlopen failed: library "libflutter.so" not found error when building. After some StackOverflow I got the app building but now it would show E/FA ( 8840): Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI whenever a Analytic event would be normally sent.

— Reply to this email directly, view it on GitHub https://github.com/firebase/flutterfire/issues/8767#issuecomment-1137082141, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOHWIQNMPTP6PPADNQ4JDCLVLX7LXANCNFSM5WZKZTNA . You are receiving this because you were mentioned.Message ID: @.***>

cmoiccool commented 2 years ago

The only way i have been able to make analytics work for now and stop receiving the Missing google_app_id error message was to manually add the appId value from the static const FirebaseOptions android value found in the lib/firebase_options.dart file in a google_app_id string in a string resource file in android/app/src/main/res/values/string.xml. The string resource looks this: <string name="google_app_id">1:12345:android:abc123</string>

Is there a better workaround for this issue?

cmoiccool commented 2 years ago

In fact it turned out to not be a viable workaround, adding the string value made me start receiving events in the Firebase Analytics DebugView but the app became irresponsive not being able to show the home screen... I had to remove the strings.xml file to be able to start the app again normally, but of course i stopped receiving the events.

stsc3000 commented 2 years ago

Same here, it appears like the new docs fail to mention the fact that analytics does not yet support dart-only initialization.

Purus commented 2 years ago

If dart-only initialization does not work, what is the other way to make it work? any help on this would be appreciated. Thanks in advance.

russellwheatley commented 2 years ago

Hi @lloydrichards, we no longer recommend removing the google-services.json file. When you run flutterfire configure, it will write the service file to your android/app directory.

I am sorry that the documentation wasn't clear, we did migrate from the archived documentation to the firebase.google domain and we made a clean break from the "manual installation" distinction. All you need to do now is run flutterfire configure and the service files for iOS, macOS & android will be written for you.

The problem with dart only initialization is that it was causing some issues with some plugins. As we don't have control over the native Firebase SDKs and their use of the service files, we felt it was safer to write the files to ensure the plugins behaved as intended. Hope this helps.

TL;DR run flutterfire configure.