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

πŸ› [Firebase Auth] Build failing on iOS. Precompiled application could not be built #12039

Closed AlfredAfutu closed 10 months ago

AlfredAfutu commented 10 months ago

Bug report

Describe the bug I am unable to build and run my application on iOS. It runs successfully on android but when I run it on iOS, I get the error:

Could not build the precompiled application for the device.
Parse Issue (Xcode): Expected a type
/.pub-cache/hosted/pub.dev/firebase_auth-4.15.2/ios/Classes/Private/PigeonParser.h:22:59

Parse Issue (Xcode): Expected a type
/.pub-cache/hosted/pub.dev/firebase_auth-4.15.2/ios/Classes/PigeonParser.m:81:43

Semantic Issue (Xcode): Property 'sharedSecretKey' not found on object of type '__strong id'
/.pub-cache/hosted/pub.dev/firebase_auth-4.15.2/ios/Classes/PigeonParser.m:86:62

Steps to reproduce

Steps to reproduce the behavior:

When i run flutter doctor -v, it looks good to me:

[βœ“] Flutter (Channel stable, 3.16.4, on macOS 14.0 23A344 darwin-arm64, locale en-US)
    β€’ Flutter version 3.16.4 on channel stable at /codelab/flutter
    β€’ Upstream repository https://github.com/flutter/flutter.git
    β€’ Framework revision 2e9cb0aa71 (3 days ago), 2023-12-11 14:35:13 -0700
    β€’ Engine revision 54a7145303
    β€’ Dart version 3.2.3
    β€’ DevTools version 2.28.4

[βœ“] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    β€’ Android SDK at /Library/Android/sdk
    β€’ Platform android-34, build-tools 34.0.0
    β€’ ANDROID_HOME = /Library/Android/sdk
    β€’ Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    β€’ Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    β€’ All Android licenses accepted.

[βœ“] Xcode - develop for iOS and macOS (Xcode 15.0.1)
    β€’ Xcode at /Applications/Xcode.app/Contents/Developer
    β€’ Build 15A507
    β€’ CocoaPods version 1.13.0

[βœ“] Chrome - develop for the web
    β€’ Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[βœ“] Android Studio (version 2023.1)
    β€’ 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 17.0.7+0-17.0.7b1000.6-10550314)

[βœ“] VS Code (version 1.84.2)
    β€’ VS Code at /Applications/Visual Studio Code.app/Contents
    β€’ Flutter extension version 3.78.0

[βœ“] VS Code (version 1.73.1)
    β€’ VS Code at /Downloads/Visual Studio Code.app/Contents
    β€’ Flutter extension version 3.78.0

[βœ“] Connected device (5 available)
    β€’ SM S901B (mobile)        β€’ RFCT80P12BN                              β€’ android-arm64  β€’ Android 14 (API 34)
    β€’ Alfred’s iPhone (mobile) β€’ 0d1104b00fa376bf158890b9e5ba007d2f22b784 β€’ ios            β€’ iOS 14.7.1 18G82
    β€’ iPhone 15 (mobile)       β€’ 7FA2E5E2-7790-4807-B545-52BF3BD6E765     β€’ ios            β€’ com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
    β€’ macOS (desktop)          β€’ macos                                    β€’ darwin-arm64   β€’ macOS 14.0 23A344 darwin-arm64
    β€’ Chrome (web)             β€’ chrome                                   β€’ web-javascript β€’ Google Chrome 120.0.6099.109

[βœ“] Network resources
    β€’ All expected network resources are available.

Expected behavior

I expect the build to be successful and run on my iOS device.

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 ``` [βœ“] Flutter (Channel stable, 3.16.4, on macOS 14.0 23A344 darwin-arm64, locale en-US) [βœ“] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [βœ“] Xcode - develop for iOS and macOS (Xcode 15.0.1) [βœ“] Chrome - develop for the web [βœ“] Android Studio (version 2023.1) [βœ“] VS Code (version 1.84.2) [βœ“] VS Code (version 1.73.1) [βœ“] Connected device (5 available) [βœ“] Network resources β€’ No issues found! ```

Flutter dependencies

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

Click To Expand ``` Dart SDK 3.2.3 Flutter SDK 3.16.4 App 1.2.0+14 dependencies: - analyzer 5.13.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - badges 3.1.2 [flutter] - cached_network_image 3.3.0 [cached_network_image_platform_interface cached_network_image_web flutter flutter_cache_manager octo_image] - cloud_firestore 4.13.5 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - collection 1.18.0 - counter 0.2.2 [flutter] - country_code_picker 3.0.0 [flutter collection] - crypto 3.0.3 [typed_data] - cupertino_icons 1.0.5 - customizable_counter 1.0.4 [flutter] - email_validator 2.1.17 - equatable 2.0.5 [collection meta] - firebase_analytics 10.7.4 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_core 2.24.2 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 3.4.8 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_dynamic_links 5.4.8 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_messaging 14.7.8 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_ui_auth 1.11.0 [email_validator firebase_auth firebase_core firebase_dynamic_links firebase_ui_localizations firebase_ui_oauth firebase_ui_shared flutter flutter_localizations meta] - firebase_ui_oauth_apple 1.2.15 [firebase_auth firebase_ui_oauth flutter] - firebase_ui_oauth_google 1.2.15 [firebase_auth firebase_ui_oauth flutter google_sign_in] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math web sky_engine] - flutter_bounce 1.1.0 [flutter] - flutter_dotenv 5.0.2 [flutter] - flutter_html 3.0.0-beta.2 [html csslib collection list_counter flutter] - flutter_html_table 3.0.0-beta.2 [flutter html flutter_html flutter_layout_grid] - flutter_local_notifications 15.1.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 web] - flutter_svg 2.0.9 [flutter vector_graphics vector_graphics_codec vector_graphics_compiler] - geocoding 2.1.0 [flutter geocoding_platform_interface geocoding_android geocoding_ios] - geolocator 10.1.0 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows] - get_it 7.6.0 [async collection] - google_fonts 4.0.5 [flutter http path_provider crypto] - google_sign_in 6.2.1 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web] - graphql_flutter 5.2.0-beta.6 [graphql gql_exec flutter meta path_provider path connectivity_plus hive plugin_platform_interface flutter_hooks] - hive 2.2.3 [meta crypto] - hive_generator 2.0.0 [build source_gen hive analyzer source_helper] - http 1.1.0 [async http_parser meta] - injectable 2.1.1 [get_it] - intl 0.18.1 [clock meta path] - loading_animation_widget 1.2.0+4 [flutter] - logging 1.1.1 - mockito 5.4.1 [analyzer build code_builder collection dart_style matcher meta path source_gen test_api] - path 1.8.3 - provider 6.0.5 [collection flutter nested] - rxdart 0.27.7 - shared_preferences 2.1.1 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - shimmer 2.0.0 [flutter] - sign_in_with_apple 5.0.0 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web] - sqflite 2.2.8+4 [flutter sqflite_common path] - timezone 0.9.2 [path] - tuple 2.0.1 - url_launcher 6.1.11 [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.7 [crypto] - visibility_detector 0.4.0+2 [flutter] - webview_flutter 4.2.1 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview] dev dependencies: - build_runner 2.4.4 [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_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_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] - graphql_codegen 0.13.10 [gql build glob code_builder dart_style built_collection path gql_code_builder recase json_annotation] - injectable_generator 2.1.5 [build source_gen path glob analyzer code_builder dart_style injectable collection recase] - json_serializable 6.7.0 [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper] dependency overrides: - meta 1.11.0 transitive dependencies: - _fe_analyzer_shared 61.0.0 [meta] - _flutterfire_internals 1.3.16 [collection firebase_core firebase_core_platform_interface flutter meta] - args 2.4.1 - async 2.11.0 [collection meta] - boolean_selector 2.1.1 [source_span string_scanner] - build 2.4.0 [analyzer async convert crypto glob logging meta package_config path] - build_config 1.1.1 [checked_yaml json_annotation path pubspec_parse yaml] - build_daemon 4.0.0 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 2.2.0 [analyzer async build collection crypto graphs logging path package_config pool pub_semver stream_transform yaml] - build_runner_core 7.2.8 [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.6.0 [built_collection collection fixnum meta] - cached_network_image_platform_interface 3.0.0 [flutter flutter_cache_manager] - cached_network_image_web 1.1.0 [cached_network_image_platform_interface flutter flutter_cache_manager] - characters 1.3.0 - checked_yaml 2.0.3 [json_annotation source_span yaml] - clock 1.1.1 - cloud_firestore_platform_interface 6.0.9 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 3.8.9 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - code_builder 4.8.0 [built_collection built_value collection matcher meta] - connectivity_plus 5.0.2 [flutter flutter_web_plugins connectivity_plus_platform_interface js meta nm] - connectivity_plus_platform_interface 1.2.4 [flutter meta plugin_platform_interface] - convert 3.1.1 [typed_data] - csslib 0.17.3 [source_span] - dart_style 2.3.1 [analyzer args path pub_semver source_span] - dbus 0.7.8 [args ffi meta xml] - desktop_webview_auth 0.0.14 [crypto flutter http flutter_web_plugins plugin_platform_interface] - fake_async 1.3.1 [clock collection] - ffi 2.1.0 - file 6.1.4 [meta path] - firebase_analytics_platform_interface 3.8.4 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.5.5+11 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth 4.15.2 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_auth_platform_interface 7.0.8 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.8.11 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser js meta] - firebase_core_platform_interface 5.0.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.10.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_crashlytics_platform_interface 3.6.16 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_dynamic_links_platform_interface 0.2.6+16 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 4.5.17 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.5.17 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - firebase_ui_localizations 1.9.0 [flutter flutter_localizations path] - firebase_ui_oauth 1.4.15 [desktop_webview_auth firebase_auth firebase_ui_auth firebase_ui_shared flutter_svg flutter] - firebase_ui_shared 1.4.1 [flutter] - fixnum 1.1.0 - flutter_cache_manager 3.3.1 [clock collection file flutter http path path_provider rxdart sqflite uuid] - flutter_hooks 0.18.6 [flutter] - flutter_layout_grid 2.0.5 [flutter collection meta quiver] - 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_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math web] - frontend_server_client 3.2.0 [async path] - geocoding_android 2.1.0 [flutter geocoding_platform_interface] - geocoding_ios 2.1.0 [flutter geocoding_platform_interface] - geocoding_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - geolocator_android 4.3.1 [flutter geolocator_platform_interface uuid] - geolocator_apple 2.3.2 [flutter geolocator_platform_interface] - geolocator_platform_interface 4.1.0 [flutter plugin_platform_interface vector_math meta] - geolocator_web 2.2.0 [flutter flutter_web_plugins geolocator_platform_interface] - geolocator_windows 0.2.1 [flutter geolocator_platform_interface] - glob 2.1.2 [async collection file path string_scanner] - google_identity_services_web 0.2.2 [js meta] - google_sign_in_android 6.1.14 [flutter google_sign_in_platform_interface] - google_sign_in_ios 5.7.0 [flutter google_sign_in_platform_interface pigeon] - google_sign_in_platform_interface 2.4.0 [flutter plugin_platform_interface quiver] - google_sign_in_web 0.12.2+1 [flutter flutter_web_plugins google_identity_services_web google_sign_in_platform_interface http js] - gql 1.0.1-alpha+1700868214564 [collection meta source_span yaml] - gql_code_builder 0.9.1+1 [analyzer built_collection built_value code_builder collection gql gql_exec path gql_tristate_value] - gql_dedupe_link 2.0.4-alpha+1700868214643 [async gql_exec gql_link meta] - gql_error_link 1.0.0+1 [async gql_exec gql_link meta] - gql_exec 1.1.1-alpha+1699813812660 [collection gql meta] - gql_http_link 1.0.1+1 [gql gql_exec gql_link http http_parser meta] - gql_link 1.0.1-alpha+1700868214578 [gql gql_exec meta] - gql_transform_link 1.0.0 [gql_exec gql_link] - gql_tristate_value 1.0.0 - graphql 5.2.0-beta.6 [meta path gql gql_exec gql_link gql_http_link gql_transform_link gql_error_link gql_dedupe_link hive normalize http collection web_socket_channel stream_channel rxdart uuid] - graphs 2.3.0 [collection] - html 0.15.3 [csslib source_span] - http_multi_server 3.2.1 [async] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - io 1.0.4 [meta path string_scanner] - js 0.6.7 [meta] - json_annotation 4.8.1 [meta] - list_counter 1.0.2 - matcher 0.12.16 [async meta stack_trace term_glyph test_api] - material_color_utilities 0.5.0 [collection] - mime 1.0.4 - nested 1.0.0 [flutter] - nm 0.5.0 [dbus] - normalize 0.8.2+1 [gql collection] - octo_image 2.0.0 [flutter] - package_config 2.1.0 [path] - path_parsing 1.0.1 [vector_math meta] - path_provider 2.0.15 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - path_provider_android 2.0.27 [flutter path_provider_platform_interface] - path_provider_foundation 2.2.3 [flutter path_provider_platform_interface] - path_provider_linux 2.1.11 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_platform_interface 2.0.6 [flutter platform plugin_platform_interface] - path_provider_windows 2.1.7 [ffi flutter path path_provider_platform_interface win32] - petitparser 5.4.0 [meta] - pigeon 11.0.1 [analyzer args collection meta path yaml] - platform 3.1.0 - plugin_platform_interface 2.1.4 [meta] - pool 1.5.1 [async stack_trace] - process 4.2.4 [file path platform] - pub_semver 2.1.4 [collection meta] - pubspec_parse 1.2.3 [checked_yaml collection json_annotation pub_semver yaml] - quiver 3.2.1 [matcher] - recase 4.1.0 - shared_preferences_android 2.1.4 [flutter shared_preferences_platform_interface] - shared_preferences_foundation 2.2.2 [flutter shared_preferences_platform_interface] - shared_preferences_linux 2.2.0 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface] - shared_preferences_platform_interface 2.2.0 [flutter plugin_platform_interface] - shared_preferences_web 2.1.0 [flutter flutter_web_plugins shared_preferences_platform_interface] - shared_preferences_windows 2.2.0 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - shelf 1.4.1 [async collection http_parser path stack_trace stream_channel] - shelf_web_socket 1.0.4 [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.3.2 [analyzer async build dart_style glob path source_span yaml] - source_helper 1.3.3 [analyzer collection source_gen] - source_span 1.10.0 [collection path term_glyph] - sqflite_common 2.4.5 [synchronized path meta] - stack_trace 1.11.1 [path] - stream_channel 2.1.2 [async] - stream_transform 2.1.0 - string_scanner 1.2.0 [source_span] - synchronized 3.1.0 - term_glyph 1.2.1 - test_api 0.6.1 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph] - timing 1.0.1 [json_annotation] - typed_data 1.3.2 [collection] - url_launcher_android 6.0.34 [flutter url_launcher_platform_interface] - url_launcher_ios 6.1.4 [flutter url_launcher_platform_interface] - url_launcher_linux 3.0.5 [flutter url_launcher_platform_interface] - url_launcher_macos 3.0.5 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.1.2 [flutter plugin_platform_interface] - url_launcher_web 2.0.17 [flutter flutter_web_plugins url_launcher_platform_interface] - url_launcher_windows 3.0.6 [flutter url_launcher_platform_interface] - vector_graphics 1.1.9+1 [flutter vector_graphics_codec] - vector_graphics_codec 1.1.9+1 - vector_graphics_compiler 1.1.9+1 [args meta path_parsing xml vector_graphics_codec path] - vector_math 2.1.4 - watcher 1.1.0 [async path] - web 0.3.0 - web_socket_channel 2.4.0 [async crypto stream_channel] - webview_flutter_android 3.7.1 [flutter webview_flutter_platform_interface] - webview_flutter_platform_interface 2.3.1 [flutter meta plugin_platform_interface] - webview_flutter_wkwebview 3.4.4 [flutter path webview_flutter_platform_interface] - win32 5.0.7 [ffi] - xdg_directories 1.0.0 [meta path process] - xml 6.3.0 [collection meta petitparser] - yaml 3.1.2 [collection source_span string_scanner] ```

darshankawar commented 10 months ago

Thanks for the report @AlfredAfutu I believe you are getting these errors because you don't seem to be on latest firebase-ios-sdk version which is 10.18.0. You need to upgrade to it and re-run which should resolve the issue.

https://github.com/firebase/flutterfire/pull/11916

Closing, as upgrading to latest is the solution. If you disagree, write in comments and I'll reopen it.

AlfredAfutu commented 10 months ago

Thanks for the report @AlfredAfutu I believe you are getting these errors because you don't seem to be on latest firebase-ios-sdk version which is 10.18.0. You need to upgrade to it and re-run which should resolve the issue.

11916

Closing, as upgrading to latest is the solution. If you disagree, write in comments and I'll reopen it.

Upgrading to 10.18.0 actually resolves it. Thank you.