Closed kuhnroyal closed 1 year ago
the build fails.
:thinking:
Any ideas?
Not without more information unfortunately. Build failures usually contain lots of information indicating the exact file that failed to build and the reason why, typically a nice detailed error message from the compiler. You haven't included that. Could you share the details of the build failure and how we might reproduce it?
(philosophically, along the lines of https://stackoverflow.com/help/how-to-ask / https://stackoverflow.com/help/mcve )
Hey @mikehardy,
Here is a minimal reproducible example: https://github.com/AlexSheiko/boringssl_compile_error
A temporary workaround (to build the app) is to replace version 9.2.0
with 8.15.0
in all files and running cd ios && pod update Firebase/CoreOnly && cd ..
I'm traveling right now, I can't actually run the example unfortunately -
Build failures usually contain lots of information indicating the exact file that failed to build and the reason why, typically a nice detailed error message from the compiler
What was the actual error? Can you include that?
One thing to note is that if you are using firebase_core 4.19.0 and above (apparently? based on this commit and it's tags: https://github.com/firebase/flutterfire/commit/79610162460b8877f3bc727464a7065106f08079) you cannot go back down to firebase-ios-sdk 8.15.x (or it's components, like firestore...) as I don't believe they will be compatible. You need your version of this framework to match the one used here: https://github.com/firebase/flutterfire/blob/master/packages/firebase_core/firebase_core/ios/firebase_sdk_version.rb (or, in the rare case you are overriding things, to match the override version - but it's got to be v9+ of firebase-ios-sdk or it's components)
Sorry the actual error is the title: Framework not found BoringSSL-GRPC
- the logs don't say much more.
Oh, sorry! It was the title. Dang - that's not an immediately obvious error, without being able to run this I won't be able to help in it down and I won't have time for quite a while since I'm traveling :sweat_smile: - maybe @Salakar can have a look :thinking:
Same issue here, I had Error (Xcode): Framework not found BoringSSL-GRPC
Same issue with me Error (Xcode): Framework not found BoringSSL-GRPC
. Tried removing/adding use_frameworks
or use_modular_headers
or pod 'BoringSSL-GRPC'
but no success.
Error (Xcode): Framework not found BoringSSL-GRPC
Encountered error while archiving for device.
Same issue here.
here is my Podfile
snippet
def default_pods
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
pod 'GoogleUtilities'
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.2.0'
end
if I replace the FirebaseFirestore line with pod 'FirebaseFirestore'
, the archiving will pass.
Setting XCode → Runner → Project → Runner → iOS Deployment Target: 11
And updating to
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :branch => 'main'
helped me launch the app for development
But the problem reappeared in release mode after running flutter build ios --release
:
Error (Xcode): Framework not found BoringSSL-GRPC
Encountered error while building for device.
The temporary solution is to use pod 'FirebaseFirestore'
.
let the computer compile BoringSSL-GRPC
, but this will take a long time. For now, I only use Android clients for development testing. ☹️
I spent 4 hours to solve this problem
The BoringSSL-GRPC
error happens even if I remove precompiled Firestore SDK.
I did many things, ... And just somehow, just suddenly ... It built for iOS and archiving worked.
It worked with the precompiled Firestore SDK. I use 9.3.0 of precompiled Firestore SDK and with all the latest version of Firebase related packages.
Please somebody try and leave comment.
Podfile)
# Uncomment this line to define a global platform for your project
platform :ios, '13.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.3.0'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
Firebase packages)
firebase_core: ^1.20.1
firebase_auth: ^3.6.3
firebase_database: ^9.1.1
cloud_firestore: ^3.4.4
firebase_dynamic_links: ^4.3.4
firebase_storage: ^10.3.5
firebase_messaging: ^12.0.2
cloud_functions: ^3.3.4
flutterfire_ui: ^0.4.3+5
firebase_analytics: ^9.3.0
firebase_crashlytics: ^2.8.6
Here is my Podfile
$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
use_frameworks!
def default_pods
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
pod 'GoogleUtilities'
# pod 'FirebaseAuth'
# pod 'FirebaseFirestore'
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.4.0'
end
target 'Runner' do
default_pods
end
target 'ImageNotification' do
pod 'GoogleUtilities'
pod 'Firebase/Messaging'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
flutter firebase packages:
firebase_core: ^1.20.1
firebase_crashlytics: ^2.8.7
firebase_analytics: ^9.3.1
firebase_messaging: ^12.0.2
flutter_local_notifications: ^9.7.1
finally, the archiving is not success. the reason is also not found BoringSSL-GRPC.
I think this was probably related to the minimum target issue (https://github.com/invertase/firestore-ios-sdk-frameworks/issues/56#issuecomment-1228644812) and the problem for debug or release that someone saw could be because it's possible to have different minimums for either.
What I can say for sure is that in relation to #56 we had several people doing FlutterFire builds and they where working so I know this is not a general problem with this pre-compiled framework any more, assuming you are on current versions (that's 9.5.0-1 here right now - to fix the minimum target issue) and you have bumped your minimum deployment target in Podfile and in your .xcproj file
I'm gong to close this as no longer actionable then (after the release of 9.5.0-1 here) but we can reopen if people are still having the problem after bumping minimum deployment version targets / integrating 9.5.0-1
With the new release of https://pub.dev/packages/firebase_core I updated
FirebaseFirestore
to 9.2.0 and now the build fails.I played around with
use_frameworks
anduse_modular_headers
but no success there.Any ideas?