-
Notifications
You must be signed in to change notification settings - Fork 4k
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
FlutterFire: Can't run or build Flutter App for iOS 18.1 #13563
Comments
Also running into this. I was able to repro as follows:
Flutter doctor
Full error log from "flutter run"
|
Issue with firebase ios-sdk and cocoapods: |
I am also getting this error after upgrading to cocoapods-1.16.1 while building ios
Error (Xcode): Undefined symbol: absl::lts_20240116::FormatTime(absl::lts_20240116::string_view, absl::lts_20240116::Time, absl::lts_20240116::TimeZone) Error (Xcode): Undefined symbol: absl::lts_20240116::SimpleAtof(absl::lts_20240116::string_view, float*) Error (Xcode): Undefined symbol: absl::lts_20240116::Base64Escape(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::UnknownError(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::log_internal::LogMessage::AtLocation(absl::lts_20240116::string_view, int) Error (Xcode): Undefined symbol: void Error (Xcode): Undefined symbol: void Error (Xcode): Undefined symbol: absl::lts_20240116::log_internal::LogMessage::operator<<(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::log_internal::PrependVModule(absl::lts_20240116::string_view, int) Error (Xcode): Undefined symbol: absl::lts_20240116::log_internal::LogMessageFatal::LogMessageFatal(char const*, int, absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::InternalError(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::NotFoundError(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::StrReplaceAll(absl::lts_20240116::string_view, Error (Xcode): Undefined symbol: absl::lts_20240116::Base64Unescape(absl::lts_20240116::string_view, std::__1::basic_string<char, std::__1::char_traits, Error (Xcode): Undefined symbol: absl::lts_20240116::CancelledError(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::flags_internal::AbslParseFlag(absl::lts_20240116::string_view, std::__1::basic_string<char, Error (Xcode): Undefined symbol: absl::lts_20240116::flags_internal::AbslParseFlag(absl::lts_20240116::string_view, std::__1::vector<std::__1::basic_string<char, Error (Xcode): Undefined symbol: absl::lts_20240116::flags_internal::AbslParseFlag(absl::lts_20240116::string_view, bool*, std::__1::basic_string<char, Error (Xcode): Undefined symbol: absl::lts_20240116::flags_internal::AbslParseFlag(absl::lts_20240116::string_view, int*, std::__1::basic_string<char, Error (Xcode): Undefined symbol: absl::lts_20240116::flags_internal::AbslUnparseFlag(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::status_internal::StatusRep::SetPayload(absl::lts_20240116::string_view, absl::lts_20240116::Cord) Error (Xcode): Undefined symbol: absl::lts_20240116::BytesToHexString(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::EqualsIgnoreCase(absl::lts_20240116::string_view, absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::UnavailableError(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::numbers_internal::safe_strto32_base(absl::lts_20240116::string_view, int*, int) Error (Xcode): Undefined symbol: absl::lts_20240116::numbers_internal::safe_strto64_base(absl::lts_20240116::string_view, long long*, int) Error (Xcode): Undefined symbol: absl::lts_20240116::numbers_internal::safe_strtou32_base(absl::lts_20240116::string_view, unsigned int*, int) Error (Xcode): Undefined symbol: absl::lts_20240116::numbers_internal::safe_strtou64_base(absl::lts_20240116::string_view, unsigned long long*, int) Error (Xcode): Undefined symbol: absl::lts_20240116::strings_internal::AppendPieces(std::__1::basic_string<char, std::__1::char_traits, Error (Xcode): Undefined symbol: absl::lts_20240116::strings_internal::StringifySink::Append(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::strings_internal::CatPieces(std::initializer_listabsl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::variant_internal::ThrowBadVariantAccess() Error (Xcode): Undefined symbol: absl::lts_20240116::EndsWithIgnoreCase(absl::lts_20240116::string_view, absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::UnimplementedError(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::WebSafeBase64Escape(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: bool Error (Xcode): Undefined symbol: absl::lts_20240116::InvalidArgumentError(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::StartsWithIgnoreCase(absl::lts_20240116::string_view, absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::UnauthenticatedError(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::DeadlineExceededError(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::PermissionDeniedError(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::WebSafeBase64Unescape(absl::lts_20240116::string_view, std::__1::basic_string<char, std::__1::char_traits, Error (Xcode): Undefined symbol: absl::lts_20240116::ResourceExhaustedError(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::FailedPreconditionError(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::Cord::GetFlatAux(absl::lts_20240116::cord_internal::CordRep*, absl::lts_20240116::string_view*) Error (Xcode): Undefined symbol: absl::lts_20240116::Cord::InlineRep::AppendArray(absl::lts_20240116::string_view, Error (Xcode): Undefined symbol: absl::lts_20240116::Cord::Cord(absl::lts_20240116::string_view, Error (Xcode): Undefined symbol: absl::lts_20240116::Status::Status(absl::lts_20240116::StatusCode, absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::CEscape(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::ByString::ByString(absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::CUnescape(absl::lts_20240116::string_view, std::__1::basic_string<char, std::__1::char_traits, Error (Xcode): Undefined symbol: absl::lts_20240116::ParseTime(absl::lts_20240116::string_view, absl::lts_20240116::string_view, absl::lts_20240116::Time*, Error (Xcode): Undefined symbol: absl::lts_20240116::operator<<(std::__1::basic_ostream<char, std::__1::char_traits>&, absl::lts_20240116::string_view) Error (Xcode): Undefined symbol: absl::lts_20240116::string_view::find_first_of(absl::lts_20240116::string_view, unsigned long) const Error (Xcode): Undefined symbol: absl::lts_20240116::string_view::find(absl::lts_20240116::string_view, unsigned long) const Error (Xcode): Undefined symbol: absl::lts_20240116::string_view::find(char, unsigned long) const Error (Xcode): Undefined symbol: absl::lts_20240116::string_view::rfind(char, unsigned long) const Error (Xcode): Undefined symbol: absl::lts_20240116::status_internal::StatusRep::GetPayload(absl::lts_20240116::string_view) const Error (Xcode): Undefined symbol: absl::lts_20240116::status_internal::StatusRep::ForEachPayload(absl::lts_20240116::FunctionRef<void (absl::lts_20240116::string_view, Error (Xcode): Undefined symbol: absl::lts_20240116::ByChar::Find(absl::lts_20240116::string_view, unsigned long) const Error (Xcode): Undefined symbol: absl::lts_20240116::ByString::Find(absl::lts_20240116::string_view, unsigned long) const Encountered error while building for device. |
Issue persistent in cocoapods-1.16.1 |
adding this to Podfile solved the problem for me |
Just try Fixed
and
|
Thank you @omerinanc & @alidemircans, can confirm the fix woks. Waster 2 days on this already. |
Hey @taufiq-husain & anyone experiencing this issue, what version of cocoapods are you running? According to this invertase/react-native-firebase#8082 (comment) If you drop Cocoapods to version |
I've been encountering "Undefined symbol" errors related to the Abseil library when building my Flutter project for iOS. After extensive troubleshooting, I've identified that the cloud_firestore plugin is causing these errors. I've tried the following steps but the issue persists: Updating all plugins and Flutter itself to the latest versions. ... dependencies: cupertino_icons: ^1.0.8 google_mlkit_commons: ^0.9.0 firebase_core: ^3.6.0 [✓] Flutter (Channel stable, 3.24.4, on macOS 15.0.1 24A348 darwin-arm64, locale tr-TR) [✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 16.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2024.1) [✓] VS Code (version 1.95.0) [✓] Connected device (6 available) [✓] Network resources • No issues found! |
This doesn't solve the problem if you have dependencies like url_launcher. I got this error when using that extra stuff in my Podfile:
Happens if you create a blank project from scratch and you simply add url_launcher as a dependency. Any other ideas to fix this problem? |
@AngeloAvv @kadriizer - see my update: #13563 (comment) |
That should be logged in the url_launcher repo (assuming it has one) as it does not appear to be part of FlutterFire. Any repo may have problems with the new Xcode build settings that cocoapods >= 1.16 and all repos will need to adjust. Until then you must uninstall cocoapods 1.16.x / xcodeproj 1.26.0 gems and use cocoapods 1.15.2 / xcodeproj 1.25.0 I believe. |
But url_launcher works OOB if you don't apply CLANG_CXX_LANGUAGE_STANDARD to gnu++14 to abseil. That's why I was wondering if this is the best way to tackle the problem. |
Having the same issue here, removed Url_Launcher and moved to a new issue stating |
I've tried both @alidemircans and @omerinanc steps first because I didn't want to downgrade cocoapods. Neither works for me because I have additional 3rd party packages that causes compiling issues then (such as URL launcher - which is part of the flutter package I suppose?). Then I tried downgrading to 1.16.0 and 1.15.2 for cocoapods according to @russellwheatley and @mikehardy suggestions. It still gives a lot of different errors now. Now my question is, is this still the right place to ask about this issue? Is it a flutter issue itself? |
Same, downgrading to cocoapods 1.15.2 leads to different C-like-related problems |
I believe you need to downgrade cocoapods to 1.15.2 and xcodeproj to 1.25.0 I don't understand how the url_launcher problem could be related to the build setting for abseil, since that build setting is scoped in the post_install block to only affect abseil. @valentinozegna that is enormous "me too" post that does not add new information but does cause a lot of scrolling! |
I removed my comment. I don't think it's possible to use cocoapods 1.15.2 and xcodeproj 1.25.0 at the same time, I get dependencies errors. I tried the following:
As you can see it installed xcodeproj 1.26.0. If I try to manually downgrade to 1.25.0, the iOS build fails because it says that cocoapods 1.15.2 requires xcodeproj 1.26. Now, I tried compiling for iOS with cocoapods 1.15.2 and xcodeproj 1.26, this is the output:
|
So I was able to install cocoapods 1.15.2 and xcodeproj 1.25 by doing the following:
I removed my Podfile.lock, ran pod deintegrate, pod install, and tried to build the app again. The console log is GIGANTIC, so I am gonna attach it as a txt file to this comment. This huge console log with errors is the same that I was observing in the past few days, until I upgraded to cocoapods 1.16.1. |
I've done and tried all of the following:
None of these work anymore for iOS. Flutter isn't compiling or running on iOS at all. Here's the most recent trial with cocoapods version 1.15.2, xcodeproj 1.25.0 and on iOS 17.5 simulator. I've attached the output log file: |
I tested iOS 18.1 simulator with every FlutterFire plugin and it successfully built. Cocoapods version I'd advise sticking to these versions until build issues have been resolved upstream. |
I've finally been able to make it work in my iOS simulators. This is what I did to get there:
Then I cleaned the project, updated all libraries again and ran it on a simulator running iOS 18.1 (latest). It worked! No edits/hacks needed like the initial solution suggestions from this thread. Here's my configurations:
|
@taufiq-husain that's because:
...those two versions are brand new, and the changelog on them indicates they were issued as reverts of the breaking change that has been plaguing all the builds Stated differently: if you update cocoapods (and xcodeproj) gems again, to current, with no need to do anything else except another |
After reinstalling the Flutterfire CLI and updating my dev environment as you see below, everything worked!
I had to reinstall the Flutterfire CLI because I noticed Xcode was throwing a compilation error due a missing script in Firebase Crashlytics. I tried to check my flutterfire version and the executable could not be found. Don't ask me why and how, but somehow it got wiped from my system. Simply reinstalling it did the trick! |
+1 |
I solved the problem updating to CocoaPods 1.16.2 |
I've been struggling 2 days. I found this solution. Hope it'll help you too 🙂
|
Is there an existing issue for this?
Which plugins are affected?
Core
Which platforms are affected?
iOS
Description
I just tried running
flutter run
orflutter build ipa --release
and it fails with the errors mentioned in the "logs" section. Note that I created a new Flutter project for my own sanity check and tested it without ANY external dependencies and it built successfully for the new iOS. Sincegrpc-core
is part of Firebase/FlutterFire, I'm assuming it's an issue with Firebase.Note that it doesn't fail on Android or Web.
Reproducing the issue
I have a feeling this has to do something with iOS 18.1 or the newly updated macOS. I can't say definitively but I was able to build all my apps for iOS as of yesterday but today I can't run or build on iOS.
Firebase Core version
3.6.0
Flutter Version
3.24.4
Relevant Log Output
Flutter dependencies
Additional context and comments
No response
The text was updated successfully, but these errors were encountered: