'react-native-firebase freezes app on splash screen

I followed all the instructions on https://rnfirebase.io/ for installing firebase, but my app still freezes on splash screen

I have no error message because the issue only occurs once the app is built in .app file (expo build:ios), all works fine when testing (expo run:ios)

MyFirebaseScript.js

import remoteConfig from "@react-native-firebase/remote-config";
// only the import is causing the problem
// same issue with firestore, ...

Package.json

{
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "arch -x86_64 expo run:ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@babel/preset-env": "^7.1.6",
    "@expo/vector-icons": "^12.0.0",
    "@react-native-async-storage/async-storage": "^1.17.1",
    "@react-native-community/blur": "^3.6.0",
    "@react-native-firebase/app": "^14.7.0",
    "@react-native-firebase/firestore": "^14.7.0",
    "@react-native-firebase/remote-config": "^14.7.0",
    "@react-navigation/native": "^5.9.0",
    "@react-navigation/stack": "^5.9.0",
    "expo": "~43.0.2",
    "expo-blur": "~10.0.3",
    "expo-constants": "~12.1.3",
    "expo-haptics": "~11.0.3",
    "expo-status-bar": "~1.2.0",
    "expo-updates": "~0.10.13",
    "prop-types": "15.7.2",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-hooks-global-state": "^1.0.2",
    "react-native": "0.64.3",
    "react-native-action-button": "^2.8.5",
    "react-native-animated-nav-tab-bar": "^3.1.8",
    "react-native-device-info": "^8.7.0",
    "react-native-elements": "^3.4.2",
    "react-native-flash-message": "^0.2.1",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-maps": "^0.29.4",
    "react-native-maps-super-cluster": "^1.6.0",
    "react-native-modal": "^13.0.1",
    "react-native-paper": "4.9.2",
    "react-native-reanimated": "~2.2.0",
    "react-native-safe-area-context": "3.3.2",
    "react-native-screens": "~3.8.0",
    "react-native-text": "^1.2.2",
    "react-native-vector-icons": "^9.1.0",
    "react-native-web": "0.17.1",
    "react-navigation": "^4.4.4",
    "rn-swipeable-panel": "^1.2.7",
    "styled-components": "^4.4.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true,
  "name": "myapp",
  "version": "1.0.0"
}

I tried to downgrade react-native-firebase, but that did nothing



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source