React-native-iOS设备崩溃“未定义不是对象(正在评估's.Manager')”

时间:2019-12-05 09:36:09

标签: javascript ios react-native crash runtime-error

该应用在模拟器和所有Android设备上均可正常运行。当我尝试在iOS设备上运行时,该应用会打开,然后几乎立即崩溃。我似乎无法找到问题所在,因为在我的代码中没有任何地方提到s.Manager。

我做了什么:

  • 删除了node_modules,对其进行了更新,然后重新安装
  • 已删除的Pod文件,更新的Pod,重新安装

错误日志:

2019-12-04 17:11:40.958445+0100 mid[9239:4992389] undefined is not an object (evaluating 's.Manager')
2019-12-04 17:11:40.964 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: undefined is not an object (evaluating 's.Manager')
2019-12-04 17:11:40.963688+0100 app[9239:4992383] Unhandled JS Exception: undefined is not an object (evaluating 's.Manager')
2019-12-04 17:11:40.964 [error][tid:com.facebook.react.JavaScript] Module AppRegistry is not a registered callable module (calling runApplication)
2019-12-04 17:11:40.964345+0100 app[9239:4992389] Module AppRegistry is not a registered callable module (calling runApplication)
2019-12-04 17:11:41.179884+0100 mid[9239:4992383] *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: undefined is not an object (evaluating 's.Manager')', reason: 'Unhandled JS Exception: undefined is not an object (evaluating 's.Manager'), stack:
u@80:391
<unknown>@80:1029
forEach@<null>:<null>
<unknown>@80:1015
h@2:1670
<unknown>@79:49
h@2:1670
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff23baa1ee __exceptionPreprocess + 350
    1   libobjc.A.dylib                     0x00007fff50864b20 objc_exception_throw + 48
    2   app                                 0x000000010202490b RCTFormatError + 0
    3   app                                 0x0000000102046bbc -[RCTExceptionsManager reportFatalException:stack:exceptionId:] + 495
    4   CoreFoundation                      0x00007fff23bb138c __invoking___ + 140
    5   CoreFoundation                      0x00007fff23bae49f -[NSInvocation invoke] + 319
    6   CoreFoundation                      0x00007fff23bae9a4 -[NSInvocation invokeWithTarget:] + 68
    7   app                                 0x0000000102058a20 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 578
    8   app                                 0x000000010205acce _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 246
    9   app                                 0x000000010205aa56 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 78
    10  libdispatch.dylib                   0x00007fff516ac810 _dispatch_call_block_and_release + 12
    11  libdispatch.dylib                   0x00007fff516ad781 _dispatch_client_callout + 8
    12  libdispatch.dylib                   0x00007fff516b34ee _dispatch_lane_serial_drain + 707
    13  libdispatch.dylib                   0x00007fff516b3f24 _dispatch_lane_invoke + 388
    14  libdispatch.dylib                   0x00007fff516bdffc _dispatch_workloop_worker_thread + 626
    15  libsystem_pthread.dylib             0x00007fff518cd611 _pthread_wqthread + 421
    16  libsystem_pthread.dylib             0x00007fff518cd3fd start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException

依赖项

   "@react-native-community/async-storage": "^1.6.1",
    "@react-native-community/netinfo": "^4.2.1",
    "@sentry/react-native": "^1.1.0",
    "axios": "^0.18.0",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "base-64": "^0.1.0",
    "base64-js": "^1.3.0",
    "crypto-js": "^3.1.9-1",
    "jwt-decode": "^2.2.0",
    "lodash": "^4.17.11",
    "lottie-ios": "^3.0.3",
    "lottie-react-native": "^3.1.0",
    "metro-config": "^0.55.0",
    "moment": "^2.23.0",
    "prop-types": "^15.6.2",
    "react": "16.6.3",
    "react-devtools-core": "^3.4.3",
    "react-native": "^0.60.4",
    "react-native-action-sheet-component": "MY_PACKAGE",
    "react-native-animatable": "^1.3.0",
    "react-native-auth0": "^1.5.0",
    "react-native-camera": "^2.11.2",
    "react-native-collapsible": "^1.4.0",
    "react-native-config": "^0.11.7",
    "react-native-datepicker": "^1.7.2",
    "react-native-deep-link": "^0.2.3",
    "react-native-device-info": "^3.0.0",
    "react-native-easy-toast": "^1.2.0",
    "react-native-elements": "^1.2.7",
    "react-native-fabric": "0.5.2",
    "react-native-firebase": "^5.5.5",
    "react-native-flags": "MY_PACKAGE",
    "react-native-fs": "2.15.2",
    "react-native-geolocation-service": "^3.1.0",
    "react-native-gesture-handler": "^1.5.2",
    "react-native-image-crop-picker": "^0.25.0",
    "react-native-image-resizer": "^1.0.1",
    "react-native-image-zoom-viewer": "MY_PACKAGE",
    "react-native-indicators": "^0.13.0",
    "react-native-keyboard-aware-scroll-view": "^0.8.0",
    "react-native-keychain": "^3.1.3",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-material-menu": "^0.6.6",
    "react-native-modal-filter-picker": "^1.3.4",
    "react-native-permissions": "^2.0.4",
    "react-native-phone-input": "MY_PACKAGE",
    "react-native-picker-select": "^5.2.0",
    "react-native-pincode": "MY_PACKAGE",
    "react-native-progress": "^3.5.0",
    "react-native-shadow": "^1.2.2",
    "react-native-splash-screen": "^3.1.1",
    "react-native-svg": "^9.13.3",
    "react-native-svg-transformer": "^0.12.1",
    "react-native-touch-id": "^4.4.1",
    "react-native-vector-icons": "^6.6.0",
    "react-navigation": "^4.0.10",
    "react-navigation-drawer": "^1.4.0",
    "react-navigation-stack": "^1.10.2",
    "react-navigation-tabs": "^1.2.0",
    "react-redux": "^6.0.0",
    "recompose": "^0.30.0",
    "redux": "^4.0.1",
    "redux-logger": "^3.0.6",
    "redux-persist": "^6.0.0",
    "redux-promise-middleware": "^5.1.1",
    "redux-thunk": "^2.3.0",
    "rn-fetch-blob": "^0.10.16",
    "styled-components": "^4.1.3",
    "uuid": "^3.3.2",
    "validator": "^10.9.0"

我们将不胜感激!

1 个答案:

答案 0 :(得分:0)

事实证明,运行以下命令可以解决该问题。

react-native bundle --entry-file ./index.js --platform ios --bundle-output ios/main.jsbundle --assets-dest ios