馃敟
Hi, I've installed firebase using the v6 installation guide and am returning the errors below when I compile for iOS:
_duplicate symbol 'AuthErrorCode_toJSErrorCode' in:
.../Build/Products/Debug-iphonesimulator/RNFBAuth/libRNFBAuth.a(RNFBAuthModule.o)
.../Build/Products/Debug-iphonesimulator/RNFirebase/libRNFirebase.a(RNFirebaseAuth.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried clearing out my podfile and re-running pod install to no avail.
iOS: Podfile contents.
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'Pactive' do
# Pods for Pactive
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
target 'PactiveTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target 'Pactive-tvOS' do
# Pods for Pactive-tvOS
target 'Pactive-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
package.json:{
"name": "XXXXX",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@react-native-community/async-storage": "^1.6.3",
"@react-native-firebase/analytics": "^6.0.0",
"@react-native-firebase/app": "^6.2.0",
"@react-native-firebase/auth": "^6.1.0",
"@react-native-firebase/crashlytics": "^6.0.0",
"@react-native-firebase/messaging": "^6.1.0",
"axios": "^0.18.0",
"crypto-js": "^3.1.9-1",
"date-fns": "^2.4.1",
"fbjs": "^1.0.0",
"grpc": "^1.20.2",
"moment": "^2.24.0",
"native-base": "^2.13.7",
"ramda": "^0.26.1",
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-background-fetch": "^2.7.1",
"react-native-background-task": "^0.2.1",
"react-native-circular-progress": "^1.3.0",
"react-native-contacts": "^4.0.3",
"react-native-elements": "^1.2.6",
"react-native-firebase": "^5.5.6",
"react-native-fit-image": "^1.5.5",
"react-native-gesture-handler": "^1.4.1",
"react-native-gifted-chat": "^0.11.4",
"react-native-keyboard-aware-scroll-view": "^0.9.1",
"react-native-keyboard-aware-scrollview": "^2.1.0",
"react-native-linear-gradient": "^2.5.6",
"react-native-loading-spinner-overlay": "^1.0.1",
"react-native-material-menu": "^1.0.0",
"react-native-modal-datetime-picker": "^7.6.0",
"react-native-phone-input": "^0.2.4",
"react-native-ratings": "^6.5.0",
"react-native-reanimated": "^1.2.0",
"react-native-smooth-pincode-input": "^1.0.7",
"react-native-sms": "^1.10.0",
"react-native-snap-carousel": "^3.8.4",
"react-native-svg": "^9.9.3",
"react-native-switch-pro": "^1.0.4",
"react-native-vector-icons": "^6.6.0",
"react-navigation": "^4.0.7",
"react-navigation-stack": "^1.8.1",
"react-navigation-tabs": "^2.4.1",
"react-promise": "^2.0.3",
"react-redux": "^7.1.1",
"redux": "^4.0.0",
"redux-persist": "^5.10.0",
"redux-persist-filesystem-storage": "^2.0.0",
"redux-promise-middleware": "^5.1.1",
"rn-apple-healthkit": "^0.7.3",
"rn-fetch-blob": "^0.11.2"
},
"devDependencies": {
"@babel/core": "^7.7.5",
"@babel/runtime": "^7.7.6",
"@react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.9.0",
"eslint": "^6.7.2",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.57.0",
"react-test-renderer": "16.9.0"
},
"jest": {
"preset": "react-native"
}
}
firebase.json for react-native-firebase v6:# N/A
ios/Podfile:# N/A
AppDelegate.m:/**
@import Firebase;
@implementation AppDelegate
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
if ([FIRApp defaultApp] == nil) {
[FIRApp configure];
}
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"Pactive"
initialProperties:nil];
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;
}
(NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
}
@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:**
OUTPUT GOES HERE
- **Platform that you're experiencing the issue on**:
- [ X] iOS
- [ ] Android
- [ X] **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:**
- `e.g. 5.4.3`
- **`Firebase` module(s) you're using that has the issue:**
- `e.g. Instance ID`
- **Are you using `TypeScript`?**
- `Y/N` & `VERSION`
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.for iOS compile errors the first thing I do is npx react-native-clean-project clean-project-auto then yarn and pod install and try again. Amazing the layers of cache and how they get out of whack for Xcode / react-native builds.
If it persists after that, ping us back and we'll dig in
same issue

You can thumbs down my advice above, but any time there is a build error in a project lots of people use, you must first suspect your local project has a problem. Then after verifying it doesn't, you need to suspect it again, because everyone else has it compiling. That's just the way it is and applies to my own projects as well.
You can check a full demo and see it works by running this script: https://github.com/mikehardy/rnfbdemo/blob/master/make-demo-v6.sh
To the original author I just noticed the @react-native-firebase versions are not the same. That's not going to work. They should all be the same - 6.2.0 currently.
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.
I am facing same error. any solution for this?