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

🐛 [firebase_storage] Swift Compiler Error (Xcode): Value of optional type StorageProvider must be unwrapped #12429

Closed tausiq closed 5 months ago

tausiq commented 5 months ago

Bug report

Describe the bug Xcode build error on Flutter project

Swift Compiler Error (Xcode): Value of optional type '(any StorageProvider)?' must be unwrapped to refer to member 'storage' of wrapped base type 'any StorageProvider'

and Swift Compiler Error (Xcode): Cannot assign value of type '(any AuthInterop)?' to type 'any AuthInterop'

Here is the build output of Android Studio,

Launching lib/main.dart on iPhone 15 Pro Max in debug mode...
Running pod install...
Running Xcode build...
Xcode build done.                                           47.4s
Failed to build iOS app
Swift Compiler Error (Xcode): Value of optional type '(any StorageProvider)?' must be unwrapped to refer to member 'storage' of wrapped base type 'any StorageProvider'
/StudioProjects/storage_bugs/ios/Pods/FirebaseStorage/FirebaseStorage/Sources/Storage.swift:72:11

Swift Compiler Error (Xcode): Value of optional type '(any StorageProvider)?' must be unwrapped to refer to member 'storage' of wrapped base type 'any StorageProvider'
/StudioProjects/storage_bugs/ios/Pods/FirebaseStorage/FirebaseStorage/Sources/Storage.swift:87:11

Swift Compiler Error (Xcode): Cannot assign value of type '(any AuthInterop)?' to type 'any AuthInterop'
/StudioProjects/storage_bugs/ios/Pods/FirebaseStorage/FirebaseStorage/Sources/Storage.swift:290:38

Swift Compiler Error (Xcode): Cannot assign value of type '(any AppCheckInterop)?' to type 'any AppCheckInterop'
/StudioProjects/storage_bugs/ios/Pods/FirebaseStorage/FirebaseStorage/Sources/Storage.swift:292:46

Uncategorized (Xcode): Command SwiftCompile failed with a nonzero exit code

Could not build the application for the simulator.
Error launching application on iPhone 15 Pro Max.

Steps to reproduce

Steps to reproduce the behavior:

Run the sample project

OR,

  1. Create a new Flutter project
  2. Copy paste the pubspec.yaml from the sample project to the new project
  3. Go to ios/Podfile and use, platform :ios, '13.0'
  4. Build the project to run on any iOS simulator

Expected behavior

Expected to run the project successfully on the iOS simulator

Sample project

https://github.com/tausiq/storage_bugs


Additional context

Add any other context about the problem here.


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.19.2, on macOS 14.3.1 23D60 darwin-arm64, locale en-CA) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.2) [✓] IntelliJ IDEA Ultimate Edition (version 2023.3.4) [✓] VS Code (version 1.87.0) [✓] Connected device (3 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.3.0 Flutter SDK 3.19.2 storage_bugs 1.0.0+1 dependencies: - about 2.1.3 [flutter flutter_markdown markdown path simple_mustache url_launcher] - another_stepper 1.2.2 [flutter] - avatar_glow 3.0.1 [flutter] - cached_network_image 3.3.1 [cached_network_image_platform_interface cached_network_image_web flutter flutter_cache_manager octo_image] - cloud_firestore 4.15.6 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - cloud_functions 4.6.6 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter] - comment_tree 0.3.0 [flutter provider] - custom_navigation_bar 0.8.2 [flutter] - date_picker_timeline 1.2.5 [flutter intl] - date_time_format 2.0.1 - enum_to_string 2.0.1 - equatable 2.0.5 [collection meta] - faker 2.1.0 [crypto] - favorite_button 0.0.4 [flutter] - feedback 3.0.1 [flutter flutter_localizations] - feedback_sentry 3.0.0 [flutter feedback sentry] - firebase_analytics 10.8.7 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 4.17.6 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 2.25.5 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 3.4.16 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_database 10.4.7 [firebase_core firebase_core_platform_interface firebase_database_platform_interface firebase_database_web flutter] - firebase_messaging 14.7.17 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_remote_config 4.3.15 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter] - firebase_storage 11.6.7 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter] - flex_color_scheme 7.3.1 [flex_seed_scheme flutter meta] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine] - flutter_cache 0.1.0 [flutter shared_preferences] - flutter_chat_types 3.6.2 [equatable json_annotation meta] - flutter_chat_ui 1.6.12 [diffutil_dart equatable flutter flutter_chat_types flutter_link_previewer flutter_parsed_text intl meta photo_view scroll_to_index url_launcher visibility_detector] - flutter_datetime_picker_plus 2.1.0 [flutter] - flutter_dotenv 5.1.0 [flutter] - flutter_firebase_chat_core 1.6.7 [cloud_firestore firebase_auth firebase_core flutter flutter_chat_types meta] - flutter_image_compress 2.1.0 [flutter flutter_image_compress_platform_interface flutter_image_compress_common flutter_image_compress_web flutter_image_compress_macos] - flutter_local_notifications 16.3.2 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone] - flutter_markdown 0.6.20+1 [flutter markdown meta path] - flutter_multi_formatter 2.12.4 [flutter collection base58check bech32] - flutter_polyline_points 2.0.0 [flutter http] - flutter_rating_bar 4.0.1 [flutter] - flutter_slidable 3.0.1 [flutter] - flutter_stripe 10.1.0 [flutter meta stripe_android stripe_ios stripe_platform_interface] - flutter_svg 2.0.10+1 [flutter http vector_graphics vector_graphics_codec vector_graphics_compiler] - geocoding 2.2.0 [flutter geocoding_platform_interface geocoding_android geocoding_ios] - geoflutterfire2 2.3.15 [flutter cloud_firestore rxdart] - geolocator 11.0.0 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows] - get 4.6.6 [flutter] - get_storage 2.1.1 [flutter get path_provider] - google_fonts 6.2.1 [flutter http path_provider crypto] - google_maps_flutter 2.5.3 [flutter google_maps_flutter_android google_maps_flutter_ios google_maps_flutter_platform_interface google_maps_flutter_web] - google_sign_in 6.2.1 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web] - grouped_list 5.1.2 [flutter] - http 1.2.0 [async http_parser meta web] - iconify_flutter_plus 1.0.3 [flutter flutter_svg] - image 4.1.7 [archive meta xml] - image_picker 1.0.7 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_linux image_picker_macos image_picker_platform_interface image_picker_windows] - intl 0.18.1 [clock meta path] - location 5.0.3 [flutter location_platform_interface location_web] - logger 2.1.0 - lottie 3.1.0 [archive flutter http path vector_math] - material_segmented_control 5.0.0 [flutter] - mime 1.0.5 - mocktail 1.0.3 [collection matcher test_api] - package_info_plus 5.0.1 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface web win32] - path 1.9.0 - path_provider 2.1.2 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - percent_indicator 4.2.3 [flutter] - permission_handler 11.3.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_html permission_handler_windows permission_handler_platform_interface] - photo_view 0.14.0 [flutter] - pull_to_refresh 2.0.0 [flutter] - retry 3.1.2 - rxdart 0.27.7 - sentry_flutter 7.16.1 [flutter flutter_web_plugins sentry package_info_plus meta ffi] - share_plus 7.2.2 [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] - sign_in_with_apple 5.0.0 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web] - smooth_page_indicator 1.1.0 [flutter] - solid_bottom_sheet 0.1.10 [flutter] - stack_trace 1.11.1 [path] - timeago 3.6.1 [intl] - tuple 2.0.2 - uni_links 0.5.1 [flutter uni_links_platform_interface uni_links_web] - url_launcher 6.2.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 4.3.3 [crypto sprintf meta fixnum] dev dependencies: - csv 5.1.1 - dart_code_metrics_presets 2.9.0 - flutter_lints 3.0.1 [lints] - flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math leak_tracker_flutter_testing async boolean_selector characters collection leak_tracker leak_tracker_testing material_color_utilities meta source_span stream_channel string_scanner term_glyph vm_service] transitive dependencies: - _flutterfire_internals 1.3.23 [collection firebase_core firebase_core_platform_interface flutter meta] - archive 3.4.10 [crypto path pointycastle] - args 2.4.2 - async 2.11.0 [collection meta] - base58check 2.0.0 [crypto collection] - bech32 0.2.2 [convert] - boolean_selector 2.1.1 [source_span string_scanner] - cached_network_image_platform_interface 4.0.0 [flutter flutter_cache_manager] - cached_network_image_web 1.1.1 [cached_network_image_platform_interface flutter flutter_cache_manager] - characters 1.3.0 - clock 1.1.1 - cloud_firestore_platform_interface 6.1.7 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 3.10.6 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - cloud_functions_platform_interface 5.5.17 [firebase_core flutter meta plugin_platform_interface] - cloud_functions_web 4.7.0 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js web] - collection 1.18.0 - convert 3.1.1 [typed_data] - cross_file 0.3.3+8 [meta web] - crypto 3.0.3 [typed_data] - csslib 1.0.0 [source_span] - dbus 0.7.10 [args ffi meta xml] - diffutil_dart 3.0.0 - fake_async 1.3.1 [clock collection] - ffi 2.1.2 - file 7.0.0 [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.2 [cross_file flutter http plugin_platform_interface] - file_selector_windows 0.9.3+1 [cross_file file_selector_platform_interface flutter] - firebase_analytics_platform_interface 3.9.7 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.5.5+19 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 7.1.6 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.9.6 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser js meta web] - firebase_core_platform_interface 5.0.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.11.5 [firebase_core_platform_interface flutter flutter_web_plugins js meta web] - firebase_crashlytics_platform_interface 3.6.23 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_database_platform_interface 0.2.5+23 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_database_web 0.2.3+23 [firebase_core firebase_core_web firebase_database_platform_interface flutter flutter_web_plugins js] - firebase_messaging_platform_interface 4.5.25 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.6.6 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta web] - firebase_remote_config_platform_interface 1.4.23 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_remote_config_web 1.4.23 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins js] - firebase_storage_platform_interface 5.1.10 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 3.7.1 [_flutterfire_internals async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta web] - fixnum 1.1.0 - flex_seed_scheme 1.4.0 [collection flutter meta] - flutter_cache_manager 3.3.1 [clock collection file flutter http path path_provider rxdart sqflite uuid] - flutter_image_compress_common 1.0.3 [flutter flutter_image_compress_platform_interface] - flutter_image_compress_macos 1.0.1 [flutter flutter_image_compress_platform_interface] - flutter_image_compress_platform_interface 1.0.3 [flutter plugin_platform_interface cross_file] - flutter_image_compress_web 0.1.3+2 [flutter flutter_web_plugins flutter_image_compress_platform_interface js] - flutter_link_previewer 3.2.2 [flutter flutter_chat_types flutter_linkify html http linkify meta url_launcher] - flutter_linkify 6.0.0 [flutter linkify] - 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] - flutter_parsed_text 2.2.1 [flutter] - flutter_plugin_android_lifecycle 2.0.17 [flutter] - flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math] - freezed_annotation 2.4.1 [collection json_annotation meta] - geocoding_android 3.2.0 [flutter geocoding_platform_interface] - geocoding_ios 2.3.0 [flutter geocoding_platform_interface] - geocoding_platform_interface 3.2.0 [flutter meta plugin_platform_interface] - geolocator_android 4.5.2 [flutter geolocator_platform_interface meta uuid] - geolocator_apple 2.3.6 [flutter geolocator_platform_interface] - geolocator_platform_interface 4.2.2 [flutter plugin_platform_interface vector_math meta] - geolocator_web 3.0.0 [flutter flutter_web_plugins geolocator_platform_interface] - geolocator_windows 0.2.2 [flutter geolocator_platform_interface] - google_identity_services_web 0.3.0+2 [meta web] - google_maps 6.3.0 [js js_wrapping meta] - google_maps_flutter_android 2.7.0 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface stream_transform] - google_maps_flutter_ios 2.5.0 [flutter google_maps_flutter_platform_interface stream_transform] - google_maps_flutter_platform_interface 2.6.0 [collection flutter plugin_platform_interface stream_transform] - google_maps_flutter_web 0.5.4+3 [collection flutter flutter_web_plugins google_maps google_maps_flutter_platform_interface sanitize_html stream_transform] - google_sign_in_android 6.1.21 [flutter google_sign_in_platform_interface] - google_sign_in_ios 5.7.4 [flutter google_sign_in_platform_interface] - google_sign_in_platform_interface 2.4.5 [flutter plugin_platform_interface] - google_sign_in_web 0.12.3+3 [flutter flutter_web_plugins google_identity_services_web google_sign_in_platform_interface http web] - html 0.15.4 [csslib source_span] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - image_picker_android 0.8.9+3 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - image_picker_for_web 3.0.2 [flutter flutter_web_plugins image_picker_platform_interface mime] - image_picker_ios 0.8.9+1 [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.4 [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] - js 0.6.7 [meta] - js_wrapping 0.7.4 [js] - json_annotation 4.8.1 [meta] - leak_tracker 10.0.0 [clock collection meta path vm_service] - leak_tracker_flutter_testing 2.0.1 [flutter leak_tracker leak_tracker_testing matcher meta] - leak_tracker_testing 2.0.1 [leak_tracker matcher meta] - linkify 5.0.0 - lints 3.0.0 - location_platform_interface 3.1.2 [flutter plugin_platform_interface] - location_web 4.2.0 [flutter flutter_web_plugins http_parser js location_platform_interface] - logging 1.2.0 - markdown 7.2.1 [args meta] - matcher 0.12.16+1 [async meta stack_trace term_glyph test_api] - material_color_utilities 0.8.0 [collection] - meta 1.11.0 - nested 1.0.0 [flutter] - octo_image 2.0.0 [flutter] - package_info_plus_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - path_parsing 1.0.1 [vector_math meta] - path_provider_android 2.2.2 [flutter path_provider_platform_interface] - path_provider_foundation 2.3.2 [flutter path_provider_platform_interface] - path_provider_linux 2.2.1 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_platform_interface 2.1.2 [flutter platform plugin_platform_interface] - path_provider_windows 2.2.1 [ffi flutter path path_provider_platform_interface win32] - permission_handler_android 12.0.5 [flutter permission_handler_platform_interface] - permission_handler_apple 9.4.0 [flutter permission_handler_platform_interface] - permission_handler_html 0.1.1 [flutter flutter_web_plugins permission_handler_platform_interface] - permission_handler_platform_interface 4.2.0 [flutter meta plugin_platform_interface] - permission_handler_windows 0.2.1 [flutter permission_handler_platform_interface] - petitparser 6.0.2 [meta] - platform 3.1.4 - plugin_platform_interface 2.1.8 [meta] - pointycastle 3.7.4 [collection convert js] - provider 6.1.2 [collection flutter nested] - sanitize_html 2.1.0 [html meta] - scroll_to_index 3.0.1 [flutter] - sentry 7.16.1 [http meta stack_trace uuid] - share_plus_platform_interface 3.3.1 [cross_file flutter meta mime plugin_platform_interface path_provider uuid] - 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] - shared_preferences_android 2.2.1 [flutter shared_preferences_platform_interface] - shared_preferences_foundation 2.3.5 [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.2 [flutter plugin_platform_interface] - shared_preferences_web 2.2.2 [flutter flutter_web_plugins shared_preferences_platform_interface web] - shared_preferences_windows 2.3.2 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - 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] - simple_mustache 2.1.0 [logging] - sky_engine 0.0.99 - source_span 1.10.0 [collection path term_glyph] - sprintf 7.0.0 - sqflite 2.3.2 [flutter sqflite_common path] - sqflite_common 2.5.3 [synchronized path meta] - stream_channel 2.1.2 [async] - stream_transform 2.1.0 - string_scanner 1.2.0 [source_span] - stripe_android 10.1.0 [flutter] - stripe_ios 10.1.0 [flutter] - stripe_platform_interface 10.1.0 [flutter freezed_annotation json_annotation meta plugin_platform_interface] - synchronized 3.1.0+1 - 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] - timezone 0.9.2 [path] - typed_data 1.3.2 [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] - url_launcher_android 6.3.0 [flutter url_launcher_platform_interface] - url_launcher_ios 6.2.5 [flutter url_launcher_platform_interface] - url_launcher_linux 3.1.1 [flutter url_launcher_platform_interface] - url_launcher_macos 3.1.0 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.3.2 [flutter plugin_platform_interface] - url_launcher_web 2.2.3 [flutter flutter_web_plugins url_launcher_platform_interface web] - url_launcher_windows 3.1.1 [flutter url_launcher_platform_interface] - vector_graphics 1.1.11+1 [flutter http vector_graphics_codec] - vector_graphics_codec 1.1.11+1 - vector_graphics_compiler 1.1.11+1 [args meta path_parsing xml vector_graphics_codec path] - vector_math 2.1.4 - visibility_detector 0.4.0+2 [flutter] - vm_service 13.0.0 - web 0.4.2 - win32 5.2.0 [ffi] - xdg_directories 1.0.4 [meta path] - xml 6.5.0 [collection meta petitparser] ```

DouglasValerio commented 5 months ago

Just had the exact same issue with:

platform :ios, '13.0' firebase_storage: ^11.6.7

flutter doctor:

[✓] Flutter (Channel stable, 3.16.5, on macOS 12.5 21G72 darwin-arm64, locale en-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] IntelliJ IDEA Community Edition (version 2023.2)
[✓] VS Code (version 1.87.0)
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!
mralbertchen commented 5 months ago

Having the same issue here.

puf commented 5 months ago

Hey folks. Sorry to hear about this problem. The team will triage and get to this as soon as possible.

If you are affected by this issue, leave a 👍 in the original comment. Please only add additional comments if you have new to information about the issue.

minusoneman commented 5 months ago

Perhaps it's related to the latest firebase-ios-sdk 10.22.0?

If I manually override the FirebaseSDKVersion in my Podfile I'm able to build the project.

# Override Firebase SDK Version
$FirebaseSDKVersion = '10.22.0'
ssdesign commented 5 months ago

Same issue deploying from Flutterflow. Flutterflow V 4.1 Flutter 3.13.7

Failed to build iOS app Swift Compiler Error (Xcode): Value of optional type '(any StorageProvider)?' must be unwrapped to refer to member 'storage' of wrapped base type 'any StorageProvider'

Javasamurai commented 5 months ago

Same issue on the Unity SDK as well.

ramyzeidan commented 5 months ago

same issue using flutterflow, any ideas what that is? im not even using firebase storage and im getting this!

ramyzeidan commented 5 months ago

ah okay, flutterflow folks here check this out from flutterflow: We are actively working to resolve an iOS deployment outage cause by a recent Firebase issue. We are awaiting a fix while investigating workarounds and hope to have this back online soon! Thank you for your patience 💜

ssdesign commented 5 months ago

Yes, that link brings you to this thread :D Thats how I came here lol

ah okay, flutterflow folks here check this out from flutterflow: We are actively working to resolve an iOS deployment outage cause by a recent Firebase issue. We are awaiting a fix while investigating workarounds and hope to have this back online soon! Thank you for your patience 💜

agreaves commented 5 months ago

Alex from FlutterFlow here. We've taken down the above link to this issue for now so as not to flood this thread (originally added it just to allow folks to track the issue).

~I can second that downgrading to use FirebaseSDKVersion = '10.21.0' works (thanks @minusoneman), which we'll temporarily do for our apps.~

~This issue surfaces across different Flutter, firebase_storage, and Xcode versions so it does appear to be an issue with the FirebaseSDKVersion 10.22.0 release from just a few hours ago.~

Upon further investigation, it looks like the newest FirebaseSDKVersion 10.22.0 release is incompatible with at least some older Firebase pods. By default (without FirebaseSDKVersion 10.22.0 hardcoded), when installing pods certain internal pods such as FirebaseCoreInternal use the newest version 10.22.0, while others still use older versions based on the version specified in pubspec.yaml (the latest Firebase packages appear to use 10.20.0).

ssdesign commented 5 months ago

Thanks @agreaves Can you help guide how to downgrade the SDK inside Flutterflow?

agreaves commented 5 months ago

We're tracking it here: https://github.com/FlutterFlow/flutterflow-issues/issues/2445, so if you're coming from FlutterFlow please add any comments there (unless of course it provides useful info to others outside of FF).

EDIT: Fixed inside FF for now 🙂

Lyokone commented 5 months ago

Thanks for the report, I'm investigating this

duongdam commented 5 months ago

Perhaps it's related to the latest firebase-ios-sdk 10.22.0?

If I manually override the FirebaseSDKVersion in my Podfile I'm able to build the project.

# Override Firebase SDK Version
$FirebaseSDKVersion = '10.22.0'

Thanks! It worked.

Ảnh màn hình 2024-03-05 lúc 15 09 10
selcukbeyhan commented 5 months ago

Perhaps it's related to the latest firebase-ios-sdk 10.22.0?

If I manually override the FirebaseSDKVersion in my Podfile I'm able to build the project.

# Override Firebase SDK Version
$FirebaseSDKVersion = '10.22.0'

This method worked for me too. I dont use FF.

Lyokone commented 5 months ago

After investigation, it seems that some internal libraries in the native iOS SDK are not strongly linked to a version. When the iOS team released 10.22.0 yesterday some dependencies got upgraded without the main package.

https://github.com/firebase/flutterfire/pull/12430 will properly update all the plugins to 10.22.0.

As mentioned before, you can force the SDK on 10.22.0 with

$FirebaseSDKVersion = '10.22.0'
Lyokone commented 5 months ago

I'll release the new version this afternoon

iSaqibShafique commented 5 months ago

Alex from FlutterFlow here. We've taken down the above link to this issue for now so as not to flood this thread (originally added it just to allow folks to track the issue).

~I can second that downgrading to use FirebaseSDKVersion = '10.21.0' works (thanks @minusoneman), which we'll temporarily do for our apps.~

~This issue surfaces across different Flutter, firebase_storage, and Xcode versions so it does appear to be an issue with the FirebaseSDKVersion 10.22.0 release from just a few hours ago.~

Upon further investigation, it looks like the newest FirebaseSDKVersion 10.22.0 release is incompatible with at least some older Firebase pods. By default (without FirebaseSDKVersion 10.22.0 hardcoded), when installing pods certain internal pods such as FirebaseCoreInternal use the newest version 10.22.0, while others still use older versions based on the version specified in pubspec.yaml (the latest Firebase packages appear to use 10.20.0).

How Brother?

iSaqibShafique commented 5 months ago

Perhaps it's related to the latest firebase-ios-sdk 10.22.0?

If I manually override the FirebaseSDKVersion in my Podfile I'm able to build the project.

# Override Firebase SDK Version
$FirebaseSDKVersion = '10.22.0'

Where to change brother?

admincode1 commented 5 months ago

Perhaps it's related to the latest firebase-ios-sdk 10.22.0? If I manually override the FirebaseSDKVersion in my Podfile I'm able to build the project.

# Override Firebase SDK Version
$FirebaseSDKVersion = '10.22.0'

Where to change brother?

Podfile

target 'Runner' do use_frameworks! use_modular_headers! $FirebaseSDKVersion = '10.22.0'

flutter_install_all_ios_pods File.dirname(File.realpath(FILE)) end

LukaszWojcikIteo commented 5 months ago

@Lyokone Are you able to estimate ~when are you gonna release new version? It's kind of blocker for release to us 😕

Lyokone commented 5 months ago

@LukaszWojcikIteo it has been released as part of firebase_core: ^2.26.0

bmbravo commented 5 months ago

This worked for me with the new version of firebase_core on Flutter. There is no need to modify the Podfile as mentioned before in this issue.

  1. flutter pub upgrade
  2. flutter clean
  3. Delete /ios/Pods
  4. Delete /ios/Podfile.lock
  5. flutter pub get
  6. From inside ios folder: pod install

https://stackoverflow.com/questions/64443888/flutter-cocoapodss-specs-repository-is-too-out-of-date-to-satisfy-dependencies

maagyei04 commented 5 months ago

Just delete everything in your Podfile, and put the code below;

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!

  $FirebaseSDKVersion = '10.22.0'

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end
zphoenixz commented 5 months ago

What about older Firebase versions? We can't update to latest atm, the only way would be to upgrade?

bernardoveras commented 5 months ago

How to fix?

munkiki7 commented 5 months ago

How can stuff like this even be released? SDK is not compiling...

jaredweinfurtner commented 5 months ago

How to fix?

Update firebase_core to the latest

chandu-flutter commented 5 months ago

Perhaps it's related to the latest firebase-ios-sdk 10.22.0? If I manually override the FirebaseSDKVersion in my Podfile I'm able to build the project.

# Override Firebase SDK Version
$FirebaseSDKVersion = '10.22.0'

Thanks! It worked.

Ảnh màn hình 2024-03-05 lúc 15 09 10

thank you so much.Worked for me

dardison commented 5 months ago

Hi guys, I am in older versions of firebase, and I can't upgrade because I am not ready to go to dart sdk>3.0.0 Why is this affecting my build? Is there a way of resolving this without upgrading firebase versions?

Owaiseimdad commented 5 months ago

Hey folks. Sorry to hear about this problem. The team will triage and get to this as soon as possible.

If you are affected by this issue, leave a 👍 in the original comment. Please only add additional comments if you have new to information about the issue.

What is the resolution for this? I am still facing this issue and its stopping my SLAs in order to complete the build with changes I have done. Just wanted some help.

ksilz commented 5 months ago

Hi guys, I am in older versions of firebase, and I can't upgrade because I am not ready to go to dart sdk>3.0.0 Why is this affecting my build? Is there a way of resolving this without upgrading firebase versions?

Same here. Fortunately, overriding the Firebase SDK version worked for me.

What's wrong with this picture?

Well, "not changing dependencies and not working" is what's wrong here. I pin my versions in Flutter, but the Firebase iOS libraries pull in new versions. How can I prevent that?

saurabhkumar8112 commented 5 months ago

This issue has been resolve in firebase ios SDK 10.22.0. You don't need to edit podfile to hard-code the firebase ios sdk version

If you're using firebase dependencies you can upgrade them as follow(whichever you're using right now)

firebase_analytics: 10.8.9
firebase_auth: 4.17.8
firebase_core: 2.27.0
firebase_crashlytics: 3.4.18
firebase_messaging: 14.7.19
firebase_storage: 11.6.9

then flutter clean and pod install. Should work

dardison commented 5 months ago

This issue has been resolve in firebase ios SDK 10.22.0. You don't need to edit podfile to hard-code the firebase ios sdk version

If you're using firebase dependencies you can upgrade them as follow(whichever you're using right now)

firebase_analytics: 10.8.9
firebase_auth: 4.17.8
firebase_core: 2.27.0
firebase_crashlytics: 3.4.18
firebase_messaging: 14.7.19
firebase_storage: 11.6.9

then flutter clean and pod install. Should work

What if I can't upgrade dependencies for another issues? Is there a solution that doesn't need upgrade?

Lyokone commented 5 months ago

If you can't upgrade dependencies, you can always manually force the underlying native iOS SDK:

$FirebaseSDKVersion = '10.22.0'
larssn commented 5 months ago

@Lyokone That only results in a pod dependency error:

[!] CocoaPods could not find compatible versions for pod "Firebase/Auth":
      In snapshot (Podfile.lock):
        Firebase/Auth (= 10.18.0)

      In Podfile:
        firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 4.16.0, which depends on
          Firebase/Auth (= 10.22.0)

We're stuck on Flutter 3.7.12 for now, and managing dependencies is fast becoming a nightmare.

Rawan00mm commented 5 months ago

how to fix with unity? I try what you said but did not work