App crashes on AsyncStorage and/or NetInfo import

323 Views Asked by At

Enviroment

React Native CLI 0.63.2
Windows 10 x64 bit
Node v14.4.0
Packages (package.json):

"dependencies": {
  "@fortawesome/fontawesome-svg-core": "^1.2.30",
  "@fortawesome/free-solid-svg-icons": "^5.14.0",
  "@fortawesome/react-native-fontawesome": "^0.2.5",
  "@react-native-community/async-storage": "^1.12.1",
  "@react-native-community/blur": "^3.6.0",
  "@react-native-community/datetimepicker": "^3.0.4",
  "@react-native-community/masked-view": "^0.1.10",
  "@react-native-community/netinfo": "^5.9.7",
  "@react-native-community/picker": "^1.8.1",
  "@react-native-firebase/app": "^8.4.6",
  "@react-navigation/native": "^5.7.1",
  "@react-navigation/stack": "^5.7.1",
  "md5": "^2.3.0",
  "moment": "^2.27.0",
  "react": "16.13.1",
  "react-hook-form": "^6.4.1",
  "react-native": "0.63.2",
  "react-native-code-push": "^6.3.0",
  "react-native-code-push-saga": "^1.0.1",
  "react-native-gesture-handler": "^1.8.0",
  "react-native-reanimated": "^1.13.1",
  "react-native-safe-area-context": "^3.1.7",
  "react-native-safe-area-view": "^1.1.1",
  "react-native-screens": "^2.9.0",
  "react-native-snap-carousel": "^4.0.0-beta.5",
  "react-native-svg": "^12.1.0",
  "react-native-ui-lib": "^5.15.0",
  "react-redux": "^7.2.1",
  "redux": "^4.0.5",
  "redux-logger": "^3.0.6",
  "redux-saga": "^1.1.3"
},
"devDependencies": {
  "@babel/core": "7.10.5",
  "@babel/runtime": "7.10.5",
  "@react-native-community/eslint-config": "1.1.0",
  "babel-jest": "25.5.1",
  "eslint": "6.8.0",
  "jest": "25.5.4",
  "metro-react-native-babel-preset": "0.59.0",
  "react-native-svg-transformer": "^0.14.3",
  "react-test-renderer": "16.13.1"
}

Problem

Whenever I import @react-native-community/netinfo or @react-native-community/async-storage it seems to work fine on Android Emulator. However if I test it live on my iPhone 11 device it crashes almost instantly. All I have to do in order to reproduce the problem is only to import the packages and run it on a iOS device.

I currently don't have the ability to debug for iOS devices as I do not own a MacOS. Is this a known bug or is there a solution to this?

Both packages are from React Native community maybe there is a pattern there. Maybe the packages are affecting other packages causing a crash.

0

There are 0 best solutions below