Skip to content

🐛 [firebase_remote_config] Invalid Envelope on trying to fetch config from Android #6993

@zmeggyesi

Description

@zmeggyesi

Bug report

Describe the bug
When trying to fetch remote configuration items from Firebase with signatures added, a FormatException: Invalid envelope is thrown instead

Steps to reproduce

Steps to reproduce the behavior:

  1. Create working app that uses Firebase Remote Config with defaults
  2. Move to new development machine
  3. Add new debug certificate fingerprints in Firebase Console
  4. Attempt to run in debug mode
  5. See error or incorrect behavior

Expected behavior

I expect the fetchAndActivate to run without errors, now that the Firebase app is updated with the new signing certificate fingerprints.

Sample project

Providing a minimal example project which demonstrates the bug in isolation from your main App greatly enhances the chance of a timely fix.
Please link to the public repository URL.


Additional context

Add any other context about the problem here.


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19043.1202], locale hu-HU)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[!] Android Studio (not installed)
[√] IntelliJ IDEA Community Edition (version 2021.2)
[√] VS Code (version 1.60.0)
[√] Connected device (3 available)

! Doctor found issues in 1 category.

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand
Changing current working directory to: D:\Projects\dso\frontend
Dart SDK 2.13.4
Flutter SDK 2.2.3
site_overwatch 2.7.1+226

dependencies:
- cached_network_image 3.0.0 [flutter flutter_cache_manager octo_image]
- connectivity_plus 1.0.3 [flutter meta connectivity_plus_platform_interface connectivity_plus_linux connectivity_plus_macos connectivity_plus_web connectivity_plus_windows]
- cupertino_icons 1.0.3
- device_info_plus 2.0.1 [flutter device_info_plus_platform_interface device_info_plus_linux device_info_plus_macos device_info_plus_web device_info_plus_windows]
- equatable 2.0.3 [collection meta]
- file_picker 3.0.2+2 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface]
- firebase_analytics 8.3.1 [firebase_analytics_platform_interface firebase_analytics_web firebase_core flutter meta]
- firebase_auth 3.1.0 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 1.6.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_crashlytics 2.2.1 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- firebase_remote_config 0.10.0+5 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface flutter]
- firebase_storage 10.0.3 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter]
- fixnum 1.0.0
- flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
- flutter_app_badger 1.2.0 [flutter]
- flutter_facebook_login 3.0.0 [flutter collection]
- flutter_local_notifications 6.0.0 [flutter flutter_local_notifications_platform_interface platform timezone]
- flutter_localizations 0.0.0 [flutter intl characters clock collection meta path typed_data vector_math]
- flutter_rating_bar 4.0.0 [flutter]
- font_awesome_flutter 9.1.0 [flutter]
- geocoding 2.0.1 [flutter geocoding_platform_interface]
- geolocator 7.1.0 [flutter geolocator_platform_interface geolocator_web]
- google_maps_flutter 2.0.6 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface]
- google_mobile_ads 0.13.0 [meta flutter]
- google_sign_in 5.0.4 [google_sign_in_platform_interface google_sign_in_web flutter meta]
- http 0.13.3 [async http_parser meta path pedantic]
- in_app_purchase 1.0.5 [flutter in_app_purchase_platform_interface in_app_purchase_android in_app_purchase_ios]
- incrementally_loading_listview 1.0.0 [flutter rxdart]
- intl 0.17.0 [clock path]
- intl_phone_field 2.0.0 [flutter]
- intl_phone_number_input 0.7.0+2 [flutter meta libphonenumber_plugin equatable collection]
- location 4.3.0 [flutter location_platform_interface location_web]
- logging 1.0.1
- onboarding 1.1.0 [flutter]
- package_info_plus 1.0.3 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web]
- path 1.8.0
- protobuf 2.0.0 [fixnum]
- provider 5.0.0 [collection flutter nested]
- rate_my_app 1.1.1 [shared_preferences flutter_rating_bar pedantic flutter]
- shared_preferences 2.0.6 [meta flutter shared_preferences_platform_interface shared_preferences_linux shared_preferences_macos shared_preferences_web shared_preferences_windows]
- sign_in_with_apple 3.0.0 [flutter meta]
- stack_trace 1.10.0 [path]
- url_launcher 6.0.6 [flutter meta url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- uuid 3.0.4 [crypto]

dev dependencies:
- effective_dart 1.2.4
- fake_async 1.2.0 [clock collection]
- flutter_launcher_icons 0.9.0 [args image path yaml]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]
- mockito 5.0.10 [analyzer build code_builder collection dart_style matcher meta path source_gen test_api]
- test 1.16.8 [analyzer async boolean_selector collection coverage http_multi_server io js node_preamble package_config path pedantic 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]

dependency overrides:
- rxdart 0.26.0

transitive dependencies:
- _fe_analyzer_shared 22.0.0 [meta]
- analyzer 1.7.1 [_fe_analyzer_shared cli_util collection convert crypto glob meta package_config path pub_semver source_span watcher yaml pedantic]
- archive 3.1.2 [crypto path]
- args 2.0.0
- async 2.6.1 [meta collection]
- boolean_selector 2.1.0 [source_span string_scanner]
- build 2.0.2 [analyzer async convert crypto glob logging meta path]
- built_collection 5.1.0
- built_value 8.1.0 [built_collection collection fixnum meta]
- characters 1.1.0
- charcode 1.2.0
- cli_util 0.3.0 [meta path]
- clock 1.1.0
- code_builder 4.0.0 [built_collection built_value collection matcher meta]
- collection 1.15.0
- connectivity_plus_linux 1.0.3 [flutter connectivity_plus_platform_interface dbus meta]
- connectivity_plus_macos 1.0.2 [connectivity_plus_platform_interface flutter]
- connectivity_plus_platform_interface 1.0.2 [flutter meta plugin_platform_interface]
- connectivity_plus_web 1.0.2 [connectivity_plus_platform_interface flutter_web_plugins flutter]
- connectivity_plus_windows 1.0.2 [connectivity_plus_platform_interface flutter]
- convert 3.0.0 [typed_data]
- coverage 1.0.3 [args logging package_config path source_maps stack_trace vm_service]
- crypto 3.0.1 [collection typed_data]
- dart_style 2.0.1 [analyzer args path pub_semver source_span]
- dbus 0.5.2 [args meta pedantic xml]
- device_info_plus_linux 2.0.0 [device_info_plus_platform_interface file flutter meta]
- device_info_plus_macos 2.0.0 [device_info_plus_platform_interface flutter]
- device_info_plus_platform_interface 2.0.0 [flutter meta plugin_platform_interface]
- device_info_plus_web 2.0.0 [device_info_plus_platform_interface flutter_web_plugins flutter]
- device_info_plus_windows 2.0.0 [device_info_plus_platform_interface ffi flutter win32]
- ffi 1.1.2
- file 6.1.2 [meta path]
- firebase 9.0.1 [http http_parser js]
- firebase_analytics_platform_interface 2.0.1 [flutter meta]
- firebase_analytics_web 0.3.0+1 [firebase firebase_analytics_platform_interface flutter flutter_web_plugins meta]
- firebase_auth_platform_interface 6.1.0 [firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 3.1.0 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
- firebase_core_platform_interface 4.0.1 [collection flutter meta plugin_platform_interface]
- firebase_core_web 1.1.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_crashlytics_platform_interface 3.1.2 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_remote_config_platform_interface 0.3.0+5 [firebase_core flutter meta plugin_platform_interface]
- firebase_storage_platform_interface 4.0.2 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_storage_web 3.0.2 [async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta]
- flutter_blurhash 0.6.0 [flutter meta pedantic]
- flutter_cache_manager 3.1.2 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid]
- flutter_local_notifications_platform_interface 4.0.0 [flutter plugin_platform_interface]
- flutter_plugin_android_lifecycle 2.0.2 [flutter]
- flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math]
- geocoding_platform_interface 2.0.0 [flutter meta plugin_platform_interface]
- geolocator_platform_interface 2.1.1 [flutter plugin_platform_interface vector_math meta]
- geolocator_web 2.0.3 [flutter flutter_web_plugins geolocator_platform_interface]
- glob 2.0.1 [async collection file path pedantic string_scanner]
- google_maps_flutter_platform_interface 2.1.0 [collection flutter meta plugin_platform_interface stream_transform]
- google_sign_in_platform_interface 2.0.1 [flutter meta quiver]
- google_sign_in_web 0.10.0 [google_sign_in_platform_interface flutter flutter_web_plugins meta js]
- http_multi_server 3.0.1 [async]
- http_parser 4.0.0 [charcode collection source_span string_scanner typed_data]
- image 3.0.2 [archive meta xml]
- in_app_purchase_android 0.1.3+1 [collection flutter in_app_purchase_platform_interface json_annotation meta test]
- in_app_purchase_ios 0.1.0+1 [collection flutter in_app_purchase_platform_interface json_annotation meta test]
- in_app_purchase_platform_interface 1.0.0 [flutter plugin_platform_interface]
- io 1.0.0 [meta path string_scanner]
- js 0.6.3
- json_annotation 4.0.1
- libphonenumber 2.0.1 [flutter meta]
- libphonenumber_platform_interface 0.3.1 [flutter plugin_platform_interface]
- libphonenumber_plugin 0.2.3 [flutter flutter_web_plugins libphonenumber_platform_interface libphonenumber_web libphonenumber]
- libphonenumber_web 0.2.0+1 [flutter flutter_web_plugins js libphonenumber_platform_interface]
- 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]
- matcher 0.12.10 [stack_trace]
- meta 1.3.0
- mime 1.0.0
- nested 1.0.0 [flutter]
- node_preamble 2.0.1
- octo_image 1.0.0+1 [flutter flutter_blurhash]
- package_config 2.0.0 [path]
- package_info_plus_linux 1.0.2 [package_info_plus_platform_interface flutter path]
- package_info_plus_macos 1.1.1 [flutter]
- package_info_plus_platform_interface 1.0.1 [flutter meta plugin_platform_interface]
- package_info_plus_web 1.0.2 [http package_info_plus_platform_interface flutter flutter_web_plugins meta]
- package_info_plus_windows 1.0.2 [package_info_plus_platform_interface ffi flutter win32]
- path_provider 2.0.2 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows]
- path_provider_linux 2.0.0 [path xdg_directories path_provider_platform_interface flutter]
- path_provider_macos 2.0.0 [flutter]
- path_provider_platform_interface 2.0.1 [flutter meta platform plugin_platform_interface]
- path_provider_windows 2.0.1 [path_provider_platform_interface meta path flutter ffi win32]
- pedantic 1.11.1
- petitparser 4.1.0 [meta]
- platform 3.0.0
- plugin_platform_interface 2.0.0 [meta]
- pool 1.5.0 [async stack_trace]
- process 4.2.1 [file path platform]
- pub_semver 2.0.0 [collection]
- quiver 3.0.1 [matcher]
- shared_preferences_linux 2.0.0 [flutter file meta path path_provider_linux shared_preferences_platform_interface]
- shared_preferences_macos 2.0.0 [shared_preferences_platform_interface flutter]
- shared_preferences_platform_interface 2.0.0 [flutter]
- shared_preferences_web 2.0.0 [shared_preferences_platform_interface flutter flutter_web_plugins meta]
- shared_preferences_windows 2.0.0 [shared_preferences_platform_interface flutter file meta path path_provider_platform_interface path_provider_windows]
- shelf 1.1.4 [async collection http_parser path stack_trace stream_channel]
- shelf_packages_handler 3.0.0 [path shelf shelf_static]
- shelf_static 1.0.0 [convert http_parser mime path shelf]
- shelf_web_socket 1.0.1 [shelf stream_channel web_socket_channel]
- sky_engine 0.0.99
- source_gen 1.0.2 [analyzer async build dart_style glob meta path pedantic source_span yaml]
- source_map_stack_trace 2.1.0 [path stack_trace source_maps]
- source_maps 0.10.10 [source_span]
- source_span 1.8.1 [collection path term_glyph]
- sqflite 2.0.0+3 [flutter sqflite_common path]
- sqflite_common 2.0.0+2 [synchronized path meta]
- stream_channel 2.1.0 [async]
- stream_transform 2.0.0
- string_scanner 1.1.0 [charcode source_span]
- synchronized 3.0.0
- term_glyph 1.2.0
- test_api 0.3.0 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
- test_core 0.3.19 [analyzer async args boolean_selector collection coverage glob io meta package_config path pedantic pool source_map_stack_trace source_maps source_span stack_trace stream_channel vm_service yaml matcher test_api]
- timezone 0.7.0 [path]
- typed_data 1.3.0 [collection]
- url_launcher_linux 2.0.0 [flutter]
- url_launcher_macos 2.0.0 [flutter]
- url_launcher_platform_interface 2.0.3 [flutter plugin_platform_interface]
- url_launcher_web 2.0.1 [flutter flutter_web_plugins meta url_launcher_platform_interface]
- url_launcher_windows 2.0.0 [flutter]
- vector_math 2.1.0
- vm_service 6.2.0
- watcher 1.0.0 [async path pedantic]
- web_socket_channel 2.1.0 [async crypto stream_channel]
- webkit_inspection_protocol 1.0.0 [logging]
- win32 2.2.2 [ffi]
- xdg_directories 0.2.0 [meta path process]
- xml 5.1.2 [collection meta petitparser]
- yaml 3.1.0 [collection source_span string_scanner]

Additional info

So far, I've managed to rule out the following:

  • Probably not a problem with the keystore or the debug cert: though I did move to a new workstation recently, I added the debug cert fingerprints (both SHA1 and SHA256) to the Firebase console, and downloaded/replaced the google-services.json file.
  • Definitely not a network connectivity issue: I'm doing a connectivity check before the fetch() call, which comes back fine.
  • Definitely not an outdated version of the plugin: I just updated to firebase_remote_config: 0.10.0+5, which is the latest version listed on Pub.

Addendum: this issue is a continuation of #5958 attended by @Stehfanny, which was locked despite activity.

If there is additional information needed, let me know, and I'll do my best to provide.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions