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.72k stars 3.97k forks source link

Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) #11883

Closed atuljha3334 closed 11 months ago

atuljha3334 commented 1 year ago

Bug report

Getting following error while building flutter app in iOS simulator:

Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)
#0      FirebaseCoreHostApi.initializeCore (package:firebase_core_platform_interface/src/pigeon/messages.pigeon.dart:210:7)
<asynchronous suspension>
#1      MethodChannelFirebase._initializeCore (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:29:44)
<asynchronous suspension>
#2      MethodChannelFirebase.initializeApp (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:73:7)
<asynchronous suspension>
#3      Firebase.initializeApp (package:firebase_core/src/firebase.dart:43:31)
<asynchronous suspension>
#4      main (package:future_home/main.dart:45:3)
<asynchronous suspension>

Steps to reproduce the behavior:

  1. Created a project in Firebase console
  2. Added flutter app to the project supporting iOS and Android.
  3. Tried to build the app
  4. For Android, everything is working fine, even getting Crashlytics events as well but when trying to build on iOS simulator getting error mentioned in the description.

Sample project

Tried to do the same with a sample project, there it worked fine.


Additional context

Tried flutter clean, flutter pub outdated, flutter upgrade multiple times, but no luck.


Flutter doctor

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.13.9, on macOS 13.6 22G120 darwin-arm64, locale en-IN) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) [✓] Xcode - develop for iOS and macOS (Xcode 15.0) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.2) [✓] VS Code (version 1.84.2) [✓] Connected device (3 available) [✓] Network resources

• No issues found!


Flutter dependencies

Dart SDK 3.1.5
Flutter SDK 3.13.9
future_home 1.0.0+1

dependencies:
- cupertino_icons 1.0.6
- device_info_plus 9.1.0 [device_info_plus_platform_interface ffi file flutter flutter_web_plugins meta win32 win32_registry]
- easy_localization 3.0.3 [flutter shared_preferences intl args path easy_logger flutter_localizations]
- firebase_core 2.22.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_core_platform_interface 5.0.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_crashlytics 3.4.4 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- firebase_messaging 14.7.4 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math web sky_engine]
- flutter_apns_only 1.6.0 [flutter]
- flutter_appauth 6.0.2 [flutter flutter_appauth_platform_interface]
- flutter_background_service 5.0.3 [flutter flutter_background_service_platform_interface flutter_background_service_android flutter_background_service_ios]
- flutter_colorpicker 1.0.3 [flutter]
- flutter_hooks 0.18.6 [flutter]
- flutter_hue 1.2.0 [collection crypto flutter http multicast_dns path_provider url_launcher]
- flutter_local_notifications 15.1.2 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone]
- flutter_secure_storage 8.1.0 [flutter flutter_secure_storage_linux flutter_secure_storage_macos flutter_secure_storage_platform_interface flutter_secure_storage_web flutter_secure_storage_windows meta]
- flutter_slidable 3.0.1 [flutter]
- flutter_switch 0.3.2 [flutter]
- geocoding 2.1.1 [flutter geocoding_platform_interface geocoding_android geocoding_ios]
- geolocator 9.0.2 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows]
- go_router 7.1.1 [collection flutter flutter_web_plugins logging meta]
- http 0.13.6 [async http_parser meta]
- image_picker 0.8.9 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_linux image_picker_macos image_picker_platform_interface image_picker_windows]
- info_popup 3.0.6 [flutter]
- internet_connectivity_checker 1.0.2 [flutter]
- mobile_scanner 3.5.2 [flutter flutter_web_plugins js]
- native_dialog 0.1.1 [flutter flutter_web_plugins]
- permission_handler 11.0.1 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface]
- push 1.0.5 [flutter push_platform_interface push_android push_ios push_macos]
- qr_flutter 4.1.0 [flutter qr]
- share_plus 7.2.1 [cross_file meta mime flutter flutter_web_plugins share_plus_platform_interface file url_launcher_web url_launcher_windows url_launcher_linux url_launcher_platform_interface ffi win32]
- shared_preferences 2.2.2 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- sleek_circular_slider 2.0.1 [flutter]
- toggle_switch 2.1.0 [flutter]
- weather 3.0.0 [flutter http]
- webview_flutter 4.4.2 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview]
- weekday_selector 1.1.0 [flutter]

dev dependencies:
- flutter_lints 2.0.3 [lints]
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math async boolean_selector characters collection material_color_utilities meta source_span stream_channel string_scanner term_glyph web]
- integration_test 0.0.0 [flutter flutter_driver flutter_test path vm_service async boolean_selector characters clock collection fake_async file matcher material_color_utilities meta source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api vector_math web webdriver]

transitive dependencies:
- _flutterfire_internals 1.3.12 [collection firebase_core firebase_core_platform_interface flutter meta]
- args 2.4.2
- async 2.11.0 [collection meta]
- boolean_selector 2.1.1 [source_span string_scanner]
- characters 1.3.0
- clock 1.1.1
- collection 1.17.2
- cross_file 0.3.3+6 [js meta]
- crypto 3.0.3 [typed_data]
- dbus 0.7.8 [args ffi meta xml]
- device_info_plus_platform_interface 7.0.0 [flutter meta plugin_platform_interface]
- easy_logger 0.0.2 [flutter]
- fake_async 1.3.1 [clock collection]
- ffi 2.1.0
- file 6.1.4 [meta path]
- file_selector_linux 0.9.2+1 [cross_file file_selector_platform_interface flutter]
- file_selector_macos 0.9.3+3 [cross_file file_selector_platform_interface flutter]
- file_selector_platform_interface 2.6.1 [cross_file flutter http plugin_platform_interface]
- file_selector_windows 0.9.3+1 [cross_file file_selector_platform_interface flutter]
- firebase_core_web 2.8.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_crashlytics_platform_interface 3.6.12 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_platform_interface 4.5.13 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_web 3.5.13 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta]
- flutter_appauth_platform_interface 6.0.0 [flutter plugin_platform_interface]
- flutter_background_service_android 6.2.0 [flutter flutter_background_service_platform_interface]
- flutter_background_service_ios 5.0.0 [flutter flutter_background_service_platform_interface]
- flutter_background_service_platform_interface 5.0.0 [flutter platform plugin_platform_interface]
- flutter_driver 0.0.0 [file flutter flutter_test fuchsia_remote_debug_protocol path meta vm_service webdriver async boolean_selector characters clock collection matcher material_color_utilities platform process source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api vector_math web]
- flutter_local_notifications_linux 4.0.0+1 [dbus ffi flutter flutter_local_notifications_platform_interface path xdg_directories]
- flutter_local_notifications_platform_interface 7.0.0+1 [flutter plugin_platform_interface]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math web]
- flutter_plugin_android_lifecycle 2.0.17 [flutter]
- flutter_secure_storage_linux 1.2.0 [flutter flutter_secure_storage_platform_interface]
- flutter_secure_storage_macos 3.0.1 [flutter flutter_secure_storage_platform_interface]
- flutter_secure_storage_platform_interface 1.0.2 [flutter plugin_platform_interface]
- flutter_secure_storage_web 1.1.2 [flutter flutter_secure_storage_platform_interface flutter_web_plugins js]
- flutter_secure_storage_windows 2.1.1 [flutter flutter_secure_storage_platform_interface]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math web]
- fuchsia_remote_debug_protocol 0.0.0 [process vm_service file meta path platform]
- geocoding_android 2.1.2 [flutter geocoding_platform_interface]
- geocoding_ios 2.1.1 [flutter geocoding_platform_interface]
- geocoding_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- geolocator_android 4.4.0 [flutter geolocator_platform_interface uuid]
- geolocator_apple 2.3.2 [flutter geolocator_platform_interface]
- geolocator_platform_interface 4.2.0 [flutter plugin_platform_interface vector_math meta]
- geolocator_web 2.2.0 [flutter flutter_web_plugins geolocator_platform_interface]
- geolocator_windows 0.1.3 [flutter geolocator_platform_interface]
- http_parser 4.0.2 [collection source_span string_scanner typed_data]
- image_picker_android 0.8.8+2 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- image_picker_for_web 2.2.0 [flutter flutter_web_plugins image_picker_platform_interface mime]
- image_picker_ios 0.8.8+4 [flutter image_picker_platform_interface]
- image_picker_linux 0.2.1+1 [file_selector_linux file_selector_platform_interface flutter image_picker_platform_interface]
- image_picker_macos 0.2.1+1 [file_selector_macos file_selector_platform_interface flutter image_picker_platform_interface]
- image_picker_platform_interface 2.9.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]
- intl 0.18.1 [clock meta path]
- js 0.6.7 [meta]
- lints 2.1.1
- logging 1.2.0
- matcher 0.12.16 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.5.0 [collection]
- meta 1.9.1
- mime 1.0.4
- multicast_dns 0.3.2+4 [meta]
- path 1.8.3
- path_provider 2.1.1 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows]
- path_provider_android 2.2.1 [flutter path_provider_platform_interface]
- path_provider_foundation 2.3.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.1 [flutter platform plugin_platform_interface]
- path_provider_windows 2.2.1 [ffi flutter path path_provider_platform_interface win32]
- permission_handler_android 11.1.0 [flutter permission_handler_platform_interface]
- permission_handler_apple 9.1.4 [flutter permission_handler_platform_interface]
- permission_handler_platform_interface 3.12.0 [flutter meta plugin_platform_interface]
- permission_handler_windows 0.1.3 [flutter permission_handler_platform_interface]
- petitparser 5.4.0 [meta]
- platform 3.1.0
- plugin_platform_interface 2.1.6 [meta]
- process 4.2.4 [file path platform]
- push_android 0.1.1 [flutter push_platform_interface]
- push_ios 0.1.4 [flutter push_platform_interface]
- push_macos 0.0.1 [flutter cupertino_icons]
- push_platform_interface 0.2.0 [flutter plugin_platform_interface]
- qr 3.0.1 [meta]
- share_plus_platform_interface 3.3.1 [cross_file flutter meta mime plugin_platform_interface path_provider uuid]
- shared_preferences_android 2.2.1 [flutter shared_preferences_platform_interface]
- shared_preferences_foundation 2.3.4 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.3.2 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.3.1 [flutter plugin_platform_interface]
- shared_preferences_web 2.2.1 [flutter flutter_web_plugins shared_preferences_platform_interface]
- shared_preferences_windows 2.3.2 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- sky_engine 0.0.99
- source_span 1.10.0 [collection path term_glyph]
- sprintf 7.0.0
- stack_trace 1.11.0 [path]
- stream_channel 2.1.1 [async]
- string_scanner 1.2.0 [source_span]
- sync_http 0.3.1
- term_glyph 1.2.1
- test_api 0.6.0 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- timezone 0.9.2 [path]
- typed_data 1.3.2 [collection]
- url_launcher 6.2.1 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- url_launcher_android 6.2.0 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.2.0 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.1.0 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.1.0 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.2.0 [flutter plugin_platform_interface]
- url_launcher_web 2.2.0 [flutter flutter_web_plugins url_launcher_platform_interface]
- url_launcher_windows 3.1.0 [flutter url_launcher_platform_interface]
- uuid 4.2.1 [crypto sprintf meta]
- vector_math 2.1.4
- vm_service 11.7.1
- web 0.1.4-beta
- webdriver 3.0.2 [matcher path stack_trace sync_http]
- webview_flutter_android 3.12.1 [flutter webview_flutter_platform_interface]
- webview_flutter_platform_interface 2.6.0 [flutter meta plugin_platform_interface]
- webview_flutter_wkwebview 3.9.4 [flutter path webview_flutter_platform_interface]
- win32 5.0.9 [ffi]
- win32_registry 1.1.2 [ffi win32]
- xdg_directories 1.0.3 [meta path]
- xml 6.3.0 [collection meta petitparser]

---
atuljha3334 commented 1 year ago

ANY HELP WOULD BE GREATLY APPRECIATED!

danagbemava-nc commented 1 year ago

Hi @atuljha3334, when did you start experiencing this issue?

google-oss-bot commented 12 months ago

Hey @atuljha3334. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 11 months ago

Since there haven't been any recent updates here, I am going to close this issue.

@atuljha3334 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.