react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

Not installed natively by calling firebase.crashlytics()

Open yoonsy opened this issue 8 years ago • 26 comments

Issue

After installed Crashlytics, I tried to test that my application is set up correctly using below code.

firebase.fabric.crashlytics().crash();

However, it failed.

You attempted to use a firebase module that's not installed natively on your iOS project by calling firebase.crashlytics(). Ensure you have the required Firebase iOS SDK pod for this module included in your Podfile, in this instance confirm you've added "pod 'undefined'" to your Podfile

kakaotalk_photo_2018-01-09-17-24-27_72

My Podfile is below.

# Required by RNFirebase
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'Fabric', '~> 1.7.2'
pod 'Crashlytics', '~> 3.9.3'

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

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

  # Pods for SimpleDiary

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

end

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

  # Pods for SimpleDiary-tvOS

  target 'SimpleDiary-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

Environment

  1. Application Target Platform: iOS
  1. Development Operating System: macOS High Sierra
  1. Build Tools: Xcode 9.2, iOS 11
  1. React Native version: 0.50.4
  1. RNFirebase Version: 3.2.1
  1. Firebase Module: crashlytics

yoonsy avatar Jan 09 '18 08:01 yoonsy

@yoonsy Can we see the contents of your Podfile.lock?

chrisbianca avatar Jan 12 '18 09:01 chrisbianca

Also getting the same error

vuyani-k avatar Jan 12 '18 10:01 vuyani-k

@jolinkomo-code Can I see your Podfile.lock?

chrisbianca avatar Jan 12 '18 10:01 chrisbianca

PODS:

  • Firebase/Core (4.4.0):
    • FirebaseAnalytics (= 4.0.4)
    • FirebaseCore (= 4.0.9)
  • Firebase/Crash (4.4.0):
    • Firebase/Core
    • FirebaseCrash (= 2.0.2)
  • Firebase/Database (4.4.0):
    • Firebase/Core
    • FirebaseDatabase (= 4.1.1)
  • Firebase/Messaging (4.4.0):
    • Firebase/Core
    • FirebaseMessaging (= 2.0.5)
  • Firebase/Storage (4.4.0):
    • Firebase/Core
    • FirebaseStorage (= 2.0.2)
  • FirebaseAnalytics (4.0.4):
    • FirebaseCore (~> 4.0)
    • FirebaseInstanceID (~> 2.0)
    • GoogleToolboxForMac/NSData+zlib (~> 2.1)
    • nanopb (~> 0.3)
  • FirebaseCore (4.0.9):
    • GoogleToolboxForMac/NSData+zlib (~> 2.1)
    • nanopb (~> 0.3)
  • FirebaseCrash (2.0.2):
    • FirebaseAnalytics (~> 4.0)
    • FirebaseInstanceID (~> 2.0)
    • GoogleToolboxForMac/Logger (~> 2.1)
    • GoogleToolboxForMac/NSData+zlib (~> 2.1)
    • Protobuf (~> 3.1)
  • FirebaseDatabase (4.1.1):
    • FirebaseAnalytics (~> 4.0)
    • FirebaseCore (~> 4.0)
    • leveldb-library (~> 1.18)
  • FirebaseInstanceID (2.0.5)
  • FirebaseMessaging (2.0.5):
    • FirebaseAnalytics (~> 4.0)
    • FirebaseCore (~> 4.0)
    • FirebaseInstanceID (~> 2.0)
    • GoogleToolboxForMac/Logger (~> 2.1)
    • Protobuf (~> 3.1)
  • FirebaseStorage (2.0.2):
    • FirebaseAnalytics (~> 4.0)
    • FirebaseCore (~> 4.0)
    • GTMSessionFetcher/Core (~> 1.1)
  • GoogleToolboxForMac (2.1.3):
    • GoogleToolboxForMac/Core (= 2.1.3)
    • GoogleToolboxForMac/Defines (= 2.1.3)
    • GoogleToolboxForMac/GeometryUtils (= 2.1.3)
    • GoogleToolboxForMac/KVO (= 2.1.3)
    • GoogleToolboxForMac/Logger (= 2.1.3)
    • GoogleToolboxForMac/NSData+zlib (= 2.1.3)
    • GoogleToolboxForMac/NSDictionary+URLArguments (= 2.1.3)
    • GoogleToolboxForMac/NSFileHandle+UniqueName (= 2.1.3)
    • GoogleToolboxForMac/NSScanner+JSON (= 2.1.3)
    • GoogleToolboxForMac/NSString+HTML (= 2.1.3)
    • GoogleToolboxForMac/NSString+URLArguments (= 2.1.3)
    • GoogleToolboxForMac/NSString+XML (= 2.1.3)
    • GoogleToolboxForMac/NSThread+Blocks (= 2.1.3)
    • GoogleToolboxForMac/Regex (= 2.1.3)
    • GoogleToolboxForMac/StringEncoding (= 2.1.3)
    • GoogleToolboxForMac/SystemVersion (= 2.1.3)
    • GoogleToolboxForMac/URLBuilder (= 2.1.3)
  • GoogleToolboxForMac/Core (2.1.3):
    • GoogleToolboxForMac/Defines (= 2.1.3)
  • GoogleToolboxForMac/DebugUtils (2.1.3):
    • GoogleToolboxForMac/Defines (= 2.1.3)
  • GoogleToolboxForMac/Defines (2.1.3)
  • GoogleToolboxForMac/GeometryUtils (2.1.3):
    • GoogleToolboxForMac/Defines (= 2.1.3)
  • GoogleToolboxForMac/KVO (2.1.3):
    • GoogleToolboxForMac/Core (= 2.1.3)
    • GoogleToolboxForMac/DebugUtils (= 2.1.3)
  • GoogleToolboxForMac/Logger (2.1.3):
    • GoogleToolboxForMac/Defines (= 2.1.3)
  • GoogleToolboxForMac/NSData+zlib (2.1.3):
    • GoogleToolboxForMac/Defines (= 2.1.3)
  • GoogleToolboxForMac/NSDictionary+URLArguments (2.1.3):
    • GoogleToolboxForMac/DebugUtils (= 2.1.3)
    • GoogleToolboxForMac/Defines (= 2.1.3)
    • GoogleToolboxForMac/NSString+URLArguments (= 2.1.3)
  • GoogleToolboxForMac/NSFileHandle+UniqueName (2.1.3):
    • GoogleToolboxForMac/Defines (= 2.1.3)
  • GoogleToolboxForMac/NSScanner+JSON (2.1.3):
    • GoogleToolboxForMac/Defines (= 2.1.3)
  • GoogleToolboxForMac/NSString+HTML (2.1.3):
    • GoogleToolboxForMac/Core (= 2.1.3)
  • GoogleToolboxForMac/NSString+URLArguments (2.1.3)
  • GoogleToolboxForMac/NSString+XML (2.1.3):
    • GoogleToolboxForMac/Defines (= 2.1.3)
  • GoogleToolboxForMac/NSThread+Blocks (2.1.3):
    • GoogleToolboxForMac/Defines (= 2.1.3)
  • GoogleToolboxForMac/Regex (2.1.3):
    • GoogleToolboxForMac/Defines (= 2.1.3)
  • GoogleToolboxForMac/StringEncoding (2.1.3):
    • GoogleToolboxForMac/Defines (= 2.1.3)
  • GoogleToolboxForMac/SystemVersion (2.1.3):
    • GoogleToolboxForMac/Defines (= 2.1.3)
  • GoogleToolboxForMac/URLBuilder (2.1.3):
    • GoogleToolboxForMac/Core (= 2.1.3)
    • GoogleToolboxForMac/Defines (= 2.1.3)
    • GoogleToolboxForMac/NSDictionary+URLArguments (= 2.1.3)
    • GoogleToolboxForMac/NSString+URLArguments (= 2.1.3)
  • GTMSessionFetcher/Core (1.1.12)
  • leveldb-library (1.18.3)
  • 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.4.0)

DEPENDENCIES:

  • Firebase/Core
  • Firebase/Crash
  • Firebase/Database
  • Firebase/Messaging
  • Firebase/Storage
  • GoogleToolboxForMac (~> 2.1)

SPEC CHECKSUMS: Firebase: 3e92884a63e8f76d107c43a67d2ab9071e1eda10 FirebaseAnalytics: 722b53c7b32bfc7806b06e0093a2f5180d4f2c5a FirebaseCore: ebe73f64302705e693b1de9919a76edbdd17a19d FirebaseCrash: cded0fc566c03651aea606a101bc156085f333ca FirebaseDatabase: 2e6e8e110b93b9a6e7aac71774c769a363035cb1 FirebaseInstanceID: f2b688c66b972f30d7fa9f5f9f91455454a03b47 FirebaseMessaging: e25dc87045e76dfe9e920a5741dc3fe7e3ef2268 FirebaseStorage: 0cca42d9b889a0227c3a50121f45a4469fc9eb27 GoogleToolboxForMac: 2501e2ad72a52eb3dfe7bd9aee7dad11b858bd20 GTMSessionFetcher: ebaa1f79a5366922c1735f1566901f50beba23b7 leveldb-library: 10fb39c39e243db4af1828441162405bbcec1404 nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3 Protobuf: 03eef2ee0b674770735cf79d9c4d3659cf6908e8

PODFILE CHECKSUM: 60ba18470a8dc11a9d347aa124c90387784861e2

COCOAPODS: 1.3.1

vuyani-k avatar Jan 12 '18 10:01 vuyani-k

argh, was missing pod 'Firebase/Firestore'

vuyani-k avatar Jan 12 '18 10:01 vuyani-k

@jolinkomo-code is this sorted? Your Podfile contains no reference to crashlytics?

Ehesp avatar Jan 13 '18 17:01 Ehesp

@Ehesp @chrisbianca Sorry for late response. Pasted my Podfile.lock. Thank you in advance and for nice open source.

PODS:
  - Crashlytics (3.9.3):
    - Fabric (~> 1.7.2)
  - Fabric (1.7.2)
  - Firebase/Auth (4.8.0):
    - Firebase/Core
    - FirebaseAuth (= 4.4.1)
  - Firebase/Core (4.8.0):
    - FirebaseAnalytics (= 4.0.5)
    - FirebaseCore (= 4.0.13)
  - Firebase/Database (4.8.0):
    - Firebase/Core
    - FirebaseDatabase (= 4.1.3)
  - Firebase/Storage (4.8.0):
    - Firebase/Core
    - FirebaseStorage (= 2.1.1)
  - FirebaseAnalytics (4.0.5):
    - FirebaseCore (~> 4.0)
    - FirebaseInstanceID (~> 2.0)
    - GoogleToolboxForMac/NSData+zlib (~> 2.1)
    - nanopb (~> 0.3)
  - FirebaseAuth (4.4.1):
    - FirebaseAnalytics (~> 4.0)
    - GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)
    - GTMSessionFetcher/Core (~> 1.1)
  - FirebaseCore (4.0.13):
    - GoogleToolboxForMac/NSData+zlib (~> 2.1)
  - FirebaseDatabase (4.1.3):
    - FirebaseAnalytics (~> 4.0)
    - FirebaseCore (~> 4.0)
    - leveldb-library (~> 1.18)
  - FirebaseInstanceID (2.0.8):
    - FirebaseCore (~> 4.0)
  - FirebaseStorage (2.1.1):
    - FirebaseAnalytics (~> 4.0)
    - FirebaseCore (~> 4.0)
    - GTMSessionFetcher/Core (~> 1.1)
  - GoogleToolboxForMac/DebugUtils (2.1.3):
    - GoogleToolboxForMac/Defines (= 2.1.3)
  - GoogleToolboxForMac/Defines (2.1.3)
  - GoogleToolboxForMac/NSData+zlib (2.1.3):
    - GoogleToolboxForMac/Defines (= 2.1.3)
  - GoogleToolboxForMac/NSDictionary+URLArguments (2.1.3):
    - GoogleToolboxForMac/DebugUtils (= 2.1.3)
    - GoogleToolboxForMac/Defines (= 2.1.3)
    - GoogleToolboxForMac/NSString+URLArguments (= 2.1.3)
  - GoogleToolboxForMac/NSString+URLArguments (2.1.3)
  - GTMSessionFetcher/Core (1.1.12)
  - leveldb-library (1.20)
  - nanopb (0.3.8):
    - nanopb/decode (= 0.3.8)
    - nanopb/encode (= 0.3.8)
  - nanopb/decode (0.3.8)
  - nanopb/encode (0.3.8)

DEPENDENCIES:
  - Crashlytics (~> 3.9.3)
  - Fabric (~> 1.7.2)
  - Firebase/Auth
  - Firebase/Core
  - Firebase/Database
  - Firebase/Storage

SPEC CHECKSUMS:
  Crashlytics: dbb07d01876c171c5ccbdf7826410380189e452c
  Fabric: 9cd6a848efcf1b8b07497e0b6a2e7d336353ba15
  Firebase: 710decbbc6d9d48530e9a5dba3209740c3532e05
  FirebaseAnalytics: 5b02a63ead2c3f0259cfc7f15e053e440587ecf8
  FirebaseAuth: dc0dd403beca5b2b016aac89c2d0b8dad1c81926
  FirebaseCore: 3c02ec652db3d03fdc8bc6d9154af3e20d64b6f5
  FirebaseDatabase: 7088bfc4af2cc00231bb36e1404fc2d7509eb4dc
  FirebaseInstanceID: 81df5805a08001e69138664bdd02c6719a9ac80f
  FirebaseStorage: ab08d1c93a2feffa038fdd6693088b310ab1e6c6
  GoogleToolboxForMac: 2501e2ad72a52eb3dfe7bd9aee7dad11b858bd20
  GTMSessionFetcher: ebaa1f79a5366922c1735f1566901f50beba23b7
  leveldb-library: 08cba283675b7ed2d99629a4bc5fd052cd2bb6a5
  nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3

PODFILE CHECKSUM: 5b62d655f24cbffc2f0f929393d981af188eed38

COCOAPODS: 1.3.1

yoonsy avatar Jan 15 '18 01:01 yoonsy

@Ehesp yes its sorted. Im not using crashlytics.

vuyani-k avatar Jan 15 '18 06:01 vuyani-k

I m getting same error.

Here is my Podfile.lock.

PODS:
  - Crashlytics (3.9.3):
    - Fabric (~> 1.7.2)
  - Fabric (1.7.2)
  - Firebase/Core (4.8.0):
    - FirebaseAnalytics (= 4.0.5)
    - FirebaseCore (= 4.0.13)
  - FirebaseAnalytics (4.0.5):
    - FirebaseCore (~> 4.0)
    - FirebaseInstanceID (~> 2.0)
    - GoogleToolboxForMac/NSData+zlib (~> 2.1)
    - nanopb (~> 0.3)
  - FirebaseCore (4.0.13):
    - GoogleToolboxForMac/NSData+zlib (~> 2.1)
  - FirebaseInstanceID (2.0.8):
    - FirebaseCore (~> 4.0)
  - GoogleToolboxForMac/Defines (2.1.3)
  - GoogleToolboxForMac/NSData+zlib (2.1.3):
    - GoogleToolboxForMac/Defines (= 2.1.3)
  - nanopb (0.3.8):
    - nanopb/decode (= 0.3.8)
    - nanopb/encode (= 0.3.8)
  - nanopb/decode (0.3.8)
  - nanopb/encode (0.3.8)

DEPENDENCIES:
  - Crashlytics (~> 3.9.3)
  - Fabric (~> 1.7.2)
  - Firebase/Core

SPEC CHECKSUMS:
  Crashlytics: dbb07d01876c171c5ccbdf7826410380189e452c
  Fabric: 9cd6a848efcf1b8b07497e0b6a2e7d336353ba15
  Firebase: 710decbbc6d9d48530e9a5dba3209740c3532e05
  FirebaseAnalytics: 5b02a63ead2c3f0259cfc7f15e053e440587ecf8
  FirebaseCore: 3c02ec652db3d03fdc8bc6d9154af3e20d64b6f5
  FirebaseInstanceID: 81df5805a08001e69138664bdd02c6719a9ac80f
  GoogleToolboxForMac: 2501e2ad72a52eb3dfe7bd9aee7dad11b858bd20
  nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3

PODFILE CHECKSUM: 14731f5dc8ce7f4bd5f7234b7730f5dacd5e4d27

COCOAPODS: 1.3.1

Let me know what I can do on my end to help trace this further.

nishp1 avatar Jan 20 '18 02:01 nishp1

Hmm, weird. After restarting XCode, it worked. Smh.

nishp1 avatar Jan 20 '18 03:01 nishp1

I fixed it by modifying the header and framework search path

tirrorex avatar Jan 24 '18 11:01 tirrorex

@tirrorex What changes did you need to make? Have you tried with v3.2.2?

chrisbianca avatar Jan 26 '18 09:01 chrisbianca

@chrisbianca yes we are using the 3.2.2 version. I made some changes to work around the react dependency, i will probably bump an issue or a PR once i build back from the sources (to get the original search paths) i had to build quickly so i modified the sources directly (so i'm not sure whether the problem was on my side or not), problem will be to have something working for everyone imo.

tirrorex avatar Jan 26 '18 09:01 tirrorex

Agreed, we've wasted many a day trying to get the header and framework search paths working as reliably as possible across the vast number of ways that people can be using the library!

We're better than we were by a long way, but there's still a few edge cases.

I'm going to close this issue as I think some of this has gone away.

@tirrorex Please feel free to submit a PR or let me know what you changed once you've had time to identify it. Cheers.

chrisbianca avatar Jan 26 '18 09:01 chrisbianca

I'm having a similar issue with Admob, I get the same error except about firebase.admob() and my Podfile (and Podfile.lock) bot have references to Admob:

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

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

  # Pods for App
  pod 'Firebase/Core'
  pod 'Firebase/Messaging'
  pod 'Firebase/AdMob'
end

And lock:

PODS:
  - Firebase/AdMob (4.8.2):
    - Firebase/Core
    - Google-Mobile-Ads-SDK (= 7.27.0)
  - Firebase/Core (4.8.2):
    - FirebaseAnalytics (= 4.0.9)
    - FirebaseCore (= 4.0.14)
  - Firebase/Messaging (4.8.2):
    - Firebase/Core
    - FirebaseMessaging (= 2.0.8)
  - FirebaseAnalytics (4.0.9):
    - FirebaseCore (~> 4.0)
    - FirebaseInstanceID (~> 2.0)
    - GoogleToolboxForMac/NSData+zlib (~> 2.1)
    - nanopb (~> 0.3)
  - FirebaseCore (4.0.14):
    - GoogleToolboxForMac/NSData+zlib (~> 2.1)
  - FirebaseInstanceID (2.0.8):
    - FirebaseCore (~> 4.0)
  - FirebaseMessaging (2.0.8):
    - FirebaseAnalytics (~> 4.0)
    - FirebaseCore (~> 4.0)
    - FirebaseInstanceID (~> 2.0)
    - GoogleToolboxForMac/Logger (~> 2.1)
    - Protobuf (~> 3.1)
  - Google-Mobile-Ads-SDK (7.27.0)
  - GoogleToolboxForMac/Defines (2.1.3)
  - GoogleToolboxForMac/Logger (2.1.3):
    - GoogleToolboxForMac/Defines (= 2.1.3)
  - GoogleToolboxForMac/NSData+zlib (2.1.3):
    - GoogleToolboxForMac/Defines (= 2.1.3)
  - 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)

DEPENDENCIES:
  - Firebase/AdMob
  - Firebase/Core
  - Firebase/Messaging

SPEC CHECKSUMS:
  Firebase: 7d3b8cd837ad9fcd391657734c0d56dab8e9a5a3
  FirebaseAnalytics: 388b630c15713f5dbf364071f5f3d6077fb52f4e
  FirebaseCore: 2e0b98fb2d64ca8140136beff15772bdd14d2dd7
  FirebaseInstanceID: 81df5805a08001e69138664bdd02c6719a9ac80f
  FirebaseMessaging: dfdcd307c2382290a1e297a81d0f18370f5b1bcd
  Google-Mobile-Ads-SDK: 83f7f890e638ce8f1debd440ea363338c9f6be3b
  GoogleToolboxForMac: 2501e2ad72a52eb3dfe7bd9aee7dad11b858bd20
  nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
  Protobuf: 8a9838fba8dae3389230e1b7f8c104aa32389c03

PODFILE CHECKSUM: 2e51e5e83bf0fa06decfec01cae618502c1c91c4

COCOAPODS: 1.2.1

Not working after multiple successful pod updates and pod installs and Xcode restarts. However firebase.messaging() works fine.

Edit: Nevermind, removing node_modules, package-lock.json, and Podfile.lock and rerunning npm install and pod install and one more pod update seems to have done it. (In other words, when all else fails, restart)

nkov avatar Feb 04 '18 07:02 nkov

@nkov which version of RNFirebase are you using? There was an issue in 3.2.3 which we fixed in 3.2.4

chrisbianca avatar Feb 04 '18 08:02 chrisbianca

I still see this behavior when I call firebase.fabric.crashlytics().crash(); with RN 0.54.2 and react-native-firebase 3.3.1. Any update on the fix mentioned by @tirrorex?

jochem725 avatar Apr 04 '18 14:04 jochem725

same problem here RN 54.4

basequatro avatar Apr 05 '18 16:04 basequatro

This is resolved in react-native-firebase 4.0 :)

jochem725 avatar Apr 10 '18 11:04 jochem725

Same problem RN 0.54.1 and Firebase 4.0.0

thepatrykk avatar Apr 13 '18 17:04 thepatrykk