invertase / react-native-firebase

🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
https://rnfirebase.io
Other
11.69k stars 2.21k forks source link

'FirebaseCore/FIRAnalyticsConfiguration.h' file not found on v5 #1106

Closed stereodenis closed 6 years ago

stereodenis commented 6 years ago

@chrisbianca image

PODS:
  - Firebase (5.0.1):
    - Firebase/Core (= 5.0.1)
  - Firebase/Auth (5.0.1):
    - Firebase/CoreOnly
    - FirebaseAuth (= 5.0.0)
  - Firebase/Core (5.0.1):
    - Firebase/CoreOnly
    - FirebaseAnalytics (= 5.0.0)
  - Firebase/CoreOnly (5.0.1):
    - FirebaseCore (= 5.0.1)
  - Firebase/Messaging (5.0.1):
    - Firebase/CoreOnly
    - FirebaseMessaging (= 3.0.0)
  - FirebaseAnalytics (5.0.0):
    - FirebaseCore (~> 5.0)
    - FirebaseInstanceID (~> 3.0)
    - "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
    - nanopb (~> 0.3)
  - FirebaseAuth (5.0.0):
    - FirebaseCore (~> 5.0)
    - GTMSessionFetcher/Core (~> 1.1)
  - FirebaseCore (5.0.1):
    - "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
  - FirebaseInstanceID (3.0.0):
    - FirebaseCore (~> 5.0)
  - FirebaseMessaging (3.0.0):
    - FirebaseCore (~> 5.0)
    - FirebaseInstanceID (~> 3.0)
    - GoogleToolboxForMac/Logger (~> 2.1)
    - Protobuf (~> 3.1)
  - GoogleToolboxForMac/Defines (2.1.4)
  - GoogleToolboxForMac/Logger (2.1.4):
    - GoogleToolboxForMac/Defines (= 2.1.4)
  - "GoogleToolboxForMac/NSData+zlib (2.1.4)":
    - GoogleToolboxForMac/Defines (= 2.1.4)
  - GTMSessionFetcher/Core (1.1.15)
  - nanopb (0.3.8):
    - nanopb/decode (= 0.3.8)
    - nanopb/encode (= 0.3.8)
  - nanopb/decode (0.3.8)
  - nanopb/encode (0.3.8)
  - Protobuf (3.5.0)

"react-native": "0.54.0" "react-native-firebase": "^4.2.0"

What's wrong?

keshavkaul commented 5 years ago

@mikehardy @chrisbianca I am getting this issue on a new RN project with latest 5.x RN Firebase version and Xcode 10.2

I created a new RN project v0.59.8, added react-native-firebase v5.3.1 and used the following pod file

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'FirebaseReactNative' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for FirebaseReactNative
  pod 'Firebase/Core'
  pod 'Firebase/Auth'
  pod 'Firebase/Firestore'
  pod 'Firebase/Storage'
  pod 'Firebase/Database'

  pod 'Fabric'
  pod 'Crashlytics'

  target 'FirebaseReactNativeTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

I get this error:

/firebase-react-native/node_modules/react-native-firebase/ios/RNFirebase/analytics/RNFirebaseAnalytics.m:6:9: fatal error: 'FirebaseCore/FIRAnalyticsConfiguration.h' file not found
#import <FirebaseCore/FIRAnalyticsConfiguration.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

lockfile

PODS:
  - BoringSSL-GRPC (0.0.3):
    - BoringSSL-GRPC/Implementation (= 0.0.3)
    - BoringSSL-GRPC/Interface (= 0.0.3)
  - BoringSSL-GRPC/Implementation (0.0.3):
    - BoringSSL-GRPC/Interface (= 0.0.3)
  - BoringSSL-GRPC/Interface (0.0.3)
  - Crashlytics (3.12.0):
    - Fabric (~> 1.9.0)
  - Fabric (1.9.0)
  - Firebase/Auth (6.0.0):
    - Firebase/CoreOnly
    - FirebaseAuth (~> 6.0.0)
  - Firebase/Core (6.0.0):
    - Firebase/CoreOnly
    - FirebaseAnalytics (= 6.0.0)
  - Firebase/CoreOnly (6.0.0):
    - FirebaseCore (= 6.0.0)
  - Firebase/Database (6.0.0):
    - Firebase/CoreOnly
    - FirebaseDatabase (~> 6.0.0)
  - Firebase/Firestore (6.0.0):
    - Firebase/CoreOnly
    - FirebaseFirestore (~> 1.3.0)
  - Firebase/Storage (6.0.0):
    - Firebase/CoreOnly
    - FirebaseStorage (~> 3.2.0)
  - FirebaseAnalytics (6.0.0):
    - FirebaseCore (~> 6.0)
    - FirebaseInstanceID (~> 4.0)
    - GoogleAppMeasurement (= 6.0.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 6.0)
    - GoogleUtilities/MethodSwizzler (~> 6.0)
    - GoogleUtilities/Network (~> 6.0)
    - "GoogleUtilities/NSData+zlib (~> 6.0)"
    - nanopb (~> 0.3)
  - FirebaseAuth (6.0.0):
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 6.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 6.0)
    - GoogleUtilities/Environment (~> 6.0)
    - GTMSessionFetcher/Core (~> 1.1)
  - FirebaseAuthInterop (1.0.0)
  - FirebaseCore (6.0.0):
    - GoogleUtilities/Environment (~> 6.0)
    - GoogleUtilities/Logger (~> 6.0)
  - FirebaseDatabase (6.0.0):
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 6.0)
    - leveldb-library (~> 1.18)
  - FirebaseFirestore (1.3.0):
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 6.0)
    - FirebaseFirestore/abseil-cpp (= 1.3.0)
    - "gRPC-C++ (= 0.0.8)"
    - leveldb-library (~> 1.20)
    - nanopb (~> 0.3.901)
    - Protobuf (~> 3.1)
  - FirebaseFirestore/abseil-cpp (1.3.0):
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 6.0)
    - "gRPC-C++ (= 0.0.8)"
    - leveldb-library (~> 1.20)
    - nanopb (~> 0.3.901)
    - Protobuf (~> 3.1)
  - FirebaseInstanceID (4.0.0):
    - FirebaseCore (~> 6.0)
    - GoogleUtilities/Environment (~> 6.0)
    - GoogleUtilities/UserDefaults (~> 6.0)
  - FirebaseStorage (3.2.0):
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 6.0)
    - GTMSessionFetcher/Core (~> 1.1)
  - GoogleAppMeasurement (6.0.0):
    - GoogleUtilities/AppDelegateSwizzler (~> 6.0)
    - GoogleUtilities/MethodSwizzler (~> 6.0)
    - GoogleUtilities/Network (~> 6.0)
    - "GoogleUtilities/NSData+zlib (~> 6.0)"
    - nanopb (~> 0.3)
  - GoogleUtilities/AppDelegateSwizzler (6.0.0):
    - GoogleUtilities/Environment
    - GoogleUtilities/Logger
    - GoogleUtilities/Network
  - GoogleUtilities/Environment (6.0.0)
  - GoogleUtilities/Logger (6.0.0):
    - GoogleUtilities/Environment
  - GoogleUtilities/MethodSwizzler (6.0.0):
    - GoogleUtilities/Logger
  - GoogleUtilities/Network (6.0.0):
    - GoogleUtilities/Logger
    - "GoogleUtilities/NSData+zlib"
    - GoogleUtilities/Reachability
  - "GoogleUtilities/NSData+zlib (6.0.0)"
  - GoogleUtilities/Reachability (6.0.0):
    - GoogleUtilities/Logger
  - GoogleUtilities/UserDefaults (6.0.0):
    - GoogleUtilities/Logger
  - "gRPC-C++ (0.0.8)":
    - "gRPC-C++/Implementation (= 0.0.8)"
    - "gRPC-C++/Interface (= 0.0.8)"
  - "gRPC-C++/Implementation (0.0.8)":
    - "gRPC-C++/Interface (= 0.0.8)"
    - gRPC-Core (= 1.19.0)
    - nanopb (~> 0.3)
  - "gRPC-C++/Interface (0.0.8)"
  - gRPC-Core (1.19.0):
    - gRPC-Core/Implementation (= 1.19.0)
    - gRPC-Core/Interface (= 1.19.0)
  - gRPC-Core/Implementation (1.19.0):
    - BoringSSL-GRPC (= 0.0.3)
    - gRPC-Core/Interface (= 1.19.0)
    - nanopb (~> 0.3)
  - gRPC-Core/Interface (1.19.0)
  - GTMSessionFetcher/Core (1.2.1)
  - leveldb-library (1.20)
  - nanopb (0.3.901):
    - nanopb/decode (= 0.3.901)
    - nanopb/encode (= 0.3.901)
  - nanopb/decode (0.3.901)
  - nanopb/encode (0.3.901)
  - Protobuf (3.7.0)

DEPENDENCIES:
  - Crashlytics
  - Fabric
  - Firebase/Auth
  - Firebase/Core
  - Firebase/Database
  - Firebase/Firestore
  - Firebase/Storage

SPEC REPOS:
  https://github.com/cocoapods/specs.git:
    - BoringSSL-GRPC
    - Crashlytics
    - Fabric
    - Firebase
    - FirebaseAnalytics
    - FirebaseAuth
    - FirebaseAuthInterop
    - FirebaseCore
    - FirebaseDatabase
    - FirebaseFirestore
    - FirebaseInstanceID
    - FirebaseStorage
    - GoogleAppMeasurement
    - GoogleUtilities
    - "gRPC-C++"
    - gRPC-Core
    - GTMSessionFetcher
    - leveldb-library
    - nanopb
    - Protobuf

SPEC CHECKSUMS:
  BoringSSL-GRPC: db8764df3204ccea016e1c8dd15d9a9ad63ff318
  Crashlytics: 07fb167b1694128c1c9a5a5cc319b0e9c3ca0933
  Fabric: f988e33c97f08930a413e08123064d2e5f68d655
  Firebase: fa80b9d987ca014a1ba9357496ef2a0178b28b12
  FirebaseAnalytics: 1743c5f4de3687d0745709dfdc4b1dea1484f44c
  FirebaseAuth: efc72b0f6fe075d2a6de8d81a6d9de83ef2b47eb
  FirebaseAuthInterop: 0ffa57668be100582bb7643d4fcb7615496c41fc
  FirebaseCore: e38f025287b413255a53acc1945d048a112047f7
  FirebaseDatabase: f48e067716864be2b855cf716b927ef375d6cfa0
  FirebaseFirestore: 0537b2a960a4819fae2834e688e5daeb571c81d6
  FirebaseInstanceID: 0e0348a3c00a734fa376a070f5ad4533ad975cb5
  FirebaseStorage: ff1e8f1f6cf1557a8694b0ef39d3e72cb60c42ac
  GoogleAppMeasurement: 7f028ea162b72c8f326daec74afc95d94f7a47d6
  GoogleUtilities: f1faafc033ea203adf1783ce00af455bb99d0e5b
  "gRPC-C++": 98be881723177d8c4faf5fdffacb582c7b4971a2
  gRPC-Core: bd9472c8daa2e414b9f8038ba667bf56ce0e02b8
  GTMSessionFetcher: 32aeca0aa144acea523e1c8e053089dec2cb98ca
  leveldb-library: 08cba283675b7ed2d99629a4bc5fd052cd2bb6a5
  nanopb: 2901f78ea1b7b4015c860c2fdd1ea2fee1a18d48
  Protobuf: 7a877b7f3e5964e3fce995e2eb323dbc6831bb5a

PODFILE CHECKSUM: df695adfed28563709f2165bb2228793bc8883f5

COCOAPODS: 1.6.1
mackenziemance commented 5 years ago

@keshavkaul I also ran in to this. Your pod version is ahead of what's currently supported. Lock your pods at 5.20.2, that should resolve the issue.

keshavkaul commented 5 years ago

@mackenziemance Oh, how silly of me. I had just upgraded to latest version of RN firebase and forgot to checkout the dependencies. Thanks!

erez-guesty commented 5 years ago

@mackenziemance if i use npm firebase 4.3.0 so which lock version should i use in the pod file? also 5.20.2 ? on which pods?

mikehardy commented 5 years ago

I have no experience with a 'firebase' package on npm, or the 4.3.0 version of react-native-firebase, but with react-native-firebase 5.3.1, the firebase-ios-sdk Pods 5.20.2 work

MuhammadUsman786786 commented 5 years ago

I solve this issue:

  1. delete the Pod folder
  2. delete the Pod lock file
  3. This is an important step: Specify the dependency version which was mentioned in react-native-firebasedocs
    pod 'Firebase/Core', '~> 5.20.1'
    pod 'Firebase/Messaging', '~> 5.20.1'
mapo80 commented 5 years ago

@MuhammadUsman786786 thanks very much, now it works! +1

infiniteline commented 5 years ago

@MuhammadUsman786786 +1 from me. It seems that locking the dependency versions works.

belal-mazlom commented 5 years ago

I get it work after apply @MuhammadUsman786786 solution If you are working with version v5.+ of react-native-firebase you must apply this fix in Podfile:

pod 'Firebase/Core', '~> 5.20.1'
pod 'Firebase/Messaging', '~> 5.20.1'
shrinandhini2801 commented 5 years ago

@belal-mazlom i did as you suggest but i got the below error

ld: framework not found FirebaseCore clang: error: linker command failed with exit code 1 (use -v to see invocation)

Note : am using "react-native-firebase": "5.4.2" and xcode 10.2.1

Please help

shrinandhini2801 commented 5 years ago

@MuhammadUsman786786 is there any other that needs to be taken care of ? Like header search path ??

belal-mazlom commented 5 years ago

@shrinandhini2801 Did you try these steps? 1- delete the Pod folder 2- delete the Pod lock file 3- run pod update

shrinandhini2801 commented 5 years ago

@belal-mazlom yes i have tried those steps and removed the pod lock , pod folder , workspace and did the fresh pod install.. Did the steps for almost 5 to 6 times .. No luck

But after a clean build i started getting below error

........./node_modules/react-native-firebase/ios/RNFirebase/RNFirebaseUtil.h:6:9: 'Firebase.h' file not found[

Screen Shot 2019-06-12 at 12 50 18 PM

](url)

and finally getting the below error consistently

/ios/Pods/Headers/Public/Firebase/Firebase.h:1:9: 'FirebaseCore/FirebaseCore.h' file not found

shrinandhini2801 commented 5 years ago

@belal-mazlom Finally i got it running . Although the explicit mentioning of versions in pod file didn't work for me , i was able to successfully build and archive with latest versions of firebase (both in cocoapods and in package.json). None of the place , i have mentioned the version numbers .

All i did was removed node modules -> did fresh install -> did pod install (without mentioning version but commented "use_frameworks!" -> clean and build.

It worked like charm. One important point worth mentioning is , whenever i manullay change somethinh in header search path i ended up with an issue so i just left the react-native link react-native-firebase to do the job and i didn't touch any of the default configs.

mikehardy commented 5 years ago

If you have not mentioned pod versions you will likely get the most recent ones (6.x.x) of the firebase ios sdk, and it won't work. Our compatibility chart clearly indicates that you must use 5.20.2 maximum. I demonstrate in the make-demo.sh script here https://github.com/mikehardy/rnfbdemo exactly how to go from scratch to a working react-native-firebase app, I would examine it to see how it works. It follows the docs with the exception of the Podfile, it has a workaround for a header file issue we are tracking here #2163

artyom-developer commented 5 years ago

Error :/ 617 duplicate symbols for architecture x86_64

mikehardy commented 5 years ago

This issue has been closed more than a year, it is attracting unfocused reports now and not generating helpful discussion. Please open new issues following the issue template if you are experiencing problems