Hi there,
when I try to compile my app with pod 'Firebase/Auth' commented in, I get the following errors:

After comparing the error codes in FIRAuthErrors.h of the official pod with the ones defined in RNFirebaseAuth.m I noticed some discrepancies. Indeed are the as undeclared marked error codes not defined in FIRAuthErrors.h.
These are the error codes in FIRAuthErrors.h. I've marked the error codes which are not handled by RNFirebaseAuth.m:
typedef NS_ENUM(NSInteger, FIRAuthErrorCode) {
FIRAuthErrorCodeInvalidCustomToken = 17000,
FIRAuthErrorCodeCustomTokenMismatch = 17002,
FIRAuthErrorCodeInvalidCredential = 17004,
FIRAuthErrorCodeUserDisabled = 17005,
FIRAuthErrorCodeOperationNotAllowed = 17006,
FIRAuthErrorCodeEmailAlreadyInUse = 17007,
FIRAuthErrorCodeInvalidEmail = 17008,
FIRAuthErrorCodeWrongPassword = 17009,
FIRAuthErrorCodeTooManyRequests = 17010,
FIRAuthErrorCodeUserNotFound = 17011,
FIRAuthErrorCodeAccountExistsWithDifferentCredential = 17012, // Missing below
FIRAuthErrorCodeRequiresRecentLogin = 17014,
FIRAuthErrorCodeProviderAlreadyLinked = 17015,
FIRAuthErrorCodeNoSuchProvider = 17016,
FIRAuthErrorCodeInvalidUserToken = 17017,
FIRAuthErrorCodeNetworkError = 17020,
FIRAuthErrorCodeUserTokenExpired = 17021,
FIRAuthErrorCodeInvalidAPIKey = 17023,24,
FIRAuthErrorCodeCredentialAlreadyInUse = 17025,
FIRAuthErrorCodeWeakPassword = 17026,
FIRAuthErrorCodeAppNotAuthorized = 17028,
FIRAuthErrorCodeExpiredActionCode = 17029,
FIRAuthErrorCodeInvalidActionCode = 17030, // Missing below
FIRAuthErrorCodeKeychainError = 17995,
FIRAuthErrorCodeInternalError = 17999,
These are the error codes handled in RNFirebaseAuth.m:
case FIRAuthErrorCodeInvalidCustomToken:
case FIRAuthErrorCodeCustomTokenMismatch:
case FIRAuthErrorCodeInvalidCredential:
case FIRAuthErrorCodeInvalidEmail:
case FIRAuthErrorCodeWrongPassword:
case FIRAuthErrorCodeUserMismatch:
case FIRAuthErrorCodeRequiresRecentLogin:
case FIRAuthErrorCodeAccountExistsWithDifferentCredential:
case FIRAuthErrorCodeEmailAlreadyInUse:
case FIRAuthErrorCodeCredentialAlreadyInUse:
case FIRAuthErrorCodeUserDisabled:
case FIRAuthErrorCodeUserTokenExpired:
case FIRAuthErrorCodeUserNotFound:
case FIRAuthErrorCodeInvalidUserToken:
case FIRAuthErrorCodeWeakPassword:
case FIRAuthErrorCodeOperationNotAllowed:
case FIRAuthErrorCodeNetworkError:
case FIRAuthErrorCodeInternalError:
case FIRAuthErrorCodeTooManyRequests:
case FIRAuthErrorCodeProviderAlreadyLinked:
case FIRAuthErrorCodeNoSuchProvider:
case FIRAuthErrorCodeInvalidAPIKey:
case FIRAuthErrorCodeAppNotAuthorized:
case FIRAuthErrorCodeExpiredActionCode:
case FIRAuthErrorCodeInvalidMessagePayload: // Missing above
case FIRAuthErrorCodeInvalidSender: // Missing above
case FIRAuthErrorCodeInvalidRecipientEmail: // Missing above
case FIRAuthErrorCodeKeychainError:
I'd suggest getting these error code in sync again. What do you think? Am I missing something?
Cheers and thanks for your help :)
# Uncomment the next line to define a global platform for your project
platform :ios, '8.0'
target 'myapp' do
# Pods for myapp
pod 'Firebase/Core'
pod 'RNFirebase', :path => '../node_modules/react-native-firebase'
# [OPTIONAL PODS] - comment out pods for firebase products you won't be using.
# pod 'Firebase/AdMob'
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
# pod 'Firebase/Crash'
pod 'Firebase/Database'
# pod 'Firebase/DynamicLinks'
# pod 'Firebase/Messaging'
# pod 'Firebase/RemoteConfig'
# pod 'Firebase/Storage'
pod "Yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'BatchedBridge', # Required For React Native 0.45.0+
'Core',
# Add any other subspecs you want to use in your project
]
end
@dennis-tra are you able to send a copy of your Podfile.lock file? I'm guessing that this is an issue with incorrect Firebase dependencies.
Thanks for your answer @chrisbianca
This is my Podfile.lock:
PODS:
- Firebase/Analytics (3.12.0):
- Firebase/Core
- Firebase/Auth (3.12.0):
- Firebase/Core
- FirebaseAuth (= 3.1.0)
- Firebase/Core (3.12.0):
- FirebaseAnalytics (= 3.6.0)
- FirebaseCore (= 3.4.7)
- Firebase/Crash (3.12.0):
- Firebase/Core
- FirebaseCrash (= 1.1.5)
- Firebase/Database (3.12.0):
- Firebase/Core
- FirebaseDatabase (= 3.1.1)
- FirebaseAnalytics (3.6.0):
- FirebaseCore (~> 3.4)
- FirebaseInstanceID (~> 1.0)
- GoogleInterchangeUtilities (~> 1.2)
- GoogleSymbolUtilities (~> 1.1)
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
- FirebaseAuth (3.1.0):
- FirebaseAnalytics (~> 3.6)
- GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)
- GTMSessionFetcher/Core (~> 1.1)
- FirebaseCore (3.4.7):
- GoogleInterchangeUtilities (~> 1.2)
- GoogleSymbolUtilities (~> 1.1)
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
- FirebaseCrash (1.1.5):
- FirebaseAnalytics (~> 3.6)
- FirebaseInstanceID (~> 1.0)
- GoogleInterchangeUtilities (~> 1.2)
- GoogleSymbolUtilities (~> 1.1)
- GoogleToolboxForMac/Logger (~> 2.1)
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
- FirebaseDatabase (3.1.1):
- FirebaseAnalytics (~> 3.5)
- FirebaseInstanceID (1.0.8)
- GoogleInterchangeUtilities (1.2.2):
- GoogleSymbolUtilities (~> 1.1)
- GoogleSymbolUtilities (1.1.2)
- GoogleToolboxForMac/DebugUtils (2.1.1):
- GoogleToolboxForMac/Defines (= 2.1.1)
- GoogleToolboxForMac/Defines (2.1.1)
- GoogleToolboxForMac/Logger (2.1.1):
- GoogleToolboxForMac/Defines (= 2.1.1)
- GoogleToolboxForMac/NSData+zlib (2.1.1):
- GoogleToolboxForMac/Defines (= 2.1.1)
- GoogleToolboxForMac/NSDictionary+URLArguments (2.1.1):
- GoogleToolboxForMac/DebugUtils (= 2.1.1)
- GoogleToolboxForMac/Defines (= 2.1.1)
- GoogleToolboxForMac/NSString+URLArguments (= 2.1.1)
- GoogleToolboxForMac/NSString+URLArguments (2.1.1)
- GTMSessionFetcher/Core (1.1.8)
- React/BatchedBridge (0.46.3):
- React/Core
- React/cxxreact_legacy
- React/Core (0.46.3):
- Yoga (= 0.46.3.React)
- React/cxxreact_legacy (0.46.3):
- React/jschelpers_legacy
- React/jschelpers_legacy (0.46.3)
- RNFirebase (2.0.3)
- Yoga (0.46.3.React)
DEPENDENCIES:
- Firebase/Analytics
- Firebase/Auth
- Firebase/Core
- Firebase/Crash
- Firebase/Database
- React/BatchedBridge (from `../node_modules/react-native`)
- React/Core (from `../node_modules/react-native`)
- RNFirebase (from `../node_modules/react-native-firebase`)
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
EXTERNAL SOURCES:
React:
:path: "../node_modules/react-native"
RNFirebase:
:path: "../node_modules/react-native-firebase"
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"
SPEC CHECKSUMS:
Firebase: 8e99eb1ff553ad5bcc6072cc3d925bb89c1244d6
FirebaseAnalytics: 9c67af0ebeb8d2146c9b4ea2616439affa947b58
FirebaseAuth: b436e4ecebe068bf8e8c6e4e29de5756ffe7ee24
FirebaseCore: 46afaf2c2e0419ea7d3acfb08cf26a461a75fe85
FirebaseCrash: 30cf0e3a8b676a2d96e5157d9fb361039fcb2a46
FirebaseDatabase: 6de92187481ff0e8e124064f21742e95ee883b02
FirebaseInstanceID: ba1e640935235e5fac39dfa816fe7660e72e1a8a
GoogleInterchangeUtilities: d5bc4d88d5b661ab72f9d70c58d02ca8c27ad1f7
GoogleSymbolUtilities: 631ee17048aa5e9ab133470d768ea997a5ef9b96
GoogleToolboxForMac: 8e329f1b599f2512c6b10676d45736bcc2cbbeb0
GTMSessionFetcher: 6f8d8b28b7e345549ac471071608170b31cb4977
React: c6559d70350c38f4cde7f66e3f483d6cce815ae3
RNFirebase: 22e723806850dd17643cebcf4d9ccdc738e9a157
Yoga: 6f09f11a4ab92e5afb4869268167f8c01c6ae906
PODFILE CHECKSUM: a2cef035733aa5841bda67c93ec855b919e75e74
COCOAPODS: 1.2.1
@dennis-tra as suspected, your Firebase pods aren't the latest 4.0.X pods.
1) Run pod outdated it should show the pods that are available to upgrade - hopefully Firebase 4.0.X
2) Running pod update should then update to the latest versions of the pods.
If this doesn't happen, then can you try changing your Podfile to specify 9.0 as the global platform, then repeat the above steps?
That's the output of pod outdated:
```
Analyzing dependencies
The following pod updates are available:
And with pod update the compilation errors are resolved :) thank you very much!
@chrisbianca Thanks, it works!
Most helpful comment
@dennis-tra as suspected, your Firebase pods aren't the latest 4.0.X pods.
1) Run
pod outdatedit should show the pods that are available to upgrade - hopefully Firebase 4.0.X2) Running
pod updateshould then update to the latest versions of the pods.If this doesn't happen, then can you try changing your
Podfileto specify 9.0 as the global platform, then repeat the above steps?