FIRAuthError use of undeclared identifier

Hi there,

when I try to compile my app with pod 'Firebase/Auth' commented in, I get the following errors:
screen shot 2017-07-18 at 09 30 19

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 🙂

Podfile

# 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

Environment

  1. Target Platform (e.g. iOS, Android): iOS
  2. Development Operating System (e.g. macOS Sierra, Windows 10): macOS Sierra
  3. Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant): Xcode 8.3.3
  4. React Native version (e.g. 0.45.1): 0.46.3
  5. RNFirebase Version (e.g. 2.0.2): 2.0.3

Author: Fantashit

1 thought on “FIRAuthError use of undeclared identifier

  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?

Comments are closed.

FIRAuthError use of undeclared identifier

Hi there,

when I try to compile my app with pod 'Firebase/Auth' commented in, I get the following errors:
screen shot 2017-07-18 at 09 30 19

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 🙂

Podfile

# 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

Environment

  1. Target Platform (e.g. iOS, Android): iOS
  2. Development Operating System (e.g. macOS Sierra, Windows 10): macOS Sierra
  3. Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant): Xcode 8.3.3
  4. React Native version (e.g. 0.45.1): 0.46.3
  5. RNFirebase Version (e.g. 2.0.2): 2.0.3

Author: Fantashit

3 thoughts on “FIRAuthError use of undeclared identifier

  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?

  2. Pingback: replica rolex
  3. Pingback: 토토

Comments are closed.

FIRAuthError use of undeclared identifier

Hi there,

when I try to compile my app with pod 'Firebase/Auth' commented in, I get the following errors:
screen shot 2017-07-18 at 09 30 19

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 🙂

Podfile

# 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

Environment

  1. Target Platform (e.g. iOS, Android): iOS
  2. Development Operating System (e.g. macOS Sierra, Windows 10): macOS Sierra
  3. Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant): Xcode 8.3.3
  4. React Native version (e.g. 0.45.1): 0.46.3
  5. RNFirebase Version (e.g. 2.0.2): 2.0.3

Author: Fantashit

1 thought on “FIRAuthError use of undeclared identifier

  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?

Comments are closed.