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

🐛 [flutterfire_ui] iOS build not running #8304

Closed varunbhalerao56 closed 2 years ago

varunbhalerao56 commented 2 years ago

Bug report

Describe the bug Hello, I am using the package on Flutter 2.10.3 and it is not building on iOS giving the following error.

Error connecting to the service protocol: failed to connect to http://127.0.0.1:54569/E6Fy8-vdPKU=/

At first, I did not think of this error being related to this package but if I remove this package I do not get this error. I am currently using the iOS Simulator running iOS 15 on it.

Steps to reproduce

Steps to reproduce the behavior:

  firebase_auth: ^3.3.11
  firebase_core: 1.12.0
  firebase_crashlytics: ^2.2.2
  firebase_database: ^9.0.8
  firebase_dynamic_links: ^4.1.1
  firebase_messaging: ^11.2.11
  flutterfire_ui: 0.3.5
  1. Create a project with the mentioned package versions.
  2. Try to run the project on an iOS simulator

Expected behavior

The build is successful and the app launches without crashing directly.


Additional context

The app works on android fine without any issues. The app also builds on iOS if the package version is 0.3.1 but doing so gives the following error:

This is why I have updated to 3.5 as that fixes this issue.

: Error: The argument type 'String?' can't be assigned to the parameter type 'String' because 'String?' is nullable and 'String' isn't.
../…/providers/twitter_provider.dart:61
      accessToken: result.accessToken,
                          ^
: Error: The argument type 'String?' can't be assigned to the parameter type 'String' because 'String?' is nullable and 'String' isn't.
../…/providers/facebook_provider.dart:52
    return FacebookAuthProvider.credential(result.accessToken);
                                                  ^

: Error: The argument type 'String?' can't be assigned to the parameter type 'String' because 'String?' is nullable and 'String' isn't.
../…/providers/facebook_provider.dart:52
    return FacebookAuthProvider.credential(result.accessToken);
                                                  ^
: Error: The argument type 'String?' can't be assigned to the parameter type 'String' because 'String?' is nullable and 'String' isn't.
../…/providers/twitter_provider.dart:61
      accessToken: result.accessToken,

Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` [✓] Flutter (Channel stable, 2.10.3, on macOS 12.3 21E5196i darwin-arm, locale en-SG) • Flutter version 2.10.3 at /Users/skywar56/Documents/Flutter/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 7e9793dee1 (2 weeks ago), 2022-03-02 11:23:12 -0600 • Engine revision bd539267b4 • Dart version 2.16.1 • DevTools version 2.9.2 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Users/skywar56/Library/Android/sdk • Platform android-31, build-tools 30.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 13.1) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2020.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) [✓] VS Code (version 1.66.0-insider) • VS Code at /Applications/Visual Studio Code - Insiders.app/Contents • Flutter extension version 3.36.0 [✓] Connected device (2 available) • iPhone 13 Pro (mobile) • 170E8A29-1F09-43E3-B9C4-E18D769CE2A5 • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator) • Chrome (web) • chrome • web-javascript • Google Chrome 99.0.4844.74 [✓] HTTP Host Availability • All required HTTP hosts are available ```

Flutter dependencies

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

Click To Expand ``` dependencies: - animated_text_kit 4.2.1 [flutter characters] - badges 2.0.2 [flutter] - bubble 1.2.1 [flutter] - cached_network_image 3.2.0 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web] - crypto 3.0.1 [collection typed_data] - cupertino_icons 1.0.4 - device_info_plus 2.2.0 [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] - firebase_auth 3.3.11 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 1.12.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 2.5.3 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_database 9.0.8 [firebase_core firebase_core_platform_interface firebase_database_platform_interface firebase_database_web flutter] - firebase_dynamic_links 4.1.1 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_messaging 11.2.11 [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 typed_data vector_math sky_engine] - flutter_app_badger 1.3.0 [flutter] - flutter_cache_manager 3.3.0 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid] - flutter_image_compress 1.1.0 [flutter] - flutter_launcher_icons 0.9.2 [args image path yaml] - flutter_local_notifications 8.2.0 [flutter flutter_local_notifications_platform_interface platform timezone] - flutter_secure_storage 4.2.1 [meta flutter] - flutterfire_ui 0.3.5 [cloud_firestore collection crypto desktop_webview_auth email_validator firebase_auth firebase_core firebase_database firebase_dynamic_links flutter flutter_facebook_auth flutter_localizations flutter_svg google_sign_in sign_in_with_apple twitter_login] - font_awesome_flutter 9.2.0 [flutter] - geolocator 7.7.1 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web] - get 4.6.1 [flutter] - getwidget 2.0.5 [flutter] - google_fonts 2.3.1 [flutter http path_provider crypto] - google_maps_flutter 2.1.2 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface] - hive 2.0.6 [meta crypto] - hive_flutter 1.1.0 [flutter hive path_provider path] - http 0.13.4 [async http_parser meta path] - image_cropper 1.5.0 [flutter] - image_picker 0.8.4+11 [flutter flutter_plugin_android_lifecycle image_picker_for_web image_picker_platform_interface] - intl 0.17.0 [clock path] - intl_phone_number_input 0.7.0+2 [flutter meta libphonenumber_plugin equatable collection] - json_annotation 4.1.0 [meta] - logger 1.1.0 - marquee 2.2.1 [fading_edge_scrollview flutter] - material_floating_search_bar 0.3.7 [flutter meta] - package_info_plus 1.4.0 [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.9 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows] - phoenix_socket 0.5.3 [collection equatable logging meta pedantic quiver rxdart web_socket_channel] - pin_code_fields 7.3.0 [flutter] - retry 3.1.0 - sentry_flutter 6.4.0 [flutter flutter_web_plugins sentry package_info_plus meta] - shared_preferences 2.0.13 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - sign_in_with_apple 3.3.0 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web] - social_share 2.2.1 [flutter path_provider] - url_launcher 6.0.20 [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] dev dependencies: - build_runner 2.1.8 [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_lints 1.0.4 [lints] - 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 typed_data] - hive_generator 1.1.2 [build source_gen hive analyzer source_helper] - json_serializable 4.1.4 [analyzer build build_config collection json_annotation meta path source_gen] transitive dependencies: - _fe_analyzer_shared 22.0.0 [meta] - analyzer 1.7.2 [_fe_analyzer_shared cli_util collection convert crypto glob meta package_config path pub_semver source_span watcher yaml pedantic] - archive 3.2.2 [crypto path] - args 2.3.0 - async 2.8.2 [collection meta] - boolean_selector 2.1.0 [source_span string_scanner] - build 2.2.1 [analyzer async convert crypto glob logging meta path] - build_config 1.0.0 [checked_yaml json_annotation path pubspec_parse yaml] - build_daemon 3.0.1 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 2.0.4 [analyzer async build crypto graphs logging path package_config pool pub_semver stream_transform yaml] - build_runner_core 7.2.2 [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.1.4 [built_collection collection fixnum meta] - cached_network_image_platform_interface 1.0.0 [flutter flutter_cache_manager] - cached_network_image_web 1.0.1 [flutter flutter_cache_manager cached_network_image_platform_interface] - characters 1.2.0 - charcode 1.3.1 - checked_yaml 2.0.1 [json_annotation source_span yaml] - cli_util 0.3.5 [meta path] - clock 1.1.0 - cloud_firestore 3.1.10 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - cloud_firestore_platform_interface 5.5.1 [collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 2.6.10 [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.15.0 - convert 3.0.1 [typed_data] - cross_file 0.3.2 [flutter js meta] - dart_style 2.1.1 [analyzer args path pub_semver source_span] - desktop_webview_auth 0.0.6 [crypto flutter http] - device_info_plus_linux 2.1.1 [device_info_plus_platform_interface file flutter meta] - device_info_plus_macos 2.2.2 [device_info_plus_platform_interface flutter] - device_info_plus_platform_interface 2.3.0+1 [flutter meta plugin_platform_interface] - device_info_plus_web 2.1.0 [device_info_plus_platform_interface flutter_web_plugins flutter] - device_info_plus_windows 2.1.1 [device_info_plus_platform_interface ffi flutter win32] - email_validator 2.0.1 - fading_edge_scrollview 2.0.1 [flutter] - fake_async 1.2.0 [clock collection] - ffi 1.1.2 - file 6.1.2 [meta path] - firebase_auth_platform_interface 6.2.1 [firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 3.3.9 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.2.5 [collection flutter meta plugin_platform_interface] - firebase_core_web 1.6.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_crashlytics_platform_interface 3.2.1 [collection firebase_core flutter meta plugin_platform_interface] - firebase_database_platform_interface 0.2.1+1 [collection firebase_core flutter meta plugin_platform_interface] - firebase_database_web 0.2.0+7 [firebase_core firebase_core_web firebase_database_platform_interface flutter flutter_web_plugins js] - firebase_dynamic_links_platform_interface 0.2.2+1 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 3.2.1 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 2.2.9 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - fixnum 1.0.0 - flutter_blurhash 0.6.4 [flutter] - flutter_facebook_auth 3.5.7 [flutter flutter_facebook_auth_platform_interface flutter_facebook_auth_web] - flutter_facebook_auth_platform_interface 2.7.1 [flutter plugin_platform_interface] - flutter_facebook_auth_web 2.6.0+2 [flutter flutter_web_plugins js flutter_facebook_auth_platform_interface] - flutter_local_notifications_platform_interface 4.0.1 [flutter plugin_platform_interface] - flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path typed_data vector_math] - flutter_plugin_android_lifecycle 2.0.5 [flutter] - flutter_svg 1.0.3 [flutter meta path_drawing vector_math xml] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta typed_data vector_math] - frontend_server_client 2.1.2 [async path] - geolocator_android 2.1.0 [flutter geolocator_platform_interface] - geolocator_apple 1.2.2 [flutter geolocator_platform_interface] - geolocator_platform_interface 2.3.6 [flutter plugin_platform_interface vector_math meta] - geolocator_web 2.0.6 [flutter flutter_web_plugins geolocator_platform_interface] - glob 2.0.2 [async collection file path string_scanner] - google_maps_flutter_platform_interface 2.1.5 [collection flutter plugin_platform_interface stream_transform] - google_sign_in 5.2.4 [flutter google_sign_in_platform_interface google_sign_in_web] - google_sign_in_platform_interface 2.1.2 [flutter quiver] - google_sign_in_web 0.10.0+5 [flutter flutter_web_plugins google_sign_in_platform_interface js] - graphs 2.1.0 [collection] - http_multi_server 3.2.0 [async] - http_parser 4.0.0 [charcode collection source_span string_scanner typed_data] - image 3.1.3 [archive meta xml] - image_picker_for_web 2.1.6 [flutter flutter_web_plugins image_picker_platform_interface] - image_picker_platform_interface 2.4.4 [cross_file flutter http plugin_platform_interface] - io 1.0.3 [meta path string_scanner] - js 0.6.3 - libphonenumber 2.0.2 [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] - lints 1.0.1 - logging 1.0.2 - matcher 0.12.11 [stack_trace] - material_color_utilities 0.1.3 - meta 1.7.0 - mime 1.0.1 - octo_image 1.0.1 [flutter flutter_blurhash] - package_config 2.0.2 [path] - package_info_plus_linux 1.0.3 [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.4 [flutter flutter_web_plugins http meta package_info_plus_platform_interface] - package_info_plus_windows 1.0.4 [package_info_plus_platform_interface ffi flutter win32] - path 1.8.0 - path_drawing 1.0.0 [vector_math meta path_parsing flutter] - path_parsing 1.0.0 [vector_math meta] - path_provider_android 2.0.12 [flutter path_provider_platform_interface] - path_provider_ios 2.0.8 [flutter path_provider_platform_interface] - path_provider_linux 2.1.5 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_macos 2.0.5 [flutter path_provider_platform_interface] - path_provider_platform_interface 2.0.3 [flutter platform plugin_platform_interface] - path_provider_windows 2.0.5 [ffi flutter path path_provider_platform_interface win32] - pedantic 1.11.1 - 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] - pub_semver 2.1.1 [collection meta] - pubspec_parse 1.1.0 [checked_yaml collection json_annotation pub_semver yaml] - quiver 3.0.1+1 [matcher] - rxdart 0.27.3 - sentry 6.4.0 [http meta stack_trace uuid] - shared_preferences_android 2.0.11 [flutter shared_preferences_platform_interface] - shared_preferences_ios 2.1.0 [flutter shared_preferences_platform_interface] - shared_preferences_linux 2.1.0 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface] - shared_preferences_macos 2.0.3 [flutter shared_preferences_platform_interface] - shared_preferences_platform_interface 2.0.0 [flutter] - shared_preferences_web 2.0.3 [flutter flutter_web_plugins shared_preferences_platform_interface] - shared_preferences_windows 2.1.0 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - shelf 1.2.0 [async collection http_parser path stack_trace stream_channel] - 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.0.3 [analyzer async build dart_style glob meta path pedantic source_span yaml] - source_helper 1.3.0 [analyzer collection source_gen] - source_span 1.8.1 [collection path term_glyph] - sqflite 2.0.2 [flutter sqflite_common path] - sqflite_common 2.2.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] - synchronized 3.0.0 - term_glyph 1.2.0 - test_api 0.4.8 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - timezone 0.8.0 [path] - timing 1.0.0 [json_annotation] - twitter_login 4.0.1 [flutter crypto http] - typed_data 1.3.0 [collection] - url_launcher_android 6.0.15 [flutter url_launcher_platform_interface] - url_launcher_ios 6.0.15 [flutter url_launcher_platform_interface] - url_launcher_linux 3.0.0 [flutter url_launcher_platform_interface] - url_launcher_macos 3.0.0 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.0.5 [flutter plugin_platform_interface] - url_launcher_web 2.0.9 [flutter flutter_web_plugins url_launcher_platform_interface] - url_launcher_windows 3.0.0 [flutter url_launcher_platform_interface] - vector_math 2.1.1 - watcher 1.0.1 [async path] - web_socket_channel 2.1.0 [async crypto stream_channel] - win32 2.4.1 [ffi] - xdg_directories 0.2.0+1 [meta path process] - xml 5.3.1 [collection meta petitparser] - yaml 3.1.0 [collection source_span string_scanner] ```

darshankawar commented 2 years ago

Error connecting to the service protocol: failed to connect to http://127.0.0.1:54569/E6Fy8-vdPKU=/

Can you provide flutter run -v ? The log will be huge so you can put that in a text file and share it here.

Error: The argument type 'String?' can't be assigned to the parameter type 'String' because 'String?' is nullable and 'String' isn't. ../…/providers/twitter_provider.dart:61 accessToken: result.accessToken,

All these errors are pointing to flutterfire_ui plugin which seem to indicate some null safety conflicts. Can you upgrade this plugin to latest https://pub.dev/packages/flutterfire_ui/changelog#0361 and try again to see if you still get same errors ?

varunbhalerao56 commented 2 years ago

@darshankawar Yep tried all versions from 0.3.1. The issue seems to be the Twitter Provider and Facebook Provider.

I had to use the latest version cause I ran into this #8147 issue at first.

Extremely sorry but won't be able to generate a log cause I had to end up not using it due to a work deadline. Ended up using the google_sign_in and sign_in_with_apple instead.

(Will try to recreate it and generate a log once I reach home)

darshankawar commented 2 years ago

The null safety errors related to flutterfire_ui should be fixed already as you pointed out in linked issue. For your original issue, please provide verbose log so that we can debug further.

google-oss-bot commented 2 years ago

Hey @varunbhalerao56. 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!

JaredEzz commented 2 years ago

@varunbhalerao56 thank you for providing those other packages. I really wanted to use flutterfire_ui, but I can't get around the dependency issues with building on iOS

lesnitsky commented 2 years ago

This was fixed under #8147