Closed alfjesus closed 1 month ago
Same here.
Same for me. Apparently this issue was fixed in BoringSSL 0.36.
This fix indeed seems to work. Adding this code piece to the podfile and then reinstalling the pods is a temporary fix.
This fix indeed seems to work. Adding this code piece to the podfile and then reinstalling the pods is a temporary fix.
@itsjustjo96 Yes, that fix works. However, when using Expo Prebuild i.e CNG (Continuous Native Generation ), the podfile gets overwritten every time.
Thank you for the workaround, @itsjustjo96 π . Unfortunately, I'll be away for a week. If there is someone who is able to raise a PR in the meanwhile, I can take a look when I get back. Otherwise, I can get a fix up next week π
Upstream firebase-ios-sdk specifies a version range for the transitive gRPC dependency with the problem:
Here's the upstream issue https://github.com/firebase/firebase-ios-sdk/issues/13115
When I do a fresh install using firebase-ios-sdk 11.2.0 it works to bring in a version of gRPC with the fix, that is a gRPC with version >= 1.65.2:
run pod install
and check output, here's a snippet:
Installing gRPC-C++ (1.65.5) Installing gRPC-Core (1.65.5)
gRPC and Firestore compile fine for me
So I do not believe this is an issue. You may need to remove your Podfile.lock and reinstall Pods to get the updated transitive dependency?
Note that if you are using the pre-compiled / binary Firebase from firestore-ios-sdk-frameworks they do not appear to have the fix but that is not a bug in react-native-firebase, it should be logged tracked over there.
Appears they are still on gRPC 1.65.1 which does not have the fix: https://github.com/search?q=repo%3Ainvertase%2Ffirestore-ios-sdk-frameworks+gRPC&type=code
A workaround would be to deintegrate the pre-compiled version and build firestore from current source with current transitive deps, and if compile speed is an issue you might try ccache
@mikehardy If I spawn up a new Expo project and add @react-native-firebase/firestore
the same build failure is happening so I think this is still an issue?
@alfjesus I don't use Expo so I cannot comment. I build things from scratch in order to make my assertions though, and I cannot reproduce - my build rig: https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh
(I have local changes in that one to do the test, but it shows what I'm doing - init of bare react-native project, scripted integration of react-native-firebase, build test)
@mikehardy Okay I see. It's just that my Expo project was building fine on Xcode 15.4 and as soon I upgraded to Xcode 16 this build issue started to happen.
I believe I see the problem - just noticed that react-native-firebase hasn't adopted firebase-ios-sdk v11+ yet
It is only in firebase-ios-sdk v11+ that the gRPC version was updated, you can see the commit that did the bump and expand the tag list to see it is only SDK v11+ tags: https://github.com/firebase/firebase-ios-sdk/commit/89a0ab37724c4c5609ee7e61fd347b75102f5a32
My build rig specifically overrides firebase-ios-sdk in order to compile test with newer versions in order to find problems before users do, but that means it doesn't always see problems with interop in older versions
Unfortunately if you use firebase-ios-sdk v11+ via an override, you'll have a new problem which is that the crashlytics init provider API signature upstream changed and is not compatible across the firebase-ios-sdk v10 / v11 boundary
(with a local patch that implements #8025, and a patch that implements #8021 which I just posted, firebase-ios-sdk v11.2.0 appears to work fine with gRPC and crashlytics in build testing at least)
@mikehardy Nice to hear that you have nailed down the root cause of the issue. Hopefully react-native-firebase can be adotped soon to use firebase-ios-sdk v11+. I believe that the number of users impacted by this issue will increase by every day that passed by when people upgrade to Xcode 16, unaware of this issue. Rollback is also not so easy since after upgrading to Xcode 16 on MacOS Sequoia, you can't roll back to Xcode 15.4.
Figured out a temporary patch to adopt in firebase-ios-sdk v11+. Builds successfully after patching.
Attaching the patch files @react-native-firebase+firestore+20.5.0.patch @react-native-firebase+app+20.5.0.patch
If you need crashlytics and firebase-ios-sdk v11+ you'll also want this:
diff --git a/node_modules/@react-native-firebase/crashlytics/ios/RNFBCrashlytics/RNFBCrashlyticsInitProvider.m b/node_modules/@react-native-firebase/crashlytics/ios/RNFBCrashlytics/RNFBCrashlyticsInitProvider.m
index b815df9..4e4961d 100644
--- a/node_modules/@react-native-firebase/crashlytics/ios/RNFBCrashlytics/RNFBCrashlyticsInitProvider.m
+++ b/node_modules/@react-native-firebase/crashlytics/ios/RNFBCrashlytics/RNFBCrashlyticsInitProvider.m
@@ -134,7 +134,6 @@ NSString *const KEY_CRASHLYTICS_JAVASCRIPT_EXCEPTION_HANDLER_CHAINING_ENABLED =
FIRComponent *crashlyticsInitProvider =
[FIRComponent componentWithProtocol:@protocol(RNFBCrashlyticsInitProviderProtocol)
instantiationTiming:FIRInstantiationTimingEagerInDefaultApp
- dependencies:@[] // note this will go away in firebase-ios-sdk v11+
creationBlock:creationBlock];
return @[ crashlyticsInitProvider ];
(I have it as patches/@react-native-firebase+crashlytics+20.5.0.patch) --> https://github.com/mikehardy/rnfbdemo/blob/main/patches/%40react-native-firebase%2Bcrashlytics%2B20.5.0.patch
Thank you! π I just want to confirm that with these 3 patches our Expo-project now builds again. π
Anyone know how to patch @react-native-firebase/messaging
similar to the above?
any updates on this?
Becuase this issue has been appear when i update xcode from 15.0 to 16.0 i got
clang: error: unsupported option '-G' for target 'arm64-apple-ios13.4-simulator'
Facing the same problem here. Hopping that react-native-firebase
release a new version with the fix.
Hey everyone! π
+1s, reports that it is also affecting you: that does not help it really makes the issue hard to read for others that want a workaround
The workaround right now is to patch react-native-firebase with the above patches:
And then we have to wait for an official release
If you subscribe to this issue using the button on the right of the github web UI you will be notified when it is closed so you know there is new information
Until then, we all have to use the patches or wait for a release.
This fix indeed seems to work. Adding this code piece to the podfile and then reinstalling the pods is a temporary fix.
For Expo project this solution works for me:
// withBoringSSLFix.js
const { withDangerousMod } = require('@expo/config-plugins'); const fs = require('fs'); const path = require('path');
const withBoringSSLFix = (config) => { return withDangerousMod(config, [ 'ios', (config) => { const podfilePath = path.join(config.modRequest.platformProjectRoot, 'Podfile'); let podfileContents = fs.readFileSync(podfilePath, 'utf-8');
// Fix for the Podfile
const fix = `
pre_install do |installer| installer.pod_targets.each do |pod| if pod.name.eql?('BoringSSL-GRPC') def pod.build_type; Pod::BuildType.static_library end end end end `;
// Adding the fix before the first 'post_install' occurrence
if (!podfileContents.includes("pod.name.eql?('BoringSSL-GRPC')")) {
const postInstallIndex = podfileContents.indexOf('post_install do |installer|');
if (postInstallIndex !== -1) {
podfileContents = podfileContents.slice(0, postInstallIndex) + fix + podfileContents.slice(postInstallIndex);
} else {
// If there's no post_install, append the fix at the end
podfileContents += fix;
}
fs.writeFileSync(podfilePath, podfileContents);
}
return config;
},
]); };
module.exports = withBoringSSLFix;
2. Update app.config.js (or if you don't have app.config.js, then convert app.json to app.config.js):
import withBoringSSLFix from './withBoringSSLFix';
export default { expo: { //... expo configs plugins: [ // ... other existing plugins withBoringSSLFix, ]} }
3. Regenerate the native iOS project
`npx expo prebuild -p ios --clean`
4. Run iOS project:
`npx expo run:ios`
This fix indeed seems to work. Adding this code piece to the podfile and then reinstalling the pods is a temporary fix. https://stackoverflow.com/a/78633109
For Expo project this solution works for me:
- Add withBoringSSLFix.js to the root of the project:
// withBoringSSLFix.js const { withDangerousMod } = require('@expo/config-plugins'); const fs = require('fs'); const path = require('path'); const withBoringSSLFix = (config) => { return withDangerousMod(config, [ 'ios', (config) => { const podfilePath = path.join(config.modRequest.platformProjectRoot, 'Podfile'); let podfileContents = fs.readFileSync(podfilePath, 'utf-8'); // Fix for the Podfile const fix = ` pre_install do |installer| installer.pod_targets.each do |pod| if pod.name.eql?('BoringSSL-GRPC') def pod.build_type; Pod::BuildType.static_library end end end end `; // Adding the fix before the first 'post_install' occurrence if (!podfileContents.includes("pod.name.eql?('BoringSSL-GRPC')")) { const postInstallIndex = podfileContents.indexOf('post_install do |installer|'); if (postInstallIndex !== -1) { podfileContents = podfileContents.slice(0, postInstallIndex) + fix + podfileContents.slice(postInstallIndex); } else { // If there's no post_install, append the fix at the end podfileContents += fix; } fs.writeFileSync(podfilePath, podfileContents); } return config; }, ]); }; module.exports = withBoringSSLFix;
- Update app.config.js (or if you don't have app.config.js, then convert app.json to app.config.js):
import withBoringSSLFix from './withBoringSSLFix'; export default { expo: { //... expo configs plugins: [ // ... other existing plugins withBoringSSLFix, ]} }
- Regenerate the native iOS project
npx expo prebuild -p ios --clean
- Run iOS project:
npx expo run:ios
This fix indeed seems to work. Adding this code piece to the podfile and then reinstalling the pods is a temporary fix. https://stackoverflow.com/a/78633109
For Expo project this solution works for me:
- Add withBoringSSLFix.js to the root of the project:
// withBoringSSLFix.js const { withDangerousMod } = require('@expo/config-plugins'); const fs = require('fs'); const path = require('path'); const withBoringSSLFix = (config) => { return withDangerousMod(config, [ 'ios', (config) => { const podfilePath = path.join(config.modRequest.platformProjectRoot, 'Podfile'); let podfileContents = fs.readFileSync(podfilePath, 'utf-8'); // Fix for the Podfile const fix = ` pre_install do |installer| installer.pod_targets.each do |pod| if pod.name.eql?('BoringSSL-GRPC') def pod.build_type; Pod::BuildType.static_library end end end end `; // Adding the fix before the first 'post_install' occurrence if (!podfileContents.includes("pod.name.eql?('BoringSSL-GRPC')")) { const postInstallIndex = podfileContents.indexOf('post_install do |installer|'); if (postInstallIndex !== -1) { podfileContents = podfileContents.slice(0, postInstallIndex) + fix + podfileContents.slice(postInstallIndex); } else { // If there's no post_install, append the fix at the end podfileContents += fix; } fs.writeFileSync(podfilePath, podfileContents); } return config; }, ]); }; module.exports = withBoringSSLFix;
- Update app.config.js (or if you don't have app.config.js, then convert app.json to app.config.js):
import withBoringSSLFix from './withBoringSSLFix'; export default { expo: { //... expo configs plugins: [ // ... other existing plugins withBoringSSLFix, ]} }
- Regenerate the native iOS project
npx expo prebuild -p ios --clean
- Run iOS project:
npx expo run:ios
@terrafant Even though your fix works, I don't understand why this option is preferable compared to patches? I mean once a new version of react-native-firebase is out, you will need to modify app.config.js again to remove the fix. A patch on the other hand is only bound and applied to a specific version, hence no code change is necessary when a new release is out.
@alfjesus because this way I don't have to reapply patches again if I need to redo npm install
@alfjesus because this way I don't have to reapply patches again if I need to redo
npm install
https://github.com/ds300/patch-package to the rescue! This is want I use. Applies patches automatically every time you do npm install
It may be that adopting new versions requires some sort of coordination / certification process for users such that even a release of react-native-firebase does not really help them quickly as someone may not be able to adopt it, and patches may not be allowed for certification reasons too π€· .
So I appreciate the Expo plugin workaround from @terrafant even if I also personally use + love the patch-package
module.
You never know which workaround people will need.
I believe the fixes required to adopt firebase-ios-sdk v11+ are in process though and there will be a release soon.
Until then, patch it, do a plugin, whichever works but hopefully everyone is able to continue working despite the yearly disruption that is the Xcode release day :-)
same here. ReactNative CLI Edit the Podfile, and the project started build like a charm
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'BoringSSL-GRPC'
target.source_build_phase.files.each do |file|
if file.settings && file.settings['COMPILER_FLAGS']
flags = file.settings['COMPILER_FLAGS'].split
flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
file.settings['COMPILER_FLAGS'] = flags.join(' ')
end
end
end
end
$RNMapboxMaps.post_install(installer)
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false,
# :ccache_enabled => true
)
end
end
same here. ReactNative CLI Edit the Podfile, and the project started build like a charm
post_install do |installer| installer.pods_project.targets.each do |target| if target.name == 'BoringSSL-GRPC' target.source_build_phase.files.each do |file| if file.settings && file.settings['COMPILER_FLAGS'] flags = file.settings['COMPILER_FLAGS'].split flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' } file.settings['COMPILER_FLAGS'] = flags.join(' ') end end end end $RNMapboxMaps.post_install(installer) # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 react_native_post_install( installer, config[:reactNativePath], :mac_catalyst_enabled => false, # :ccache_enabled => true ) end end
Thanks a lot! Saved me many hours on debugging π
nothing is working for me. getting same error every time. :(
βΊ Compiling @react-native-firebase/firestore Pods/BoringSSL-GRPC Β» tls_record.cc
β clang: error: unsupported option '-G' for target 'arm64-apple-ios13.4-simulator'
inside app > package.json, it shows old version of firebase SDK
is it because of that?
same here. ReactNative CLI Edit the Podfile, and the project started build like a charm
post_install do |installer| installer.pods_project.targets.each do |target| if target.name == 'BoringSSL-GRPC' target.source_build_phase.files.each do |file| if file.settings && file.settings['COMPILER_FLAGS'] flags = file.settings['COMPILER_FLAGS'].split flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' } file.settings['COMPILER_FLAGS'] = flags.join(' ') end end end end $RNMapboxMaps.post_install(installer) # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 react_native_post_install( installer, config[:reactNativePath], :mac_catalyst_enabled => false, # :ccache_enabled => true ) end end
This fix also work for me with Expo project.
I am using Expo so I modify the fix script like this:
# withBoringSSLFix.js
const { withDangerousMod } = require('@expo/config-plugins');
const fs = require('fs');
const path = require('path');
const withBoringSSLFix = (config) => {
return withDangerousMod(config, [
'ios',
(config) => {
const podfilePath = path.join(config.modRequest.platformProjectRoot, 'Podfile');
let podfileContents = fs.readFileSync(podfilePath, 'utf-8');
// Fix for the Podfile
const fix = `
# Fix BoringSSL-GRPC issue unsupported option '-G'
# Reason: BoringSSL-GRPC doesn't compatible with Xcode 16
# https://github.com/invertase/react-native-firebase/issues/8020?fbclid=IwY2xjawFc9KxleHRuA2FlbQIxMQABHenJMPNnLPuWcojthZjTcuIvoSKes2ATG69IuneRy2bUjAH3J2nYr-5nlQ_aem_XnJhQUj0eNzBy5xl6kjfmw#issuecomment-2359198907
installer.pods_project.targets.each do |target|
if target.name == 'BoringSSL-GRPC'
target.source_build_phase.files.each do |file|
if file.settings && file.settings['COMPILER_FLAGS']
flags = file.settings['COMPILER_FLAGS'].split
flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
file.settings['COMPILER_FLAGS'] = flags.join(' ')
end
end
end
end
`;
if (!podfileContents.includes("if target.name == 'BoringSSL-GRPC'")) {
const findString = 'post_install do |installer|';
const postInstallIndex = podfileContents.indexOf(findString);
if (postInstallIndex !== -1) {
podfileContents =
podfileContents.slice(0, postInstallIndex + findString.length) +
fix +
podfileContents.slice(postInstallIndex + findString.length);
}
fs.writeFileSync(podfilePath, podfileContents);
}
return config;
},
]);
};
module.exports = withBoringSSLFix;
Above works great
Released this morning, current RNFB should work with current Xcode once again
Great work @mikehardy and anyone else involved in the fix π
That's amazing news! @mikehardy Well done
@mikehardy After updating RNFB libraries to 21.0.0
, I'm still getting the same error about BoringSSL-GRPC library in Xcode. I've already cleaned build folder (via Build -> Clean Build Folder option in Xcode), removed node_modules and even deintegrated pods. Are there any additional steps I need to do after the upgrade, or maybe I'm doing something wrong? π€
@tboba not enough information to say, but this could happen if you are overriding the firebase iOS sdk in podfile. My build demonstrator at GitHub mikehardy/rnfbdemo has no problem showing successful build now
@mikehardy Yup! Changing manually version of FirebaseCore
was the culprit here. Thanks for the hint!
Who knows how to fix this?
@Emmanueldmlr I believe all the fixes are documented in this issue. If you are using current react-native-firebase and remove any firebase-ios-sdk version pins you've placed in Podfile, it will build. If it does not, you have a local project problem
Conclusive proof it works, a start-from-scratch fully automated build demo: https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh
Getting this error:
/path/to/project/node_modules/@react-native-firebase/crashlytics/ios/RNFBCrashlytics/RNFBCrashlyticsInitProvider.m:135:21 No known class method for selector 'componentWithProtocol:instantiationTiming:creationBlock:'
using
"@react-native-firebase/analytics": "21.2.0",
"@react-native-firebase/app": "21.2.0",
"@react-native-firebase/crashlytics": "21.2.0",
"@react-native-firebase/database": "21.2.0",
"@react-native-firebase/messaging": "21.2.0",
"@react-native-firebase/remote-config": "21.2.0",
the patches here have already been implemented in the latest versions from what I could investigate.
I'm using "react-native": "0.72.6"
and xcode 16.0
Getting this error:
/path/to/project/node_modules/@react-native-firebase/crashlytics/ios/RNFBCrashlytics/RNFBCrashlyticsInitProvider.m:135:21 No known class method for selector 'componentWithProtocol:instantiationTiming:creationBlock:'
using
"@react-native-firebase/analytics": "21.2.0", "@react-native-firebase/app": "21.2.0", "@react-native-firebase/crashlytics": "21.2.0", "@react-native-firebase/database": "21.2.0", "@react-native-firebase/messaging": "21.2.0", "@react-native-firebase/remote-config": "21.2.0",
the patches here have already been implemented in the latest versions from what I could investigate.
I'm using
"react-native": "0.72.6"
and xcode 16.0
Same here but using react-native 0.73.4 and xcode 15.4
/path/to/project/node_modules/@react-native-firebase/crashlytics/ios/RNFBCrashlytics/RNFBCrashlyticsInitProvider.m:135:21 No known class method for selector 'componentWithProtocol:instantiationTiming:creationBlock:'
You are posting on an unrelated issue, this is not related
You are using an outdated version of firebase-ios-sdk relative to react-native-firebase, we test cross-compatibility so that our code here works with the firebase-ios-sdk version we specify in @react-native-firebase/app
package.json
If you pin your firebase-ios-sdk to some other version for any reason, you may see errors like this, and it is why there is a warning that if you pin your version manually you are on your own
Remove any version pins you may have for firebase-ios-sdk rerun pod install and it will build
hey @mikehardy I've looked for that firebase-ios-sdk pins but I can't seem to find any configuration that I have made to pin it. My project runs with all the other listed firebase libraries if I don't use the crashlytics one. As soon as I install that one I get the error described.
Wouldn't that mean that this firebase-ios-sdk is correctly configured for the others but not for crashlytics? How come? And how can I go on debugging this?
Step 1, verify you are on all consistent + current versions of react-native-firebase:
mike@isabela:~/work/invertase/rnfbdemo/rnfbdemo (main) % cat package.json |grep -i react-native-firebase
"@react-native-firebase/analytics": "21.2.0",
"@react-native-firebase/app": "21.2.0",
"@react-native-firebase/app-check": "21.2.0",
"@react-native-firebase/app-distribution": "21.2.0",
"@react-native-firebase/auth": "21.2.0",
"@react-native-firebase/crashlytics": "21.2.0",
"@react-native-firebase/database": "21.2.0",
"@react-native-firebase/dynamic-links": "21.2.0",
"@react-native-firebase/firestore": "21.2.0",
"@react-native-firebase/functions": "21.2.0",
"@react-native-firebase/in-app-messaging": "21.2.0",
"@react-native-firebase/installations": "21.2.0",
"@react-native-firebase/messaging": "21.2.0",
"@react-native-firebase/ml": "21.2.0",
"@react-native-firebase/perf": "21.2.0",
"@react-native-firebase/remote-config": "21.2.0",
"@react-native-firebase/storage": "21.2.0",
2- make sure you either have no pin or it is the correct one:
mike@isabela:~/work/invertase/rnfbdemo/rnfbdemo (main) % cat ios/Podfile |grep -i firebase
$RNFirebaseAsStaticFramework = true
$FirebaseSDKVersion = '11.4.2'
Note: that is a version pin. You really should not have one. I have one in rnfbdemo because I test cross-compatibility across different versions and need to pin it to force wrong versions to reproduce errors or to force new versions to make sure we are forward-compatible. But that's what the version pin looks like if it is correct for now, the current release
3- Run yarn or npm install or whatever you need to do to install the javascript packages
4- Run cd ios && rm -f Podfile.lock && pod install --repo-update
to make sure you get the right native version
5- verify you have the right native version:
mike@isabela:~/work/invertase/rnfbdemo/rnfbdemo (main) % cat ios/Podfile.lock |grep -i crashlytics
- Firebase/Crashlytics (11.4.2):
- FirebaseCrashlytics (~> 11.4.0)
- FirebaseCrashlytics (11.4.0):
- RNFBCrashlytics (21.2.0):
- Firebase/Crashlytics (<= 11.4.2)
- "RNFBCrashlytics (from `../node_modules/@react-native-firebase/crashlytics`)"
- FirebaseCrashlytics
RNFBCrashlytics:
:path: "../node_modules/@react-native-firebase/crashlytics"
FirebaseCrashlytics: 41bbdd2b514a8523cede0c217aee6ef7ecf38401
RNFBCrashlytics: 08d706368909b2996ac605c07ba8be75b54b2e80
mike@isabela:~/work/invertase/rnfbdemo/rnfbdemo (main) % cat ios/Podfile.lock |grep -i firebasecore|sort|uniq
- FirebaseCore
- FirebaseCore (= 11.4.2)
- FirebaseCore (~> 11.0)
- FirebaseCore (~> 11.4)
- FirebaseCoreExtension
- FirebaseCoreExtension (<= 11.4.2)
- FirebaseCoreExtension (~> 11.4)
- FirebaseCoreInternal
- FirebaseCoreInternal (< 12.0, >= 11.4.2)
- FirebaseCore (11.4.2):
- FirebaseCoreExtension (11.4.1):
- FirebaseCoreInternal (11.4.2):
FirebaseCore: 6b32c57269bd999aab34354c3923d92a6e5f3f84
FirebaseCoreExtension: f1bc67a4702931a7caa097d8e4ac0a1b0d16720e
FirebaseCoreInternal: 35731192cab10797b88411be84940d2beb33a238
If you don't see versions that are all 11+ in there, you have problems. What are your problems? Sorry, no idea, but somewhere something must be forcing you to get the wrong firebase-ios-sdk version.
It won't be in this repository a) assuming you are all on react-native-firebase same version, all 21.2.0, and b) assuming you do not have a version pin or if you do it is for v11+
That's all I can say for certainty. There is not a problem in this repository, and we can't offer infinite support for project-specific issues so I likely won't have time to comment further
I'm going to hide all these comments as off-topic as they are a hijack of the original issue and clutter up the original issue information for people actually looking. Sorry everyone that was interested in the original issue for the off-topic issue notification spam
Why is this issue closed, looks like many of us still have the issue.
I am using Expo 51 with "@react-native-firebase/firestore": "^21.2.0", and keep on getting that error:
I am using Expo so I modify the fix script like this:
# withBoringSSLFix.js const { withDangerousMod } = require('@expo/config-plugins'); const fs = require('fs'); const path = require('path'); const withBoringSSLFix = (config) => { return withDangerousMod(config, [ 'ios', (config) => { const podfilePath = path.join(config.modRequest.platformProjectRoot, 'Podfile'); let podfileContents = fs.readFileSync(podfilePath, 'utf-8'); // Fix for the Podfile const fix = ` # Fix BoringSSL-GRPC issue unsupported option '-G' # Reason: BoringSSL-GRPC doesn't compatible with Xcode 16 # https://github.com/invertase/react-native-firebase/issues/8020?fbclid=IwY2xjawFc9KxleHRuA2FlbQIxMQABHenJMPNnLPuWcojthZjTcuIvoSKes2ATG69IuneRy2bUjAH3J2nYr-5nlQ_aem_XnJhQUj0eNzBy5xl6kjfmw#issuecomment-2359198907 installer.pods_project.targets.each do |target| if target.name == 'BoringSSL-GRPC' target.source_build_phase.files.each do |file| if file.settings && file.settings['COMPILER_FLAGS'] flags = file.settings['COMPILER_FLAGS'].split flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' } file.settings['COMPILER_FLAGS'] = flags.join(' ') end end end end `; if (!podfileContents.includes("if target.name == 'BoringSSL-GRPC'")) { const findString = 'post_install do |installer|'; const postInstallIndex = podfileContents.indexOf(findString); if (postInstallIndex !== -1) { podfileContents = podfileContents.slice(0, postInstallIndex + findString.length) + fix + podfileContents.slice(postInstallIndex + findString.length); } fs.writeFileSync(podfilePath, podfileContents); } return config; }, ]); }; module.exports = withBoringSSLFix;
Can you please provide exact steps and your version of Expo & Xcode
@hamzalakrati it is closed because it is fixed. We get 534,000+ downloads a week and this was closed 3 weeks ago If it were still a problem for people with correctly configured projects, we would know by now. Also, my fully automated build demonstrator would fail, but it does not, it works: https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh
So it's fixed but your project has a problem.
Check your Podfile.lock and examing the grpc dependency to make sure it is the right one as mentioned in this comment:
https://github.com/invertase/react-native-firebase/issues/8020#issuecomment-2356606866
Maybe remove your Podfile.lock and pod install again. Make sure you have no firebase-ios-sdk version pins, make sure react-native-firebase is all the same version and all the current version.
@mikehardy I'm on Xcode 16.1 with target 18.1 and get this error for both 21.3.0 and 21.4.0, our CI machine which uses Xcode 16.0 seems to build without a problem. Are you sure that there is no new incompability?
@stefan-schweiger In response to your query I just ran my build repro / demonstrator make-demo.sh right now to confirm everything is building with current tools
It all works fine, from scratch, rnfb 21.4.0, Xcode 16.1 target iOS 18.1 simulator debug and release
success Successfully built the app
Check your Podfile.lock as mentioned https://github.com/invertase/react-native-firebase/issues/8020#issuecomment-2356606866
There are no incompatibilities I'm aware of
Issue
Getting the following "unsupported option -G" build error when trying to build with Expo 51 and Xcode 16. I'm guessing that the dependency for pod BoringSSL-GRPC needs an update.
Project Files
Javascript
Click To Expand
#### `package.json`: ```json # N/A ``` #### `firebase.json` for react-native-firebase v6: ```json # N/A ```
iOS
Click To Expand
#### `ios/Podfile`: - [ ] I'm not using Pods - [x] I'm using Pods and my Podfile looks like: ```ruby # N/A ``` #### `AppDelegate.m`: ```objc // N/A ```
Android
Click To Expand
#### Have you converted to AndroidX? - [ ] my application is an AndroidX application? - [ ] I am using `android/gradle.settings` `jetifier=true` for Android compatibility? - [ ] I am using the NPM package `jetifier` for react-native compatibility? #### `android/build.gradle`: ```groovy // N/A ``` #### `android/app/build.gradle`: ```groovy // N/A ``` #### `android/settings.gradle`: ```groovy // N/A ``` #### `MainApplication.java`: ```java // N/A ``` #### `AndroidManifest.xml`: ```xml ```
Environment
Click To Expand
**`react-native info` output:** ``` System: OS: macOS 15.0 CPU: (12) arm64 Apple M2 Pro Memory: 465.64 MB / 32.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 20.17.0 path: /var/folders/jn/92972fv55qdc10m6nk8nps3w0000gn/T/yarn--1726562737749-0.4741444639345749/node Yarn: version: 1.22.21 path: /var/folders/jn/92972fv55qdc10m6nk8nps3w0000gn/T/yarn--1726562737749-0.4741444639345749/yarn npm: version: 10.8.2 path: /opt/homebrew/opt/node@20/bin/npm Watchman: version: 2024.07.08.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.15.2 path: /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 24.0 - iOS 18.0 - macOS 15.0 - tvOS 18.0 - visionOS 2.0 - watchOS 11.0 Android SDK: Not Found IDEs: Android Studio: 2023.2 AI-232.10300.40.2321.11567975 Xcode: version: 16.0/16A242d path: /usr/bin/xcodebuild Languages: Java: version: 17.0.10 path: /usr/bin/javac Ruby: version: 2.6.10 path: /usr/bin/ruby npmPackages: "@react-native-community/cli": Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.74.5 wanted: 0.74.5 react-native-macos: Not Found npmGlobalPackages: "*react-native*": Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: true newArchEnabled: false ``` - **Platform that you're experiencing the issue on**: - [x] iOS - [ ] Android - [ ] **iOS** but have not tested behavior on Android - [ ] **Android** but have not tested behavior on iOS - [ ] Both - **`react-native-firebase` version you're using that has this issue:** - `20.5.0` - **`Firebase` module(s) you're using that has the issue:** - `firestore` - **Are you using `TypeScript`?** - `Y` & `5.3.3`
React Native Firebase
andInvertase
on Twitter for updates on the library.