Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firebase_auth: Swift Compiler Error (Xcode): 'headerValue()' is unavailable in Swift: Use asyncHeaderValue() async -> String? instead. #13527

Open
1 task done
wantroba opened this issue Oct 21, 2024 · 33 comments
Labels
Needs Attention This issue needs maintainer attention. type: bug Something isn't working

Comments

@wantroba
Copy link

wantroba commented Oct 21, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Auth

Which platforms are affected?

iOS

Description

My development environment:

== Use Xcode 16 ==
Xcode 16.0
Build version 16A242d

== Use default version of CocoaPods ==
cocoapods (1.15.2)

== Use Java version 17 ==
> java -version
openjdk version "17.0.11" 2024-04-16 LTS
OpenJDK Runtime Environment Zulu17.50+19-CA (build 17.0.11+9-LTS)
OpenJDK 64-Bit Server VM Zulu17.50+19-CA (build 17.0.11+9-LTS, mixed mode, sharing)

== Use Flutter channel stable ==
Flutter 3.24.3 • Dart 3.5.3

Firebase libs:

  firebase_core_platform_interface: ^5.3.0
  firebase_core: ^3.6.0
  firebase_analytics: ^11.3.3
  firebase_crashlytics: ^4.1.3
  firebase_messaging: ^15.1.3
  firebase_auth: ^5.3.1
  cloud_functions: ^5.1.3
  cloud_firestore: ^5.4.4

The output during iOS build:

Running pod install...                                            137.1s
Running Xcode build...                                          
Xcode archive done.                                         108.2s
Failed to build iOS app
Swift Compiler Error (Xcode): 'headerValue()' is unavailable in Swift: Use `asyncHeaderValue() async -> String?` instead.
/Users/builder/clone/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/Swift/Backend/AuthBackend.swift:111:39

Encountered error while archiving for device.


Build failed :|
Failed to build for iOS

I was able to build until last Friday (10/18/2024). I didn't update any libs from Friday until today and this error appeared

Reproducing the issue

I will paste here the code snippet where I use firebase auth, I use it together with the game services lib (https://github.com/Abedalkareem/games_services), but I don't know if it is related to it, it seems to be something with the firebase auth core lib:

import 'dart:io';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/foundation.dart';
import 'package:games_services/games_services.dart' hide PlayerData;
.....
static Future<String?> _firebaseAuthSignIn() async {
    try {
      String? uid;
      if (Platform.isAndroid) {
        final authCode = await GameAuth.getAuthCode(
            "<<MY CODE>>");
        if (authCode != null) {
          final userCredential =
              await FirebaseAuth.instance.signInWithCredential(
            PlayGamesAuthProvider.credential(serverAuthCode: authCode),
          );
          uid = userCredential.user?.uid;
        }
      } else if (Platform.isIOS) {
        final userCredential = await FirebaseAuth.instance
            .signInWithCredential(GameCenterAuthProvider.credential());
        uid = userCredential.user?.uid;
      }
      LoggerUtils.info("Signed in with Game Service account. Id: $uid");
      return uid;
    } catch (e) {
      FirebaseUtils.recordError(e, null);
      return null;
    }
  }

Firebase Core version

3.6.0

Flutter Version

3.24.3

Relevant Log Output

No response

Flutter dependencies

Expand Flutter dependencies snippet
Dart SDK 3.5.3
Flutter SDK 3.24.3
minigames 1.1.2+24

dependencies:
- age_calculator 1.0.0 [flutter]
- app_badge_plus 1.1.5 [flutter plugin_platform_interface]
- audioplayers 6.1.0 [audioplayers_android audioplayers_darwin audioplayers_linux audioplayers_platform_interface audioplayers_web audioplayers_windows file flutter http meta path_provider synchronized uuid]
- auto_size_text 3.0.0 [flutter]
- cloud_firestore 5.4.4 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- cloud_functions 5.1.3 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter]
- connectivity_plus 6.1.0 [flutter flutter_web_plugins connectivity_plus_platform_interface web meta nm collection]
- cupertino_icons 1.0.8
- easy_ads_flutter 2.7.0 [flutter google_mobile_ads collection unity_ads_plugin applovin_max easy_audience_network logger]
- firebase_analytics 11.3.3 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter]
- firebase_auth 5.3.1 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 3.6.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_core_platform_interface 5.3.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_crashlytics 4.1.3 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- firebase_messaging 15.1.3 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_arb_translator 1.0.15 [http path encrypt pointycastle args crypto convert intl]
- flutter_local_notifications 17.2.3 [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_oss_licenses 3.0.2 [path meta yaml dart_pubspec_licenses args]
- flutter_spinkit 5.2.1 [flutter]
- flutter_widget_from_html 0.15.2 [flutter flutter_widget_from_html_core fwfh_cached_network_image fwfh_chewie fwfh_just_audio fwfh_svg fwfh_url_launcher fwfh_webview html]
- fluttertoast 8.2.8 [flutter flutter_web_plugins web]
- font_awesome_flutter 10.7.0 [flutter]
- games_services 4.0.3 [flutter games_services_platform_interface]
- get 4.6.6 [flutter]
- hive 2.2.3 [meta crypto]
- hive_flutter 1.1.0 [flutter hive path_provider path]
- in_app_purchase 3.2.0 [flutter in_app_purchase_android in_app_purchase_platform_interface in_app_purchase_storekit]
- in_app_purchase_android 0.3.6+10 [collection flutter in_app_purchase_platform_interface json_annotation]
- in_app_purchase_storekit 0.3.18+3 [collection flutter in_app_purchase_platform_interface json_annotation]
- in_app_review 2.0.9 [flutter in_app_review_platform_interface]
- intl 0.19.0 [clock meta path]
- logger 2.4.0
- lottie 3.1.3 [archive flutter http path vector_math]
- package_info_plus 8.1.0 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface web win32 clock]
- parallax_sensors_bg 1.0.1 [flutter sensors_plus]
- path_provider 2.1.4 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows]
- provider 6.1.2 [collection flutter nested]
- scroll_datetime_picker 0.1.2 [flutter intl mockito]
- shared_preferences 2.3.2 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- url_launcher 6.3.1 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- url_strategy 0.3.0 [flutter_web_plugins]
- vibration 2.0.1 [flutter vibration_platform_interface]

dev dependencies:
- build_runner 2.4.13 [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_launcher_icons 0.14.1 [args checked_yaml cli_util image json_annotation path yaml]
- flutter_lints 5.0.0 [lints]
- flutter_native_splash 2.4.2 [args flutter flutter_web_plugins html image meta path universal_io xml yaml ansicolor]
- 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]
- hive_generator 2.0.1 [build source_gen hive analyzer source_helper]

dependency overrides:
- sensors_plus 6.1.0 [flutter flutter_web_plugins sensors_plus_platform_interface]

transitive dependencies:
- _fe_analyzer_shared 72.0.0 [meta]
- _flutterfire_internals 1.3.44 [collection firebase_core firebase_core_platform_interface flutter meta]
- _macros 0.3.2
- analyzer 6.7.0 [_fe_analyzer_shared collection convert crypto glob macros meta package_config path pub_semver source_span watcher yaml]
- ansicolor 2.0.3
- applovin_max 4.0.1 [flutter plugin_platform_interface]
- archive 3.6.1 [crypto path]
- args 2.6.0
- asn1lib 1.5.5
- async 2.11.0 [collection meta]
- audio_session 0.1.21 [flutter flutter_web_plugins rxdart meta]
- audioplayers_android 5.0.0 [audioplayers_platform_interface flutter]
- audioplayers_darwin 6.0.0 [audioplayers_platform_interface flutter]
- audioplayers_linux 4.0.0 [audioplayers_platform_interface flutter]
- audioplayers_platform_interface 7.0.0 [collection flutter meta plugin_platform_interface]
- audioplayers_web 5.0.1 [audioplayers_platform_interface flutter flutter_web_plugins web]
- audioplayers_windows 4.0.0 [audioplayers_platform_interface flutter]
- boolean_selector 2.1.1 [source_span string_scanner]
- build 2.4.1 [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.2 [built_collection built_value crypto http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
- build_resolvers 2.4.2 [analyzer async build collection convert crypto graphs logging package_config path pool pub_semver stream_transform yaml]
- build_runner_core 7.3.2 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta package_config path pool timing watcher yaml]
- built_collection 5.1.1
- built_value 8.9.2 [built_collection collection fixnum meta]
- cached_network_image 3.4.1 [cached_network_image_platform_interface cached_network_image_web flutter flutter_cache_manager octo_image]
- cached_network_image_platform_interface 4.1.1 [flutter flutter_cache_manager]
- cached_network_image_web 1.3.1 [cached_network_image_platform_interface flutter flutter_cache_manager web]
- characters 1.3.0
- checked_yaml 2.0.3 [json_annotation source_span yaml]
- chewie 1.8.5 [cupertino_icons flutter provider video_player wakelock_plus]
- cli_util 0.4.1 [meta path]
- clock 1.1.1
- cloud_firestore_platform_interface 6.4.3 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 4.3.2 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins]
- cloud_functions_platform_interface 5.5.37 [firebase_core flutter meta plugin_platform_interface]
- cloud_functions_web 4.10.2 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins]
- code_builder 4.10.0 [built_collection built_value collection matcher meta]
- collection 1.18.0
- connectivity_plus_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- convert 3.1.2 [typed_data]
- crypto 3.0.6 [typed_data]
- csslib 1.0.0 [source_span]
- dart_pubspec_licenses 3.0.1 [yaml path json_annotation]
- dart_style 2.3.7 [analyzer args collection package_config path pub_semver source_span]
- dbus 0.7.10 [args ffi meta xml]
- device_info_plus 11.1.0 [device_info_plus_platform_interface ffi file flutter flutter_web_plugins meta web win32 win32_registry]
- device_info_plus_platform_interface 7.0.1 [flutter meta plugin_platform_interface]
- easy_audience_network 0.0.7 [flutter]
- encrypt 5.0.3 [args asn1lib clock collection crypto pointycastle]
- fake_async 1.3.1 [clock collection]
- ffi 2.1.3
- file 7.0.1 [meta path]
- firebase_analytics_platform_interface 4.2.5 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_analytics_web 0.5.10+2 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins]
- firebase_auth_platform_interface 7.4.7 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 5.13.2 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser meta web]
- firebase_core_web 2.18.1 [firebase_core_platform_interface flutter flutter_web_plugins meta web]
- firebase_crashlytics_platform_interface 3.6.44 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_platform_interface 4.5.46 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_web 3.9.2 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins meta web]
- fixnum 1.1.1
- flutter_cache_manager 3.4.1 [clock collection file flutter http path path_provider rxdart sqflite uuid]
- flutter_local_notifications_linux 4.0.1 [dbus ffi flutter flutter_local_notifications_platform_interface path xdg_directories]
- flutter_local_notifications_platform_interface 7.2.0 [flutter plugin_platform_interface]
- flutter_svg 2.0.10+1 [flutter http vector_graphics vector_graphics_codec vector_graphics_compiler]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math]
- flutter_widget_from_html_core 0.15.2 [csslib flutter html logging]
- frontend_server_client 4.0.0 [async path]
- fwfh_cached_network_image 0.14.3 [cached_network_image flutter flutter_cache_manager flutter_widget_from_html_core]
- fwfh_chewie 0.14.8 [chewie flutter flutter_widget_from_html_core video_player]
- fwfh_just_audio 0.15.2 [flutter flutter_widget_from_html_core just_audio]
- fwfh_svg 0.8.3 [flutter flutter_svg flutter_widget_from_html_core]
- fwfh_url_launcher 0.9.1 [flutter flutter_widget_from_html_core url_launcher]
- fwfh_webview 0.15.2 [flutter flutter_widget_from_html_core logging web webview_flutter webview_flutter_android webview_flutter_wkwebview]
- games_services_platform_interface 4.0.3 [flutter plugin_platform_interface]
- glob 2.1.2 [async collection file path string_scanner]
- google_mobile_ads 5.2.0 [meta flutter webview_flutter_android webview_flutter_wkwebview webview_flutter]
- graphs 2.3.2 [collection]
- html 0.15.4 [csslib source_span]
- http 1.2.2 [async http_parser meta web]
- http_multi_server 3.2.1 [async]
- http_parser 4.0.2 [collection source_span string_scanner typed_data]
- image 4.3.0 [archive meta xml]
- in_app_purchase_platform_interface 1.4.0 [flutter plugin_platform_interface]
- in_app_review_platform_interface 2.0.5 [flutter url_launcher plugin_platform_interface platform]
- io 1.0.4 [meta path string_scanner]
- js 0.7.1
- json_annotation 4.9.0 [meta]
- just_audio 0.9.41 [just_audio_platform_interface just_audio_web audio_session rxdart path path_provider async uuid crypto meta flutter]
- just_audio_platform_interface 4.3.0 [flutter plugin_platform_interface]
- just_audio_web 0.4.13 [just_audio_platform_interface flutter flutter_web_plugins web]
- leak_tracker 10.0.5 [clock collection meta path vm_service]
- leak_tracker_flutter_testing 3.0.5 [flutter leak_tracker leak_tracker_testing matcher meta]
- leak_tracker_testing 3.0.1 [leak_tracker matcher meta]
- lints 5.0.0
- logging 1.3.0
- macros 0.1.2-main.4 [_macros]
- matcher 0.12.16+1 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.11.1 [collection]
- meta 1.15.0
- mime 2.0.0
- mockito 5.4.4 [analyzer build code_builder collection dart_style matcher meta path source_gen test_api]
- nested 1.0.0 [flutter]
- nm 0.5.0 [dbus]
- octo_image 2.1.0 [flutter]
- package_config 2.1.0 [path]
- package_info_plus_platform_interface 3.0.1 [flutter meta plugin_platform_interface]
- path 1.9.0
- path_parsing 1.0.1 [vector_math meta]
- path_provider_android 2.2.12 [flutter path_provider_platform_interface]
- path_provider_foundation 2.4.0 [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.3.0 [ffi flutter path path_provider_platform_interface]
- petitparser 6.0.2 [meta]
- platform 3.1.6
- plugin_platform_interface 2.1.8 [meta]
- pointycastle 3.9.1 [collection convert js]
- pool 1.5.1 [async stack_trace]
- pub_semver 2.1.4 [collection meta]
- pubspec_parse 1.3.0 [checked_yaml collection json_annotation pub_semver yaml]
- rxdart 0.28.0
- sensors_plus_platform_interface 2.0.0 [flutter logging meta plugin_platform_interface]
- shared_preferences_android 2.3.3 [flutter shared_preferences_platform_interface]
- shared_preferences_foundation 2.5.3 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.4.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.4.1 [flutter plugin_platform_interface]
- shared_preferences_web 2.4.2 [flutter flutter_web_plugins shared_preferences_platform_interface web]
- shared_preferences_windows 2.4.1 [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 2.0.0 [shelf stream_channel web_socket_channel]
- sky_engine 0.0.99
- source_gen 1.5.0 [analyzer async build dart_style glob path source_span yaml]
- source_helper 1.3.4 [analyzer collection source_gen]
- source_span 1.10.0 [collection path term_glyph]
- sprintf 7.0.0
- sqflite 2.4.0 [flutter sqflite_android sqflite_darwin sqflite_platform_interface sqflite_common path]
- sqflite_android 2.4.0 [flutter sqflite_common path sqflite_platform_interface]
- sqflite_common 2.5.4+5 [synchronized path meta]
- sqflite_darwin 2.4.1-1 [flutter sqflite_platform_interface meta sqflite_common path]
- sqflite_platform_interface 2.4.0 [flutter platform sqflite_common plugin_platform_interface 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.3.0+3
- term_glyph 1.2.1
- test_api 0.7.2 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- timezone 0.9.4 [path]
- timing 1.0.1 [json_annotation]
- typed_data 1.4.0 [collection]
- unity_ads_plugin 0.3.21 [flutter]
- universal_io 2.2.2 [collection meta typed_data]
- url_launcher_android 6.3.12 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.3.1 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.2.0 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.2.1 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.3.2 [flutter plugin_platform_interface]
- url_launcher_web 2.3.3 [flutter flutter_web_plugins url_launcher_platform_interface web]
- url_launcher_windows 3.1.3 [flutter url_launcher_platform_interface]
- uuid 4.5.1 [crypto sprintf meta fixnum]
- 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
- vibration_platform_interface 0.0.2 [flutter plugin_platform_interface device_info_plus]
- video_player 2.9.2 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web]
- video_player_android 2.7.13 [flutter video_player_platform_interface]
- video_player_avfoundation 2.6.2 [flutter video_player_platform_interface]
- video_player_platform_interface 6.2.3 [flutter plugin_platform_interface]
- video_player_web 2.3.2 [flutter flutter_web_plugins video_player_platform_interface web]
- vm_service 14.2.5
- wakelock_plus 1.2.8 [flutter flutter_web_plugins meta wakelock_plus_platform_interface win32 dbus package_info_plus web]
- wakelock_plus_platform_interface 1.2.1 [flutter plugin_platform_interface meta]
- watcher 1.1.0 [async path]
- web 1.1.0
- web_socket 0.1.6 [web]
- web_socket_channel 3.0.1 [async crypto stream_channel web web_socket]
- webview_flutter 4.9.0 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview]
- webview_flutter_android 3.16.9 [flutter webview_flutter_platform_interface]
- webview_flutter_platform_interface 2.10.0 [flutter meta plugin_platform_interface]
- webview_flutter_wkwebview 3.16.0 [flutter path webview_flutter_platform_interface]
- win32 5.7.0 [ffi]
- win32_registry 1.1.5 [ffi win32]
- xdg_directories 1.1.0 [meta path]
- xml 6.5.0 [collection meta petitparser]
- yaml 3.1.2 [collection source_span string_scanner]

Additional context and comments

No response

@wantroba wantroba added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Oct 21, 2024
@iquirino
Copy link

+1

@iquirino
Copy link

iquirino commented Oct 21, 2024

Based on my investigations, we are using FirebaseSDK 11.4.0 while Flutterfire is only compatible with FirebaseSDK 11.2.0

https://github.com/firebase/firebase-ios-sdk/blob/1fc52ab0e172e7c5a961f975a76c2611f4f22852/FirebaseCore/Extension/FIRHeartbeatLogger.h#L39

https://github.com/firebase/firebase-ios-sdk/blob/9f2f41f5eed09a8adb31456559341da1813b9f04/FirebaseCore/Extension/FIRHeartbeatLogger.h#L48C5-L48C16

@wantroba
I'm not using games_services, so, I think it's not related with it.

@wantroba
Copy link
Author

Based on my investigations, we are using FirebaseSDK 11.3.0 while Flutterfire is only compatible with FirebaseSDK 11.2.0

https://github.com/firebase/firebase-ios-sdk/blob/1fc52ab0e172e7c5a961f975a76c2611f4f22852/FirebaseCore/Extension/FIRHeartbeatLogger.h#L39

https://github.com/firebase/firebase-ios-sdk/blob/9f2f41f5eed09a8adb31456559341da1813b9f04/FirebaseCore/Extension/FIRHeartbeatLogger.h#L48C5-L48C16

@wantroba I'm not using games_services, so, I think it's not related with it.

So an alternative would be to downgrade the FirebaseSDK in the pod file?

@iquirino
Copy link

It's fixed a version here, but PodFile is using a newer version:
https://github.com/firebase/flutterfire/blob/main/packages/firebase_core/firebase_core/ios/firebase_sdk_version.rb

I think yes, but I'm developing for android and ios without using a mac (building it with codemagic.io)

Do you know how to do it?

@arodriguez1996
Copy link

+1

@wantroba
Copy link
Author

wantroba commented Oct 21, 2024

It's fixed a version here, but PodFile is using a newer version: https://github.com/firebase/flutterfire/blob/main/packages/firebase_core/firebase_core/ios/firebase_sdk_version.rb

I think yes, but I'm developing for android and ios without using a mac (building it with codemagic.io)

Do you know how to do it?

I also use code magic!

I tried adding a line to the podfile (ios/PodFile)

target 'Runner' do
  use_frameworks!
  use_modular_headers!
  pod 'Firebase', '11.2' <- Add this
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

But didnt work :(

@adisaptorenggo
Copy link

+1

1 similar comment
@mateusgalasso
Copy link

+1

@fleoparra
Copy link

I have the same error too. In my case, I think that happens after executing
flutter pub upgrade

@NarekManukyan
Copy link

+1

@wantroba
Copy link
Author

I tried two approaches:

1. I downgraded the firebase version to 11.2 and also 11.1 and the problem persists.

target 'Runner' do
  use_frameworks!
  use_modular_headers!
  pod 'FirebaseCore', '~> 11.1'
  pod 'FirebaseAuth', '~> 11.1'
  pod 'FirebaseAnalytics', '~> 11.1'
  pod 'FirebaseMessaging', '~> 11.1'
  pod 'FirebaseCrashlytics', '~> 11.1'
  pod 'FirebaseFunctions', '~> 11.1'
  pod 'FirebaseFirestore', '~> 11.1'
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

2. Upgrade firebase to 11.4

pod 'FirebaseCore', '~> 11.4'
  pod 'FirebaseAuth', '~> 11.4'
  pod 'FirebaseAnalytics', '~> 11.4'
  pod 'FirebaseMessaging', '~> 11.4'
  pod 'FirebaseCrashlytics', '~> 11.4'
  pod 'FirebaseFunctions', '~> 11.4'
  pod 'FirebaseFirestore', '~> 11.4'

When I try to force upgrade to version 11.4 I am facing another problem:

Error: The pod "FirebaseAnalytics" required by the plugin "firebase_analytics" requires a higher minimum iOS deployment version than the plugin's reported minimum version.
To build, remove the plugin "firebase_analytics", or contact the plugin's developers for assistance.
Error running pod install


Build failed :|
Failed to build for iOS

I've already tried to upgrade the minimum iOS version to 14 and the error persists. If anyone has a project that doesn't use analytcs, they might get different results.

@ncooke3
Copy link
Member

ncooke3 commented Oct 21, 2024

Hi all, thanks for reporting and apologies for the trouble. This is indeed a regression from today's 11.4.0 firebase-ios-sdk release. The culprit is the FirebaseCoreExtension 11.4.0 pod which is not compatible with earlier 11.x pods (but should have been). We are investigating a quick fix.

@ncooke3
Copy link
Member

ncooke3 commented Oct 21, 2024

@wantroba, when fully downgrading, it may be better in this case to pin to the exact minor, else the ~> operator will allow it float to 11.4:

Example (removed the ~>).

target 'Runner' do
  use_frameworks!
  use_modular_headers!
  pod 'FirebaseCore', '11.1'
  pod 'FirebaseAuth', '11.1'
  pod 'FirebaseAnalytics', '11.1'
  pod 'FirebaseMessaging', '11.1'
  pod 'FirebaseCrashlytics', '11.1'
  pod 'FirebaseFunctions', '11.1'
  pod 'FirebaseFirestore', '11.1'
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

@wantroba
Copy link
Author

@wantroba, when fully downgrading, it may be better in this case to pin to the exact minor, else the ~> operator will allow it float to 11.4:

Example (removed the ~>).

target 'Runner' do
  use_frameworks!
  use_modular_headers!
  pod 'FirebaseCore', '11.1'
  pod 'FirebaseAuth', '11.1'
  pod 'FirebaseAnalytics', '11.1'
  pod 'FirebaseMessaging', '11.1'
  pod 'FirebaseCrashlytics', '11.1'
  pod 'FirebaseFunctions', '11.1'
  pod 'FirebaseFirestore', '11.1'
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

You are right. I forgot about that. I'll try with 11.2 first

@iquirino
Copy link

Sorry, I am @bonusclub-crm, replying from another browser.

@wantroba
Copy link
Author

Donwgrading to 11.2 didnt worked for me

@NarekManukyan
Copy link

Guys, try downgrading only FirebaseCoreExtension to 11.2, it worked for me

target 'Runner' do
  use_frameworks!
  use_modular_headers!
  pod 'FirebaseCoreExtension', '11.2'
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

@wantroba
Copy link
Author

wantroba commented Oct 21, 2024

Great idea @NarekManukyan!

As @ncooke3 mentioned the problem is in version 11.4 so I downgraded to version 11.3 and it also worked! This way we can build and stay just 1 version behind until they solve the problem with 11.4.

target 'Runner' do
  use_frameworks!
  use_modular_headers!
  pod 'FirebaseCoreExtension', '11.3'
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

@iquirino
Copy link

It' worked well for me too! ;)
But @ncooke3 is already working on a solution.

@iquirino
Copy link

@ncooke3, please let us know when to test your fixes, ok ;)

@wantroba
Copy link
Author

It' worked well for me too! ;) But @ncooke3 is already working on a solution.

Yes, this is just a workaround for those who can't wait for the fix. The ideal is to wait

@NarekManukyan
Copy link

Yes. This is a temporary solution. Until @ncooke3's PR passes all tests ))

@afine23
Copy link

afine23 commented Oct 21, 2024

+1

@jenkinsernest
Copy link

non has actually worked for me.
@ncooke3 what's situation

@jenkinsernest
Copy link

[!] CocoaPods could not find compatible versions for pod "FirebaseCoreExtension":
In snapshot (Podfile.lock):
FirebaseCoreExtension (= 11.4.0, ~> 11.0)

  In Podfile:
    FirebaseCoreExtension (= 11.3.0)

Specs satisfying the `FirebaseCoreExtension (= 11.3.0), FirebaseCoreExtension (= 11.4.0, ~> 11.0)` dependency were found, but they required a higher minimum deployment target.

@jenkinsernest
Copy link

[!] CocoaPods could not find compatible versions for pod "FirebaseCoreExtension": In snapshot (Podfile.lock): FirebaseCoreExtension (= 11.4.0, ~> 11.0)

  In Podfile:
    FirebaseCoreExtension (= 11.3.0)

Specs satisfying the `FirebaseCoreExtension (= 11.3.0), FirebaseCoreExtension (= 11.4.0, ~> 11.0)` dependency were found, but they required a higher minimum deployment target.

my deployment target is currently 14

@ncooke3
Copy link
Member

ncooke3 commented Oct 21, 2024

Hi @jenkinsernest, do you have a snippet of what the relevant part of your Podfile looks like? It also would be helpful to know how you ran into this issue? (e.g. was on version X and then upgraded to version Y where the build error happened)

@jenkinsernest
Copy link

ok thanks, once i deleted my pod lock it went through. having issues now with video_editor

@rvndsngwn
Copy link

+1

@noahclark556
Copy link

noahclark556 commented Oct 22, 2024

I was able to get a temporary workaround using this post install script, it should do the trick for those wanting to dev asap: At bottom of pod file:

In root project directory, run: sudo chown -R $(whoami).

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
file_path = 'Pods/FirebaseAuth/FirebaseAuth/Sources/Swift/Backend/AuthBackend.swift'
text = File.read(file_path)
new_contents = text.gsub('heartbeatLogger.headerValue()', 'await heartbeatLogger.asyncHeaderValue()')
File.open(file_path, "w") {|file| file.puts new_contents }
end

@mikehardy
Copy link
Contributor

mikehardy commented Oct 22, 2024

@ncooke3 - over in react-native-firebase I pinned our transitive deps (where we depend on firebase-ios-sdk) to <= $version style and that contained the slippage such that the compile worked, but some of the transitives still slip out to 11.4.0 despite us asking for 11.3.0

We can't pin the exact version because (for example) FirebaseCoreExtension doesn't always version, there was a 10.23.1 release or similar where everything went to 10.23.1 except that one which stayed at 10.23.0, so I removed the version on that one. And I think that led to this problem 😩 . But specifying our transitives as <= appears to work

PR where I did it - has the lock as well --> invertase/react-native-firebase#8074

@RawadZogheib
Copy link

Same issue

@nag4r
Copy link

nag4r commented Oct 22, 2024

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Attention This issue needs maintainer attention. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests