[🐛] App crashing when importing "@react-native-firebase/analytics" #8255
Labels
Needs Attention
platform: android
plugin: analytics
Google Analytics for Firebase
type: bug
New bug report
Issue
App crashing when importing "@react-native-firebase/analytics".
My React Native + Expo app, on Android, crashes immediately at launch. After much troubleshooting, I was able to converge the issue to importing
@react-native-firebase/analytics
.Installing the package is fine. But, as soon as the package is imported, the app build crashes.
I've followed all steps listed on the RN Firebase Get Started page. Made sure that the google-services plugin dependency is enabled and executed correctly. The
google-services.json
file is correctly placed in /android/app/.I have also tried to
initializeApp()
(firebase/app) on app's initial load.I found a similar issue logged on react-native-google-mobile-ads. But, that has been fixed and released a couple of months ago, so that was not the root cause for this issue.
I am on the latest versions of
@react-native-firebase/analytics
and@react-native-firebase/app
(21.7.1). Other package versions are:"react": "18.2.0"
,"react-native": "0.76.3"
,"expo": "52.0.17"
,"react-native-google-mobile-ads": "14.8.1"
"@react-native-firebase/crashlytics": "21.7.1"
I was able to successfully install and setup RN Firebase Crashlytics plugin. It does detect the crash and provide a stack trace. But, I am stuck at decoding it. Here's the error:
Project Files
Javascript
Click To Expand
package.json
:# N/A
firebase.json
for react-native-firebase v6:# N/A
iOS
Click To Expand
ios/Podfile
:# N/A
AppDelegate.m
:// N/A
Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:// N/A
android/app/build.gradle
:// N/A
android/settings.gradle
:// N/A
MainApplication.java
:// N/A
AndroidManifest.xml
:<!-- N/A -->
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:e.g. 5.4.3
Firebase
module(s) you're using that has the issue:e.g. Instance ID
TypeScript
?Y/N
&VERSION
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: