React native iOS app getting stuck at launch screen after importing firebase crashlytics?

Viewed 192

I have implemented crashlytics in react native app which is working fine if i import just android or iOS folder separately but when i import crashlytics library in .js file iOS app is getting stuck at launch screen.

Please suggest the way or root cause fir this issue.

App is getting stuck after importing below library in js file else App is working fine

import crashlytics from '@react-native-firebase/crashlytics';

Error log enter image description here

package.json as below

{
  "name": "abc",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "react-native start",
    "bundle-android": "react-native bundle --entry-file index.js --platform android --dev false --bundle-output ./android/app/src/main/assets/index.android.bundle --assets-dest ./android/app/src/main/res/",
    "bundle-ios": "react-native bundle --entry-file index.js --bundle-output ./ios/bundle/index.ios.jsbundle --platform ios --assets-dest ./ios/bundle --dev false",
    "test": "jest",
    "ios": "react-native run-ios --simulator 'iPhone X'",
    "android": "react-native run-android --variant=ProdDebug",
    "android-ete": "ENVFILE=.env.ete react-native run-android --variant=EteDebug",
    "ios-ete": "ENVFILE=.env.ete react-native run-ios",
    "ios-prod": "ENVFILE=.env.prod react-native run-ios",
    "exportcert-ete": "java -jar BKSPubKeyTool.jar --importkeystore keystore_ete.bks --alias oauth.testing --password keystorepwd --exportcert src/keystore/id_rsa_ete.pem --exportjs src/keystore/pubKey_ete.js",
    "exportcert-prod": "java -jar BKSPubKeyTool.jar --importkeystore keystore.bks --alias oauth --password keystorepwd --exportcert src/keystore/id_rsa_prod.pem --exportjs src/keystore/pubKey_prod.js",
    "lint": "eslint .",
    "clean": "react-native-clean-project"
  },
  "dependencies": {
    "@react-native-firebase/analytics": "^7.4.2",
    "@react-native-firebase/app": "^6.0.0-alpha.25",
    "@react-native-firebase/crashlytics": "^6.0.0-alpha.25",
    "axios": "^0.19.0",
    "buffer": "^5.2.1",
    "crypto-js": "^3.1.9-1",
    "jetifier": "^1.6.3",
    "jsencrypt": "^3.0.0-rc.1",
    "mobx": "^5.11.0",
    "mobx-react": "^5.4.4",
    "moment": "^2.24.0",
    "native-base": "^2.12.1",
    "prop-types": "^15.7.2",
    "querystring": "^0.2.0",
    "react": "16.8.6",
    "react-native": "0.60.3",
    "react-native-config": "^1.3.3",
    "react-native-date-picker": "^2.7.3",
    "react-native-device-info": "^2.2.2",
    "react-native-exception-handler": "^2.10.8",
    "react-native-gesture-handler": "^1.4.0",
    "react-native-keyboard-spacer": "^0.4.1",
    "react-native-linear-gradient": "^2.5.4",
    "react-native-modal": "^11.1.0",
    "react-native-modal-dropdown": "^0.6.2",
    "react-native-picker-select": "^6.3.0",
    "react-native-popup-dialog": "^0.18.2",
    "react-native-reanimated": "^1.4.0",
    "react-native-root-toast": "^3.1.2",
    "react-native-screens": "^2.0.0-beta.10",
    "react-native-scrollable-tab-view": "^0.10.0",
    "react-native-splash-screen": "^3.2.0",
    "react-native-sqlite-storage": "^3.3.11",
    "react-native-tab-view": "^2.8.0",
    "react-native-user-agent": "^1.0.4",
    "react-native-user-inactivity": "^1.0.1",
    "react-native-uuid": "^1.4.9",
    "react-native-wheel-picker-android": "^2.0.5",
    "react-navigation": "^3.11.1"
  },
  "devDependencies": {
    "@babel/core": "^7.5.5",
    "@babel/plugin-proposal-decorators": "^7.4.4",
    "@babel/runtime": "^7.5.5",
    "@react-native-community/eslint-config": "^0.0.5",
    "babel-jest": "^24.8.0",
    "babel-plugin-transform-decorators-legacy": "^1.3.5",
    "babel-preset-react-native": "^4.0.1",
    "eslint": "^6.1.0",
    "jest": "^24.8.0",
    "metro-react-native-babel-preset": "^0.55.0",
    "react-native-clean-project": "^3.4.0",
    "react-test-renderer": "16.8.6"
  },
  "jest": {
    "preset": "react-native"
  }
}
1 Answers

As I can see in error log, it's having error related to Native modules.

So I hope your crashlytics module is not properly connected with your iOS Native Module, that's why it's stucked on splash screen as per your explanation.

Please cross-check below added URL code with your Podfile code, whether your crashlytic and dependant plugin pods are their or not.

https://rnfirebase.io/crashlytics/usage/installation/ios

And crashlytics plugin depending on the core firebase app as per stated in crashlytics plugin installation guide, so confirm using below URL as well,

https://rnfirebase.io/install-ios

I hope this will resolve your issues.

Related