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
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
@yoonsy Can we see the contents of your Podfile.lock
?
Also getting the same error
@jolinkomo-code Can I see your Podfile.lock
?
PODS:
DEPENDENCIES:
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
argh, was missing pod 'Firebase/Firestore'
@jolinkomo-code is this sorted? Your Podfile contains no reference to crashlytics?
@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
@Ehesp yes its sorted. Im not using crashlytics.
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.
Hmm, weird. After restarting XCode, it worked. Smh.
I fixed it by modifying the header and framework search path
@tirrorex What changes did you need to make? Have you tried with v3.2.2?
@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.
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.
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 update
s and pod install
s 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 which version of RNFirebase are you using? There was an issue in 3.2.3 which we fixed in 3.2.4
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?
same problem here RN 54.4
This is resolved in react-native-firebase 4.0
:)
Same problem RN 0.54.1 and Firebase 4.0.0
Ran into this using react-native-firebase 4.1.0
and react-native 0.55.3
.
@nkov 's solution worked for me:
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)
Hi! Is there an option to install this module without using cocoapods? Is there a tutorial explaining about that? Thank you.
@nkov I am actually having this same issue with admob saying it's not installed even so I did install it 馃憤 though I couldn't make it work using your technique any other way ? :s
Had same issue today. Specs:
macOS: 1.13.6
rn: 0.55
rn-firebase: 4.3.8
pods:
pod 'Firebase/Core', '~> 5.3.0'
pod 'Firebase/Database', '~> 5.3.0'
pod 'Firebase/Auth', '~> 5.3.0'
pod 'Firebase/RemoteConfig', '~> 5.3.0'
pod 'Firebase/Storage', '~> 5.3.0'
pod 'Fabric', '~> 1.7.5'
pod 'Crashlytics', '~> 3.10.1'
The problem for me was in the cocoapods gem version. I had 1.6.3 and it was't working. Only downgrade to a 1.5.3 helped.
Had same issue today. Specs:
macOS: 1.13.6
rn: 0.55
rn-firebase: 4.3.8
pods:pod 'Firebase/Core', '~> 5.3.0' pod 'Firebase/Database', '~> 5.3.0' pod 'Firebase/Auth', '~> 5.3.0' pod 'Firebase/RemoteConfig', '~> 5.3.0' pod 'Firebase/Storage', '~> 5.3.0' pod 'Fabric', '~> 1.7.5' pod 'Crashlytics', '~> 3.10.1'
The problem for me was in the cocoapods gem version. I had 1.6.3 and it was't working. Only downgrade to a 1.5.3 helped.
Amazing, this work like a charm.
@nighttiger1990 that's from...a year ago. Better to go forward. I'm using cocoapods 1.9.1 and ruby 2.7.0 (ruby 2.7.1 would work too, as would 2.6.x stable) and everything works fine with react-native-firebase v5 and v6
Most helpful comment
Had same issue today. Specs:
macOS: 1.13.6
rn: 0.55
rn-firebase: 4.3.8
pods:
The problem for me was in the cocoapods gem version. I had 1.6.3 and it was't working. Only downgrade to a 1.5.3 helped.