I am working on an older react-native project into which react-native-firebase was recently added. The iOS build runs fine locally using Xcode, but it fails during a react-native-firebase compilation step when run on Bitrise using Fastlane. The Bitrise build system is configured to be the same as my local environment.
Note: I've replaced the names and IDs with 'MyApp' and 'xxxx' in the attached snippets.
Click To Expand
#### `ios/Podfile`: - [ ] I'm not using Pods - [x] I'm using Pods and my Podfile looks like:
platform :ios, '9.0'
target 'MyApp' do
pod 'Firebase/Core', '~> 5.15.0'
pod 'GoogleIDFASupport', '~> 3.14.0'
end
#### `AppDelegate.m`:
#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <BugsnagReactNative/BugsnagReactNative.h>
#import <React/RCTLinkingManager.h>
#import <Firebase.h>
@implementation AppDelegate
@synthesize oneSignal = _oneSignal;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[BugsnagReactNative start];
[FIRApp configure];
NSURL *jsCodeLocation;
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
self.oneSignal = [[RCTOneSignal alloc] initWithLaunchOptions:launchOptions appId:@"xxxx-xxxx-xxxx-xxxx-xxxxxxxxx"];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"MyApp"
initialProperties:nil
launchOptions:launchOptions];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
return YES;
}
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
return [RCTLinkingManager application:application openURL:url options:options];
}
@end
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`:
// N/A
#### `android/app/build.gradle`:
// N/A
#### `android/settings.gradle`:
// N/A
#### `MainApplication.java`:
// N/A
#### `AndroidManifest.xml`:
<!-- N/A -->
Click To Expand
**`react-native info` output:**
react-native "0.57.5"
OS: macOS 10.14
Xcode: 10.2.x
Fastlane: latest (2.5.0)
iOS SDK: iOS 12.2
- **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:**
- `5.2.1`
- **`Firebase` module(s) you're using that has the issue:**
- ``
- **Are you using `TypeScript`?**
- `N`
Think react-native-firebase is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]
React Native Firebase and Invertase on Twitter for updates on the library.What was the full build error? It might be the same as an existing error here in cloud build systems (search for AppCenter in the open issues here I think)
This is all the error output available:
The following build commands failed:
CompileC /Users/vagrant/Library/Developer/Xcode/DerivedData/MyAppdvouwrgiuhwdovuhwrvhwiobhpw/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/RNFirebase.build/Release-iphoneos/RNFirebase.build/Objects-normal/armv7/RNFirebaseUtil.o /Users/vagrant/git/node_modules/react-native-firebase/ios/RNFirebase/RNFirebaseUtil.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
[12:27:46]: Exit status: 65
The build runs fine locally so I can't get the raw logging output.
I forgot to mention what I have already tried without success:
I have the same issue when updated from 5.4.2 to 5.5.5.
Hello 馃憢, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.
@SanvirSovTech Hi, I'm having the same issue may I know have you found a solution yet?
@johnlim5847 I ended up removing react-native-firebase from my project and using the JavaScript Firebase SDK instead.
@SanvirSovTech thanks for your reply! unfortunately, I can't do that due to I have to use crashlytics and remote config in my project.
@raymond4entrak Hi, may I know have you found a solution for this issue?
This may have nothing to do with your problem, but in some related reading yesterday I saw quite a few bitrise CI related issues where the filesystem was case sensitive or parent directories had spaces in the names, and that caused failures. Apparently the react-native build can have problems if you have capitals in some directory names but cd into the directories on a case-insensitive filesystem by a name with different casing (so the cd works because case-insensitive file system, but the names are unexpected now between cwd and build paths). May have nothing to do with anything, but these CI issues are pretty strange so who knows.
Hi @mikehardy, thanks for your reply. I have managed to solve it. The problem is I used to integrate react-native-firebase manually but I have migrated to pod because I want to update to 0.60.0 so I have some leftover setting in the project like the Search Paths and Firebase.h in Framework folder. So after I clean it up I still can't archive my app and then I search through the issues and found out that because I'm using use_framework! in my pod file so I deleted the use_framework! and the app can be archive without a problem.
Hence, my app on Bitrise can be built without a problem now!! (If you can archive the app on Xcode but fail at fastlane gym maybe you should check what scheme are you using in gym and your Xcode because of the build configuration)
I'm using react-native-firebase": "^5.5.6" and this is my podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'example' do
# Comment the next line if you don't want to use dynamic frameworks
#use_frameworks!
# Pods for example
pod 'Firebase/Core', '~> 6.3.0'
pod 'Firebase/Performance', '~> 6.3.0'
pod 'GoogleIDFASupport', '~> 3.14.0'
pod 'Fabric', '~> 1.10.2'
pod 'Crashlytics', '~> 3.13.2'
end
Most helpful comment
Hi @mikehardy, thanks for your reply. I have managed to solve it. The problem is I used to integrate
react-native-firebasemanually but I have migrated to pod because I want to update to0.60.0so I have some leftover setting in the project like theSearch PathsandFirebase.hinFrameworkfolder. So after I clean it up I still can't archive my app and then I search through the issues and found out that because I'm usinguse_framework!in my pod file so I deleted theuse_framework!and the app can be archive without a problem.Hence, my app on Bitrise can be built without a problem now!! (If you can archive the app on Xcode but fail at fastlane
gymmaybe you should check what scheme are you using in gym and your Xcode because of the build configuration)I'm using
react-native-firebase": "^5.5.6"and this is my podfile