Skip to content

[firebase_remote_config]: FirebaseException on fetchAndActivate during startup. #17349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
omar-khaium opened this issue May 13, 2025 · 10 comments · May be fixed by #17378
Open
1 task done

[firebase_remote_config]: FirebaseException on fetchAndActivate during startup. #17349

omar-khaium opened this issue May 13, 2025 · 10 comments · May be fixed by #17378
Labels
platform: ios Issues / PRs which are specifically for iOS. plugin: remote_config type: bug Something isn't working

Comments

@omar-khaium
Copy link

omar-khaium commented May 13, 2025

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Remote Config

Which platforms are affected?

iOS

Description

Flutter 3.29.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ea121f8859 (4 weeks ago) • 2025-04-11 19:10:07 +0000
Engine • revision cf56914b32
Tools • Dart 3.7.2 • DevTools 2.42.3

FirebaseException ([firebase_remote_config/internal] cannot parse response)
FirebaseException ([firebase_remote_config/internal] The network connection was lost.)

These 2 exceptions are occurring randomly. I'm using the same configuration style for last few years, but, since last few months I'm getting these weird exceptions in all my projects. I've tried switching to better stable WiFi and active Mobile network for experient. None the less, result is the same.

Reproducing the issue

Before calling runApp

await FirebaseRemoteConfig.instance.ensureInitialized();

await FirebaseRemoteConfig.instance.setConfigSettings(
  RemoteConfigSettings(
    fetchTimeout: const Duration(minutes: 1),
    minimumFetchInterval: const Duration(minutes: 1),
  ),
);

Firebase console configuration

{
  "parameters": {
    "version": {
      "defaultValue": {
        "value": "0.0.1"
      },
      "valueType": "STRING"
    },
    "whats_new": {
      "defaultValue": {
        "value": "[]"
      },
      "valueType": "JSON"
    }
  },
  "version": {
    "versionNumber": "1",
    "updateTime": "2025-05-13T05:20:36.582128Z",
    "updateUser": {
      "email": "[email protected]"
    },
    "updateOrigin": "CONSOLE",
    "updateType": "INCREMENTAL_UPDATE"
  }
}

Firebase Core version

3.13.0

Flutter Version

3.29.3

Relevant Log Output

[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: [firebase_remote_config/internal] cannot
parse response
           #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:652:7)
           #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:370:18)
           <asynchronous suspension>
           #2      MethodChannelFirebaseRemoteConfig.fetchAndActivate
(package:firebase_remote_config_platform_interface/src/method_channel/method_channel_firebase_remote_config.dart:150:29)
           <asynchronous suspension>
           #3      FirebaseRemoteConfig.fetchAndActivate (package:firebase_remote_config/src/firebase_remote_config.dart:89:26)
           <asynchronous suspension>
           #4      AppConfig.init (package:asg/core/config/config.dart:66:7)
           <asynchronous suspension>
           #5      main (package:asg/main.dart:9:3)
           <asynchronous suspension>

Flutter dependencies

Expand Flutter dependencies snippet
Dart SDK 3.7.2
Flutter SDK 3.29.3
asg 1.8.1+181

dependencies:
- awesome_snackbar_content 0.1.5 [flutter_svg flutter flutter_localizations]
- cached_network_image 3.4.1 [cached_network_image_platform_interface cached_network_image_web flutter flutter_cache_manager octo_image]
- collection 1.19.1
- credit_card_type_detector 3.0.0
- credit_card_validator 2.1.0 [credit_card_type_detector]
- cronet_http 1.3.4 [flutter http http_profile jni]
- cupertino_http 2.2.0 [async ffi flutter http http_profile objective_c web_socket]
- cupertino_icons 1.0.8
- curl_generator 1.0.2
- either_dart 1.0.0
- equatable 2.0.7 [collection meta]
- feedback 3.1.0 [flutter flutter_localizations]
- feedback_sentry 3.1.0 [flutter feedback sentry]
- firebase_core 3.13.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_remote_config 5.4.3 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_animate 4.5.2 [flutter flutter_shaders]
- flutter_bloc 9.1.1 [bloc flutter provider]
- flutter_exif_rotation 0.5.2 [flutter]
- flutter_image_compress 2.4.0 [flutter flutter_image_compress_platform_interface flutter_image_compress_common flutter_image_compress_web flutter_image_compress_macos flutter_image_compress_ohos]
- flutter_keyboard_visibility 6.0.0 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_linux flutter_keyboard_visibility_macos flutter_keyboard_visibility_web flutter_keyboard_visibility_windows flutter]
- flutter_multi_formatter 2.13.7 [flutter collection base58check bech32]
- flutter_native_splash 2.4.6 [args flutter flutter_web_plugins html image meta path universal_io xml yaml ansicolor]
- flutter_screenutil 5.9.3 [flutter]
- flutter_speed_dial 7.0.0 [flutter]
- flutter_widget_from_html 0.16.0 [flutter flutter_widget_from_html_core fwfh_cached_network_image fwfh_chewie fwfh_just_audio fwfh_svg fwfh_url_launcher fwfh_webview html]
- font_awesome_flutter 10.8.0 [flutter]
- geolocator 14.0.0 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows]
- get_it 8.0.3 [async collection meta]
- go_router 15.1.2 [collection flutter flutter_web_plugins logging meta]
- google_fonts 6.2.1 [flutter http path_provider crypto]
- html 0.15.6 [csslib source_span]
- http 1.4.0 [async http_parser meta web]
- hydrated_bloc 10.0.0 [bloc hive_ce meta synchronized]
- image_picker 1.1.2 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_linux image_picker_macos image_picker_platform_interface image_picker_windows]
- in_app_update 4.2.3 [flutter]
- internet_connection_checker 3.0.1 [connectivity_plus equatable flutter http]
- interval_time_picker 3.0.3+9 [flutter]
- intl 0.19.0 [clock meta path]
- logging 1.3.0
- maps_launcher 3.0.0+1 [flutter flutter_web_plugins url_launcher web]
- material_design_icons_flutter 7.0.7296 [flutter]
- package_info_plus 8.3.0 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface web win32 clock]
- path_provider 2.1.5 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows]
- photo_view 0.15.0 [flutter]
- retrofit 4.4.2 [dio meta]
- sentry_flutter 8.14.2 [flutter flutter_web_plugins sentry package_info_plus meta ffi file collection]
- shimmer 3.0.0 [flutter]
- url_launcher 6.3.1 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- webview_flutter 4.11.0 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview]

dev dependencies:
- build_runner 2.4.15 [analyzer args async build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style frontend_server_client glob graphs http 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 web_socket_channel yaml]
- change_app_package_name 1.5.0
- flutter_lints 5.0.0 [lints]
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math leak_tracker_flutter_testing async boolean_selector characters collection leak_tracker leak_tracker_testing material_color_utilities meta source_span stream_channel string_scanner term_glyph vm_service]

transitive dependencies:
- _fe_analyzer_shared 82.0.0 [meta]
- _flutterfire_internals 1.3.54 [collection firebase_core firebase_core_platform_interface flutter meta]
- analyzer 7.4.5 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
- ansicolor 2.0.3
- archive 4.0.7 [crypto path posix]
- args 2.7.0
- async 2.12.0 [collection meta]
- audio_session 0.1.25 [flutter flutter_web_plugins rxdart meta]
- base58check 2.0.0 [crypto collection]
- bech32 0.2.2 [convert]
- bloc 9.0.0 [meta]
- boolean_selector 2.1.2 [source_span string_scanner]
- build 2.4.2 [analyzer async convert crypto glob logging meta package_config path]
- build_config 1.1.2 [checked_yaml json_annotation path pubspec_parse yaml]
- build_daemon 4.0.4 [built_collection built_value crypto http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
- build_resolvers 2.4.4 [analyzer async build collection convert crypto graphs logging package_config path pool pub_semver stream_transform yaml]
- build_runner_core 8.0.0 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta package_config path pool timing watcher yaml]
- built_collection 5.1.1
- built_value 8.9.5 [built_collection collection fixnum meta]
- cached_network_image_platform_interface 4.1.1 [flutter flutter_cache_manager]
- cached_network_image_web 1.3.1 [cached_network_image_platform_interface flutter flutter_cache_manager web]
- characters 1.4.0
- checked_yaml 2.0.3 [json_annotation source_span yaml]
- chewie 1.11.3 [cupertino_icons flutter provider video_player wakelock_plus]
- clock 1.1.2
- code_builder 4.10.1 [built_collection built_value collection matcher meta]
- connectivity_plus 6.1.4 [flutter flutter_web_plugins connectivity_plus_platform_interface web meta nm collection]
- connectivity_plus_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- convert 3.1.2 [typed_data]
- cross_file 0.3.4+2 [meta web]
- crypto 3.0.6 [typed_data]
- csslib 1.0.2 [source_span]
- dart_style 3.0.1 [analyzer args collection package_config path pub_semver source_span yaml]
- dbus 0.7.11 [args ffi meta xml]
- dio 5.8.0+1 [async collection http_parser meta path dio_web_adapter]
- dio_web_adapter 2.1.1 [dio http_parser meta web]
- fake_async 1.3.2 [clock collection]
- ffi 2.1.4
- file 7.0.1 [meta path]
- file_selector_linux 0.9.3+2 [cross_file file_selector_platform_interface flutter]
- file_selector_macos 0.9.4+2 [cross_file file_selector_platform_interface flutter]
- file_selector_platform_interface 2.6.2 [cross_file flutter http plugin_platform_interface]
- file_selector_windows 0.9.3+4 [cross_file file_selector_platform_interface flutter]
- firebase_core_platform_interface 5.4.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.22.0 [firebase_core_platform_interface flutter flutter_web_plugins meta web]
- firebase_remote_config_platform_interface 1.5.3 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_remote_config_web 1.8.3 [_flutterfire_internals firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins]
- fixnum 1.1.1
- flutter_cache_manager 3.4.1 [clock collection file flutter http path path_provider rxdart sqflite uuid]
- flutter_image_compress_common 1.0.6 [flutter flutter_image_compress_platform_interface]
- flutter_image_compress_macos 1.0.3 [flutter flutter_image_compress_platform_interface]
- flutter_image_compress_ohos 0.0.3 [flutter flutter_image_compress_platform_interface]
- flutter_image_compress_platform_interface 1.0.5 [flutter plugin_platform_interface cross_file]
- flutter_image_compress_web 0.1.5 [flutter flutter_web_plugins flutter_image_compress_platform_interface web]
- flutter_keyboard_visibility_linux 1.0.0 [flutter_keyboard_visibility_platform_interface flutter]
- flutter_keyboard_visibility_macos 1.0.0 [flutter_keyboard_visibility_platform_interface flutter]
- flutter_keyboard_visibility_platform_interface 2.0.0 [flutter meta plugin_platform_interface]
- flutter_keyboard_visibility_web 2.0.0 [flutter_keyboard_visibility_platform_interface flutter_web_plugins flutter]
- flutter_keyboard_visibility_windows 1.0.0 [flutter_keyboard_visibility_platform_interface flutter]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math]
- flutter_plugin_android_lifecycle 2.0.28 [flutter]
- flutter_shaders 0.1.3 [flutter vector_math]
- flutter_svg 2.1.0 [flutter http vector_graphics vector_graphics_codec vector_graphics_compiler]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math]
- flutter_widget_from_html_core 0.16.0 [csslib flutter html logging]
- frontend_server_client 4.0.0 [async path]
- fwfh_cached_network_image 0.16.0 [cached_network_image flutter flutter_cache_manager flutter_widget_from_html_core]
- fwfh_chewie 0.16.0 [chewie flutter flutter_widget_from_html_core video_player]
- fwfh_just_audio 0.16.0 [flutter flutter_widget_from_html_core just_audio]
- fwfh_svg 0.16.0 [flutter flutter_svg flutter_widget_from_html_core]
- fwfh_url_launcher 0.16.0 [flutter flutter_widget_from_html_core url_launcher]
- fwfh_webview 0.15.4 [flutter flutter_widget_from_html_core logging web webview_flutter webview_flutter_android webview_flutter_wkwebview]
- geolocator_android 5.0.1+1 [flutter geolocator_platform_interface meta uuid]
- geolocator_apple 2.3.13 [flutter geolocator_platform_interface]
- geolocator_platform_interface 4.2.6 [flutter plugin_platform_interface vector_math meta]
- geolocator_web 4.1.3 [flutter flutter_web_plugins geolocator_platform_interface web]
- geolocator_windows 0.2.5 [flutter geolocator_platform_interface]
- glob 2.1.3 [async collection file path string_scanner]
- graphs 2.3.2 [collection]
- hive_ce 2.11.1 [meta crypto web isolate_channel json_annotation]
- http_multi_server 3.2.2 [async]
- http_parser 4.1.2 [collection source_span string_scanner typed_data]
- http_profile 0.1.0
- image 4.5.4 [archive meta xml]
- image_picker_android 0.8.12+23 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- image_picker_for_web 3.0.6 [flutter flutter_web_plugins image_picker_platform_interface mime web]
- image_picker_ios 0.8.12+2 [flutter image_picker_platform_interface]
- image_picker_linux 0.2.1+2 [file_selector_linux file_selector_platform_interface flutter image_picker_platform_interface]
- image_picker_macos 0.2.1+2 [file_selector_macos file_selector_platform_interface flutter image_picker_platform_interface]
- image_picker_platform_interface 2.10.1 [cross_file flutter http plugin_platform_interface]
- image_picker_windows 0.2.1+1 [file_selector_platform_interface file_selector_windows flutter image_picker_platform_interface]
- io 1.0.5 [meta path string_scanner]
- isolate_channel 0.2.2
- jni 0.12.2 [args ffi meta package_config path plugin_platform_interface]
- js 0.7.2
- json_annotation 4.9.0 [meta]
- just_audio 0.9.46 [just_audio_platform_interface just_audio_web audio_session rxdart path path_provider async uuid crypto meta flutter]
- just_audio_platform_interface 4.5.0 [flutter plugin_platform_interface]
- just_audio_web 0.4.15 [just_audio_platform_interface flutter flutter_web_plugins web]
- leak_tracker 10.0.8 [clock collection meta path vm_service]
- leak_tracker_flutter_testing 3.0.9 [flutter leak_tracker leak_tracker_testing matcher meta]
- leak_tracker_testing 3.0.1 [leak_tracker matcher meta]
- lints 5.1.1
- matcher 0.12.17 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.11.1 [collection]
- meta 1.16.0
- mime 2.0.0
- nested 1.0.0 [flutter]
- nm 0.5.0 [dbus]
- objective_c 7.1.0 [ffi flutter pub_semver]
- octo_image 2.1.0 [flutter]
- package_config 2.2.0 [path]
- package_info_plus_platform_interface 3.2.0 [flutter meta plugin_platform_interface]
- path 1.9.1
- path_parsing 1.1.0 [meta vector_math]
- path_provider_android 2.2.17 [flutter path_provider_platform_interface]
- path_provider_foundation 2.4.1 [flutter path_provider_platform_interface]
- path_provider_linux 2.2.1 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_platform_interface 2.1.2 [flutter platform plugin_platform_interface]
- path_provider_windows 2.3.0 [ffi flutter path path_provider_platform_interface]
- petitparser 6.1.0 [meta collection]
- platform 3.1.6
- plugin_platform_interface 2.1.8 [meta]
- pool 1.5.1 [async stack_trace]
- posix 6.0.2 [ffi meta path]
- provider 6.1.5 [collection flutter nested]
- pub_semver 2.2.0 [collection]
- pubspec_parse 1.5.0 [checked_yaml collection json_annotation pub_semver yaml]
- rxdart 0.28.0
- sentry 8.14.2 [http meta stack_trace uuid collection]
- shelf 1.4.2 [async collection http_parser path stack_trace stream_channel]
- shelf_web_socket 3.0.0 [shelf stream_channel web_socket_channel]
- sky_engine 0.0.0
- source_span 1.10.1 [collection path term_glyph]
- sprintf 7.0.0
- sqflite 2.4.2 [flutter sqflite_android sqflite_darwin sqflite_platform_interface sqflite_common path]
- sqflite_android 2.4.1 [flutter sqflite_common path sqflite_platform_interface]
- sqflite_common 2.5.5 [synchronized path meta]
- sqflite_darwin 2.4.2 [flutter sqflite_platform_interface meta sqflite_common path]
- sqflite_platform_interface 2.4.0 [flutter platform sqflite_common plugin_platform_interface meta]
- stack_trace 1.12.1 [path]
- stream_channel 2.1.4 [async]
- stream_transform 2.1.1
- string_scanner 1.4.1 [source_span]
- synchronized 3.3.1
- term_glyph 1.2.2
- test_api 0.7.4 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- timing 1.0.2 [json_annotation]
- typed_data 1.4.0 [collection]
- universal_io 2.2.2 [collection meta typed_data]
- url_launcher_android 6.3.16 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.3.3 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.2.1 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.2.2 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.3.2 [flutter plugin_platform_interface]
- url_launcher_web 2.4.1 [flutter flutter_web_plugins url_launcher_platform_interface web]
- url_launcher_windows 3.1.4 [flutter url_launcher_platform_interface]
- uuid 4.5.1 [crypto sprintf meta fixnum]
- vector_graphics 1.1.18 [flutter http vector_graphics_codec]
- vector_graphics_codec 1.1.13
- vector_graphics_compiler 1.1.16 [args meta path path_parsing vector_graphics_codec xml]
- vector_math 2.1.4
- video_player 2.9.5 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web]
- video_player_android 2.8.3 [flutter video_player_platform_interface]
- video_player_avfoundation 2.7.1 [flutter video_player_platform_interface]
- video_player_platform_interface 6.3.0 [flutter plugin_platform_interface]
- video_player_web 2.3.5 [flutter flutter_web_plugins video_player_platform_interface web]
- vm_service 14.3.1
- wakelock_plus 1.3.2 [flutter flutter_web_plugins meta wakelock_plus_platform_interface win32 dbus package_info_plus web]
- wakelock_plus_platform_interface 1.2.3 [flutter plugin_platform_interface meta]
- watcher 1.1.1 [async path]
- web 1.1.1
- web_socket 0.1.6 [web]
- web_socket_channel 3.0.3 [async crypto stream_channel web web_socket]
- webview_flutter_android 4.4.2 [flutter webview_flutter_platform_interface]
- webview_flutter_platform_interface 2.11.0 [flutter meta plugin_platform_interface]
- webview_flutter_wkwebview 3.20.0 [flutter path webview_flutter_platform_interface]
- win32 5.13.0 [ffi]
- xdg_directories 1.1.0 [meta path]
- xml 6.5.0 [collection meta petitparser]
- yaml 3.1.3 [collection source_span string_scanner]

Additional context and comments

No response

@omar-khaium omar-khaium added type: bug Something isn't working Needs Attention This issue needs maintainer attention. labels May 13, 2025
@SelaseKay SelaseKay added plugin: remote_config platform: ios Issues / PRs which are specifically for iOS. labels May 13, 2025
@Goodstuff4UonYT
Copy link

Same issue here. Any updates?

@SelaseKay
Copy link
Contributor

Hi @omar-khaium, thanks for the report. I'm unable to reproduce this issue with the firebase_remote_config example app. Could you provide a complete example which reproduces this issue?

@SelaseKay SelaseKay added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels May 13, 2025
@xVemu
Copy link

xVemu commented May 13, 2025

Fixed in native sdk. We just need to wait for update

@irvine5k
Copy link

irvine5k commented May 15, 2025

Same error here, the parser one strangely happens when I pick a value below 30s for the minimumFetchInterval, while the connection lost started to pop up out of the blue, in the first run it worked, but started to break on the subsequent ones.

@marclester-tang
Copy link

any workarounds?

@AhmedEzio47
Copy link

I’m experiencing the same issue. I wonder, will older versions resume working on their own, or will we need to update to the newer release to restore functionality?

@AhmedEzio47
Copy link

It turns out that the issue only occurs on iOS simulators; it works fine on real devices, even on simulators. Uninstalling the app and reinstalling it should solve the issue. Many thanks to my amazing friend @mohanedy , who pointed this out to me. Kindly check and confirm guys @omar-khaium @Goodstuff4UonYT @xVemu @marclester-tang

@omar-khaium
Copy link
Author

@AhmedEzio47 uninstalling the app and reinstalling somehow works for now on iOS simulator. Wasn't the case before you mentioned it (I had uninstalled many times out of frustration before). Kudos!!!

@omar-khaium
Copy link
Author

Nevermind, I'm getting The network connection was lost. after hot-restarting the app. Same old, same old.

@omar-khaium omar-khaium reopened this May 21, 2025
@jrb1989
Copy link

jrb1989 commented May 21, 2025

Same issue here. Any updates?

@SelaseKay SelaseKay removed blocked: customer-response Waiting for customer response, e.g. more information was requested. blocked: firebase-sdk labels May 21, 2025
@SelaseKay SelaseKay linked a pull request May 21, 2025 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: ios Issues / PRs which are specifically for iOS. plugin: remote_config type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants