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] Cannot build under iOS - 'messages.g.h' file not found #9511

Closed masewo closed 2 years ago

masewo commented 2 years ago

Bug report

Describe the bug Cannot build Flutter app for iOS when firebase_auth is as used as a dependency. When building my app I get following errors:

Running Xcode build...                                                  
Xcode build done.                                           10,9s
Failed to build iOS app
Error output from Xcode build:
↳
    2022-09-10 20:06:47.155 xcodebuild[46094:12493067] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
    2022-09-10 20:06:47.155 xcodebuild[46094:12493067] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
    ** BUILD FAILED **

Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/gb/7ddwt85s6ys4bz6krtnzc9mh0000gn/T/flutter_tools.O5DFo5/flutter_ios_build_temp_dirx1opoq/temporary_xcresult_bundle

    In file included from /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.8.0/ios/Classes/FLTIdTokenChannelStreamHandler.m:6:
    /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.8.0/ios/Classes/Public/FLTFirebaseAuthPlugin.h:17:9: fatal error: 'messages.g.h' file not found
    #import "messages.g.h"
            ^~~~~~~~~~~~~~
    1 error generated.
    In file included from /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.8.0/ios/Classes/FLTAuthStateChannelStreamHandler.m:6:
    /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.8.0/ios/Classes/Public/FLTFirebaseAuthPlugin.h:17:9: fatal error: 'messages.g.h' file not found
    #import "messages.g.h"
            ^~~~~~~~~~~~~~
    1 error generated.
    In file included from /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.8.0/ios/Classes/FLTPhoneNumberVerificationStreamHandler.m:6:
    /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.8.0/ios/Classes/Public/FLTFirebaseAuthPlugin.h:17:9: fatal error: 'messages.g.h' file not found
    #import "messages.g.h"
            ^~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order

    Result bundle written to path:
        /var/folders/gb/7ddwt85s6ys4bz6krtnzc9mh0000gn/T/flutter_tools.O5DFo5/flutter_ios_build_temp_dirx1opoq/temporary_xcresult_bundle

Lexical or Preprocessor Issue (Xcode): 'messages.g.h' file not found
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.8.0/ios/Classes/Public/FLTFirebaseAuthPlugin.h:16:8

Encountered error while building for device.

Steps to reproduce

Steps to reproduce the behavior:

  1. Add firebase_auth and all the other dependencies listed below as dependencies
  2. Run flutter clean, flutter pub get, flutter build ios
Build log https://gist.github.com/masewo/b73b5c0dd09694b850167c0131d14023

Expected behavior

Builds successfully.


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.3.1, on macOS 12.5.1 21G83 darwin-arm, locale de) • Flutter version 3.3.1 on channel stable at /Applications/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 4f9d92fbbd (3 days ago), 2022-09-06 17:54:53 -0700 • Engine revision 3efdf03e73 • Dart version 2.18.0 • DevTools version 2.15.0 [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/marcus/Library/Android/sdk • Platform android-33, build-tools 31.0.0 • ANDROID_HOME = /Users/marcus/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 13.4.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 13F100 • CocoaPods version 1.11.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2021.2) • 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.12+0-b1504.28-7817840) [✓] Connected device (2 available) • macOS (desktop) • macos • darwin-arm64 • macOS 12.5.1 21G83 darwin-arm • Chrome (web) • chrome • web-javascript • Google Chrome 105.0.5195.102 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found! ```

Flutter dependencies

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

Click To Expand ``` Dart SDK 2.18.0 Flutter SDK 3.3.1 app 1.0.0+1 dependencies: - android_id 0.0.7 [flutter] - auto_size_text 3.0.0 [flutter] - back_button_interceptor 6.0.1 [collection flutter] - barcode_widget 2.0.3 [barcode flutter] - cached_network_image 3.2.2 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web] - camera 0.10.0+1 [camera_android camera_avfoundation camera_platform_interface camera_web flutter flutter_plugin_android_lifecycle quiver] - characters 1.2.1 - cloud_firestore 3.4.7 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - confetti 0.7.0 [flutter vector_math] - crypto 3.0.2 [typed_data] - csv 5.0.1 - cupertino_icons 1.0.5 - device_info_plus 4.1.2 [flutter device_info_plus_platform_interface device_info_plus_macos device_info_plus_linux device_info_plus_web device_info_plus_windows] - equatable 2.0.5 [collection meta] - expandable 5.0.1 [flutter] - extended_image 6.3.0 [extended_image_library flutter meta] - extended_nested_scroll_view 5.1.3 [flutter visibility_detector] - file_selector 0.9.2 [file_selector_ios file_selector_linux file_selector_macos file_selector_platform_interface file_selector_web file_selector_windows flutter] - firebase_analytics 9.3.4 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 3.8.0 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 1.22.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_core_platform_interface 4.5.1 [collection flutter flutter_test meta plugin_platform_interface] - firebase_crashlytics 2.8.10 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_messaging 13.0.1 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_performance 0.8.3 [firebase_core firebase_core_platform_interface firebase_performance_platform_interface firebase_performance_web flutter] - firebase_remote_config 2.0.17 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter] - flare_flutter 3.0.2 [collection flutter meta] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine] - flutter_cache_manager 3.3.0 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid] - flutter_displaymode 0.4.0 [flutter] - flutter_driver 0.0.0 [file flutter flutter_test fuchsia_remote_debug_protocol path meta vm_service webdriver archive async boolean_selector characters clock collection crypto matcher material_color_utilities platform process source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math] - flutter_html 2.2.1 [html csslib flutter_layout_grid video_player chewie webview_flutter chewie_audio flutter_svg flutter_math_fork collection numerus flutter] - flutter_local_notifications 9.9.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] - flutter_quill 6.0.0 [flutter collection flutter_colorpicker flutter_keyboard_visibility quiver tuple url_launcher pedantic characters diff_match_patch i18n_extension device_info_plus platform] - flutter_screen_wake 1.0.2 [flutter] - flutter_secure_storage 6.0.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_spinkit 5.1.0 [flutter] - flutter_svg 1.1.5 [flutter meta path_drawing vector_math xml] - flutter_typeahead 4.1.0 [flutter flutter_keyboard_visibility] - flutter_web_auth 0.4.1 [flutter flutter_web_plugins] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - get_it 7.2.0 [async collection] - google_fonts 3.0.1 [flutter http path_provider crypto] - google_sign_in 5.4.1 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web] - html 0.15.0 [csslib source_span] - http 0.13.5 [async http_parser meta path] - http2 2.0.0 - iban 1.0.1 [mod97] - image_editor 1.1.0 [flutter] - image_picker 0.8.5+3 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_platform_interface] - image_pixels 3.0.0 [flutter] - in_app_review 2.0.4 [flutter in_app_review_platform_interface] - intl 0.17.0 [clock path] - introduction_screen 3.0.2 [flutter dots_indicator collection] - json_annotation 4.6.0 [meta] - loading_more_list 5.0.2 [extended_list extended_list_library flutter loading_more_list_library waterfall_flow] - loading_more_list_library 2.0.1 [meta] - local_auth 2.1.2 [flutter intl local_auth_android local_auth_ios local_auth_platform_interface local_auth_windows] - local_auth_android 1.0.12 [flutter flutter_plugin_android_lifecycle intl local_auth_platform_interface] - local_auth_ios 1.0.9 [flutter intl local_auth_platform_interface] - lottie 1.4.2 [archive flutter path vector_math] - lottie_license 0.0.1 [flutter] - modal_bottom_sheet 2.1.2 [flutter] - overlay_support 2.0.1 [flutter async] - package_info_plus 1.4.3+1 [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.2 - path_provider 2.0.11 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows] - pdf 3.8.3 [archive barcode crypto image meta path_parsing vector_math xml] - permission_handler 10.0.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface] - photo_manager 2.2.1 [flutter] - photo_view 0.14.0 [flutter] - printing 5.9.2 [ffi flutter flutter_web_plugins http image js meta pdf plugin_platform_interface] - provider 6.0.3 [collection flutter nested] - pull_to_refresh_notification 2.3.0 [flutter] - r_scan 0.1.6+1 [flutter] - receive_sharing_intent 1.4.5 [flutter] - scrollable_positioned_list 0.3.4 [flutter collection] - selectable_auto_size_text 0.0.1 [flutter] - share_plus 4.1.0 [meta mime flutter share_plus_platform_interface share_plus_linux share_plus_macos share_plus_windows share_plus_web] - shared_preferences 2.0.15 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - shared_preferences_android 2.0.13 [flutter shared_preferences_platform_interface] - shared_preferences_ios 2.1.1 [flutter shared_preferences_platform_interface] - shimmer 2.0.0 [flutter] - slide_container 1.1.2 [flutter] - sliding_sheet 0.5.2 [flutter] - slugify 2.0.0 - speech_to_text 5.6.1 [flutter speech_to_text_platform_interface json_annotation clock pedantic flutter_web_plugins meta js] - speech_to_text_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - sqflite 2.0.3+1 [flutter sqflite_common path] - swipeable_tile 2.0.0+2 [flutter] - synchronized 3.0.0+3 - timeago 3.3.0 [intl] - tutorial_coach_mark 1.2.4 [back_button_interceptor flutter] - uni_links 0.5.1 [flutter uni_links_platform_interface uni_links_web] - url_launcher 6.1.5 [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] - vibration 1.7.6 [flutter] dev dependencies: - build_runner 2.2.0 [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] - dependency_validator 3.2.2 [args build_config checked_yaml glob io json_annotation logging package_config path pub_semver pubspec_parse yaml] - flutter_launcher_icons 0.10.0 [args checked_yaml cli_util image json_annotation path yaml] - flutter_lints 2.0.1 [lints] - flutter_native_splash 2.2.9 [args flutter flutter_web_plugins html image js lint meta path universal_io xml yaml] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph] - integration_test 0.0.0 [flutter flutter_driver flutter_test path vm_service archive async boolean_selector characters clock collection crypto fake_async file matcher material_color_utilities meta source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math webdriver] - json_serializable 6.3.0-dev [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper] - mockito 5.3.0 [analyzer build code_builder collection dart_style matcher meta path source_gen test_api] - msix 3.6.3 [flutter args yaml path package_config get_it image cli_util cli_dialog pub_semver] - test 1.21.4 [analyzer async boolean_selector collection coverage http_multi_server io js node_preamble package_config path 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: - flutter_svg 1.1.5 [flutter meta path_drawing vector_math xml] - json_annotation 4.6.0 [meta] - json_serializable 6.3.0-dev [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper] transitive dependencies: - _fe_analyzer_shared 47.0.0 [meta] - analyzer 4.7.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 3.3.0 [crypto path] - args 2.3.1 - async 2.9.0 [collection meta] - barcode 2.2.3 [meta qr] - boolean_selector 2.1.0 [source_span string_scanner] - build 2.3.0 [analyzer async convert crypto glob logging meta path] - build_config 1.1.0 [checked_yaml json_annotation path pubspec_parse yaml] - build_daemon 3.1.0 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 2.0.9 [analyzer async build crypto graphs logging path package_config pool pub_semver stream_transform yaml] - build_runner_core 7.2.3 [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.4.1 [built_collection collection fixnum meta] - cached_network_image_platform_interface 2.0.0 [flutter flutter_cache_manager] - cached_network_image_web 1.0.2 [flutter flutter_cache_manager cached_network_image_platform_interface] - camera_android 0.10.0+2 [camera_platform_interface flutter flutter_plugin_android_lifecycle stream_transform] - camera_avfoundation 0.9.8+5 [camera_platform_interface flutter stream_transform] - camera_platform_interface 2.2.0 [cross_file flutter plugin_platform_interface stream_transform] - camera_web 0.3.0 [camera_platform_interface flutter flutter_web_plugins stream_transform] - checked_yaml 2.0.1 [json_annotation source_span yaml] - chewie 1.3.5 [cupertino_icons flutter provider video_player wakelock] - chewie_audio 1.3.0 [cupertino_icons flutter video_player] - cli_dialog 0.5.0 [dart_console] - cli_util 0.3.5 [meta path] - clock 1.1.1 - cloud_firestore_platform_interface 5.7.4 [collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 2.8.7 [cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - code_builder 4.2.0 [built_collection built_value collection matcher meta] - collection 1.16.0 - convert 3.0.2 [typed_data] - coverage 1.5.0 [args logging package_config path source_maps stack_trace vm_service] - cross_file 0.3.3+1 [js meta] - csslib 0.17.2 [source_span] - dart_console 1.1.2 [ffi win32 intl characters] - dart_style 2.2.3 [analyzer args path pub_semver source_span] - dbus 0.7.8 [args ffi meta xml] - device_info_plus_linux 3.0.0 [device_info_plus_platform_interface file flutter meta] - device_info_plus_macos 3.0.0 [device_info_plus_platform_interface flutter] - device_info_plus_platform_interface 3.0.0 [flutter meta plugin_platform_interface] - device_info_plus_web 3.0.0 [device_info_plus_platform_interface flutter_web_plugins flutter] - device_info_plus_windows 4.1.0 [device_info_plus_platform_interface ffi flutter win32] - diff_match_patch 0.4.1 - dots_indicator 2.1.0 [flutter] - extended_image_library 3.4.0 [crypto flutter http_client_helper path path_provider] - extended_list 3.0.0 [extended_list_library flutter] - extended_list_library 3.0.0 [flutter] - fake_async 1.3.1 [clock collection] - ffi 2.0.1 - file 6.1.2 [meta path] - file_selector_ios 0.5.0+1 [file_selector_platform_interface flutter] - file_selector_linux 0.9.0 [cross_file file_selector_platform_interface flutter] - file_selector_macos 0.9.0+1 [cross_file file_selector_platform_interface flutter] - file_selector_platform_interface 2.1.0 [cross_file flutter http plugin_platform_interface] - file_selector_web 0.9.0 [file_selector_platform_interface flutter flutter_web_plugins] - file_selector_windows 0.9.1+2 [cross_file file_selector_platform_interface flutter] - firebase 9.0.3 [http http_parser js] - firebase_analytics_platform_interface 3.3.4 [firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.4.2+4 [firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 6.7.0 [collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 4.4.0 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_web 1.7.2 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_crashlytics_platform_interface 3.2.16 [collection firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 4.1.4 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.1.4 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - firebase_performance_platform_interface 0.1.1+16 [firebase_core flutter plugin_platform_interface] - firebase_performance_web 0.1.1+5 [firebase firebase_core firebase_core_web firebase_performance_platform_interface flutter flutter_web_plugins js] - firebase_remote_config_platform_interface 1.1.16 [firebase_core flutter meta plugin_platform_interface] - firebase_remote_config_web 1.1.5 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins js] - fixnum 1.0.1 - flutter_blurhash 0.7.0 [flutter] - flutter_colorpicker 1.0.3 [flutter] - flutter_keyboard_visibility 5.3.0 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_web 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_layout_grid 1.0.6 [flutter collection meta quiver] - flutter_local_notifications_linux 0.5.1 [flutter flutter_local_notifications_platform_interface dbus path xdg_directories] - flutter_local_notifications_platform_interface 5.0.0 [flutter plugin_platform_interface] - flutter_math_fork 0.6.3+1 [flutter flutter_svg provider meta collection tuple] - flutter_plugin_android_lifecycle 2.0.7 [flutter] - flutter_secure_storage_linux 1.1.1 [flutter flutter_secure_storage_platform_interface] - flutter_secure_storage_macos 1.1.1 [flutter flutter_secure_storage_platform_interface] - flutter_secure_storage_platform_interface 1.0.0 [flutter plugin_platform_interface] - flutter_secure_storage_web 1.0.2 [flutter flutter_web_plugins flutter_secure_storage_platform_interface js] - flutter_secure_storage_windows 1.1.2 [flutter flutter_secure_storage_platform_interface] - frontend_server_client 2.1.3 [async path] - fuchsia_remote_debug_protocol 0.0.0 [process vm_service file meta path platform] - gettext_parser 0.2.0 - glob 2.1.0 [async collection file path string_scanner] - google_sign_in_android 6.1.0 [flutter google_sign_in_platform_interface] - google_sign_in_ios 5.5.0 [flutter google_sign_in_platform_interface] - google_sign_in_platform_interface 2.3.0 [flutter plugin_platform_interface quiver] - google_sign_in_web 0.10.2 [flutter flutter_web_plugins google_sign_in_platform_interface js] - graphs 2.1.0 [collection] - http_client_helper 2.0.3 [http] - http_multi_server 3.2.1 [async] - http_parser 4.0.1 [collection source_span string_scanner typed_data] - i18n_extension 5.0.1 [sprintf args analyzer gettext_parser equatable intl flutter] - image 3.2.0 [archive meta xml] - image_picker_android 0.8.5+3 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - image_picker_for_web 2.1.8 [flutter flutter_web_plugins image_picker_platform_interface] - image_picker_ios 0.8.6 [flutter image_picker_platform_interface] - image_picker_platform_interface 2.6.1 [cross_file flutter http plugin_platform_interface] - in_app_review_platform_interface 2.0.3 [flutter url_launcher plugin_platform_interface platform] - io 1.0.3 [meta path string_scanner] - js 0.6.4 - lint 1.10.0 - lints 2.0.0 - local_auth_platform_interface 1.0.4 [flutter intl plugin_platform_interface] - local_auth_windows 1.0.3 [flutter local_auth_platform_interface] - logging 1.0.2 - matcher 0.12.12 [stack_trace] - material_color_utilities 0.1.5 - meta 1.8.0 - mime 1.0.2 - mod97 1.0.0 - nested 1.0.0 [flutter] - node_preamble 2.0.1 - numerus 1.1.1 - octo_image 1.0.2 [flutter flutter_blurhash] - package_config 2.1.0 [path] - package_info_plus_linux 1.0.5 [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.5 [flutter flutter_web_plugins http meta package_info_plus_platform_interface] - package_info_plus_windows 2.1.0 [package_info_plus_platform_interface ffi flutter win32] - path_drawing 1.0.1 [vector_math meta path_parsing flutter] - path_parsing 1.0.1 [vector_math meta] - path_provider_android 2.0.20 [flutter path_provider_platform_interface] - path_provider_ios 2.0.11 [flutter path_provider_platform_interface] - path_provider_linux 2.1.7 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_macos 2.0.6 [flutter path_provider_platform_interface] - path_provider_platform_interface 2.0.4 [flutter platform plugin_platform_interface] - path_provider_windows 2.1.3 [ffi flutter path path_provider_platform_interface win32] - pedantic 1.11.1 - permission_handler_android 10.0.0 [flutter permission_handler_platform_interface] - permission_handler_apple 9.0.4 [flutter permission_handler_platform_interface] - permission_handler_platform_interface 3.7.0 [flutter meta plugin_platform_interface] - permission_handler_windows 0.1.0 [flutter permission_handler_platform_interface] - petitparser 5.0.0 [meta] - platform 3.1.0 - plugin_platform_interface 2.1.2 [meta] - pool 1.5.1 [async stack_trace] - process 4.2.4 [file path platform] - pub_semver 2.1.1 [collection meta] - pubspec_parse 1.2.1 [checked_yaml collection json_annotation pub_semver yaml] - qr 3.0.1 [meta] - quiver 3.1.0 [matcher] - rxdart 0.27.5 - share_plus_linux 3.0.0 [share_plus_platform_interface file flutter meta url_launcher] - share_plus_macos 3.0.1 [share_plus_platform_interface flutter] - share_plus_platform_interface 3.0.3 [flutter meta mime plugin_platform_interface] - share_plus_web 3.0.1 [share_plus_platform_interface url_launcher flutter flutter_web_plugins meta] - share_plus_windows 3.0.1 [share_plus_platform_interface flutter meta url_launcher] - shared_preferences_linux 2.1.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface] - shared_preferences_macos 2.0.4 [flutter shared_preferences_platform_interface] - shared_preferences_platform_interface 2.1.0 [flutter plugin_platform_interface] - shared_preferences_web 2.0.4 [flutter flutter_web_plugins shared_preferences_platform_interface] - shared_preferences_windows 2.1.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - shelf 1.3.2 [async collection http_parser path stack_trace stream_channel] - shelf_packages_handler 3.0.1 [path shelf shelf_static] - shelf_static 1.1.1 [convert http_parser mime path shelf] - shelf_web_socket 1.0.2 [shelf stream_channel web_socket_channel] - sky_engine 0.0.99 - source_gen 1.2.2 [analyzer async build dart_style glob meta path source_span yaml] - source_helper 1.3.2 [analyzer collection source_gen] - source_map_stack_trace 2.1.0 [path stack_trace source_maps] - source_maps 0.10.10 [source_span] - source_span 1.9.0 [collection path term_glyph] - sprintf 6.0.2 - sqflite_common 2.2.1+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.1 [source_span] - sync_http 0.3.1 - term_glyph 1.2.1 - test_api 0.4.12 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - test_core 0.4.16 [analyzer async args boolean_selector collection coverage frontend_server_client glob io meta package_config path pool source_map_stack_trace source_maps source_span stack_trace stream_channel vm_service yaml matcher test_api] - timezone 0.8.0 [path] - timing 1.0.0 [json_annotation] - tuple 2.0.0 [quiver] - typed_data 1.3.1 [collection] - uni_links_platform_interface 1.0.0 [flutter plugin_platform_interface] - uni_links_web 0.1.0 [flutter flutter_web_plugins uni_links_platform_interface] - universal_io 2.0.4 [collection crypto meta typed_data] - url_launcher_android 6.0.18 [flutter url_launcher_platform_interface] - url_launcher_ios 6.0.17 [flutter url_launcher_platform_interface] - url_launcher_linux 3.0.1 [flutter url_launcher_platform_interface] - url_launcher_macos 3.0.1 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.1.0 [flutter plugin_platform_interface] - url_launcher_web 2.0.13 [flutter flutter_web_plugins url_launcher_platform_interface] - url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface] - vector_math 2.1.2 - video_player 2.4.7 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web] - video_player_android 2.3.9 [flutter video_player_platform_interface] - video_player_avfoundation 2.3.5 [flutter video_player_platform_interface] - video_player_platform_interface 5.1.4 [flutter plugin_platform_interface] - video_player_web 2.0.12 [flutter flutter_web_plugins video_player_platform_interface] - visibility_detector 0.3.3 [flutter] - vm_service 9.0.0 - wakelock 0.6.2 [flutter meta wakelock_macos wakelock_platform_interface wakelock_web wakelock_windows] - wakelock_macos 0.4.0 [flutter flutter_web_plugins wakelock_platform_interface] - wakelock_platform_interface 0.3.0 [flutter meta] - wakelock_web 0.4.0 [flutter flutter_web_plugins js wakelock_platform_interface] - wakelock_windows 0.2.0 [flutter wakelock_platform_interface win32] - watcher 1.0.1 [async path] - waterfall_flow 3.0.2 [collection extended_list_library flutter] - web_socket_channel 2.2.0 [async crypto stream_channel] - webdriver 3.0.0 [archive matcher path stack_trace sync_http] - webkit_inspection_protocol 1.2.0 [logging] - webview_flutter 2.8.0 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview] - webview_flutter_android 2.10.0 [flutter webview_flutter_platform_interface] - webview_flutter_platform_interface 1.9.3 [flutter meta plugin_platform_interface] - webview_flutter_wkwebview 2.9.3 [flutter path webview_flutter_platform_interface] - win32 2.7.0 [ffi] - xdg_directories 0.2.0+2 [meta path process] - xml 6.1.0 [collection meta petitparser] - yaml 3.1.1 [collection source_span string_scanner] ```

darshankawar commented 2 years ago

fatal error: 'messages.g.h' file not found

@masewo This probably is due to cache. Can you try delete podfile.lock, pubspec.lock, run flutter clean followed by pod install -> pod repo update and see if it helps ?

masewo commented 2 years ago

@darshankawar I run following commands:

rm -rf Pods
rm -rf Podfile.lock
rm -rf ../pubspec.lock
rm -rf ~/.pub-cache/hosted/pub.dartlang.org/
rm -rf ~/Library/Developer/Xcode/DerivedData
pod cache clean --all
pod deintegrate
flutter pub cache repair
flutter clean
flutter pub get
pod setup
pod install
pod repo update

But it still fails with these errors:

In file included from /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.8.0/ios/Classes/FLTAuthStateChannelStreamHandler.m:6:
    /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.8.0/ios/Classes/Public/FLTFirebaseAuthPlugin.h:17:9: fatal error: 'messages.g.h' file not found
    #import "messages.g.h"
            ^~~~~~~~~~~~~~
    1 error generated.

Can I delete something more?

flutter create . did also not help. Removing flutter_auth helps.

A new project with just flutter_auth also builds fine.

darshankawar commented 2 years ago

I am unable to replicate this after upgrading plugin to latest version. It compiled and built on iOS physical device properly after running flutter run and flutter build ios.

Xcode build done.                                           93.6s
Built /Users/dhs/Documents/NCFlutter/triage-examples/flutterfire_examples/firebase_auth_example/build/ios/iphoneos/Runner.app.

Can you please provide ios/podfile ?

masewo commented 2 years ago

Sure. Here is my podfile:

Click To Expand ``` source 'https://github.com/CocoaPods/Specs.git' # source 'https://cdn.cocoapods.org/' $FirebaseAnalyticsWithoutAdIdSupport = true # Uncomment this line to define a global platform for your project platform :ios, '11.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' project 'Runner', { 'Debug' => :debug, 'Profile' => :release, 'Release' => :release, } def flutter_root generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) unless File.exist?(generated_xcode_build_settings_path) raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" end File.foreach(generated_xcode_build_settings_path) do |line| matches = line.match(/FLUTTER_ROOT\=(.*)/) return matches[1].strip if matches end raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" end require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) flutter_ios_podfile_setup target 'Runner' do use_frameworks! use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => "9.5.0" end post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) # Fix Xcode 14 bundle code signing issue # https://github.com/CocoaPods/CocoaPods/issues/11196#issuecomment-1241675005 if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle" target.build_configurations.each do |config| config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' end end if ['DKImagePickerController'].include? target.name target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' end end if ['DKPhotoGallery'].include? target.name target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' end end target.build_configurations.each do |config| # https://github.com/firebase/flutterfire/issues/9015#issuecomment-1235515099 config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' #config.build_settings['ENABLE_BITCODE'] = 'NO' #config.build_settings['SWIFT_VERSION'] = '4.2' #target.build_settings(config.name)['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES' # You can remove unused permissions here # for more information: https://github.com/BaseflowIT/flutter-permission-handler/blob/develop/permission_handler/ios/Classes/PermissionHandlerEnums.h # e.g. when you don't need camera permission, just add 'PERMISSION_CAMERA=0' config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ '$(inherited)', ## dart: PermissionGroup.calendar 'PERMISSION_EVENTS=0', ## dart: PermissionGroup.reminders 'PERMISSION_REMINDERS=0', ## dart: PermissionGroup.contacts 'PERMISSION_CONTACTS=0', ## dart: PermissionGroup.camera 'PERMISSION_CAMERA=1', ## dart: PermissionGroup.microphone 'PERMISSION_MICROPHONE=1', ## dart: PermissionGroup.speech 'PERMISSION_SPEECH_RECOGNIZER=1', ## dart: PermissionGroup.photos 'PERMISSION_PHOTOS=1', ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse] 'PERMISSION_LOCATION=0', ## dart: PermissionGroup.notification 'PERMISSION_NOTIFICATIONS=1', ## dart: PermissionGroup.mediaLibrary 'PERMISSION_MEDIA_LIBRARY=0', ## dart: PermissionGroup.sensors 'PERMISSION_SENSORS=0', ## dart: PermissionGroup.bluetooth 'PERMISSION_BLUETOOTH=0', ## dart: PermissionGroup.appTrackingTransparency 'PERMISSION_APP_TRACKING_TRANSPARENCY=0', ## dart: PermissionGroup.criticalAlerts 'PERMISSION_CRITICAL_ALERTS=0' ] end end end target 'ImageNotification' do use_frameworks! pod 'GoogleUtilities/AppDelegateSwizzler' pod 'GoogleUtilities/Environment' pod 'GoogleUtilities/ISASwizzler' pod 'GoogleUtilities/Logger' pod 'GoogleUtilities/MethodSwizzler' pod 'GoogleUtilities/Network' pod 'GoogleUtilities/NSData+zlib' pod 'GoogleUtilities/Reachability' pod 'GoogleUtilities/UserDefaults' pod 'Firebase/Messaging' end ```
darshankawar commented 2 years ago

I am wondering if the error has to do with external permissions you have in the file and could be resulting in the conflict.

The error pointing to #import "messages.g.h" already has # as expected. So while compiling, the tool is somehow unable to find the said file. You probably might need to check which of these dependencies could be causing the error, because as you said earlier, a new project with firebase_auth builds fine, so there must be something in your config / setup that could be leading to the error.

giroprotagonist commented 2 years ago

I too am receiving this same error only for iOS, will update with more information if requested.

masewo commented 2 years ago

I received a new macbook today so that I can be sure that it is not a device related problem. The build also fails on the new macbook. So I will add dependency by dependency to a new project or remove dependency by dependency from my existing one to figure that out.

Ali1Ammar commented 2 years ago

for me removing file_selector plugin fix the problem and add it again return the bug

masewo commented 2 years ago

I can confirm that removing the file_selector plugin also fixes the problem for me. I also tried building an ios app for following combinations:

@darshankawar Shall I open a ticket for file_selector?

darshankawar commented 2 years ago

Good to know you found out the root-cause. Yes, please open in dedicated repo of plugin Closing from here, as the issue is not with firebase_auth.

stuartmorgan commented 2 years ago

@darshankawar Why do you believe that this is a file_selector issue rather than an include path misconfiguration in firebase_auth? The build error is in firebase_auth.

stuartmorgan commented 2 years ago

This is definitely a firebase_auth bug; see https://github.com/flutter/flutter/issues/111728 for details.

masewo commented 2 years ago

Not a proper fix but temporarily solving my build problems: https://github.com/masewo/flutterfire/commit/56b59845400d3761eb0f541cd5a1592eeb2a0664

deimantasa commented 2 years ago

I faced exact issue for a while now. But never had a chance to fill the ticket. Will share my findings: Just tried with latest (firebase_auth 3.9.0) - I get exact same issue.

However, building it with

  firebase_auth: 3.4.2
  firebase_auth_platform_interface: 6.3.2

Fixes issue and it builds well. Problem seems to be introduced in the followup version of firebase_auth which is 3.5.0 as with that - it fails already with messages.g.h being not found.

Furthermore, version in iOS nor firebase_core does not seem to matter - currently I'm building on 9.5.0 and 1.22.0 respectively and it still works well as long as the version of firebase_auth is 3.4.2.

TLDR: Problem seems to be introduced in firebase_auth 3.5.0. As a workaround, use strict versioning of follow up packages:

  firebase_auth: 3.4.2
  firebase_auth_platform_interface: 6.3.2 // need to lock in otherwise it will be out of sync with firebase_auth
darshankawar commented 2 years ago

@darshankawar Why do you believe that this is a file_selector issue rather than an include path misconfiguration in firebase_auth? The build error is in firebase_auth.

Thanks for clarifying @stuartmorgan. My verification was based on the fact that I was unable to replicate this purely using firebase_auth and needed external dependency as mentioned https://github.com/firebase/flutterfire/issues/9511#issuecomment-1248926811

darshankawar commented 2 years ago

/cc @Lyokone