生产捆绑包React Native上的“未处理的JS异常:t不是函数。(在't(c)'中,'t'为假)”

时间:2019-09-18 13:29:39

标签: android ios xcode react-native bundler

原生版本:0.58.3

在两个平台上构建发行包时,该应用在启动时崩溃或卡在iOS的黑屏上。

但是在开发模式下,所有操作都可以顺利进行。

日志:

[array([[0.0000000e+00, 0.0000000e+00, 0.0000000e+00, ..., 9.1042261e-07,
        4.2489510e-06, 1.0829879e-07],
       [0.0000000e+00, 0.0000000e+00, 0.0000000e+00, ..., 4.5446509e-06,
        1.0727225e-05, 7.5697239e-06],
       [0.0000000e+00, 0.0000000e+00, 0.0000000e+00, ..., 1.4139889e-06,
        8.1363060e-06, 5.8842788e-06],
       ...,
       [0.0000000e+00, 0.0000000e+00, 0.0000000e+00, ..., 1.2733157e-07,
        3.6470925e-07, 2.5473477e-07],
       [0.0000000e+00, 0.0000000e+00, 0.0000000e+00, ..., 7.2166131e-08,
        2.0409759e-07, 2.3035474e-07],
       [0.0000000e+00, 0.0000000e+00, 0.0000000e+00, ..., 5.7966993e-08,
        1.7371592e-07, 1.5426794e-07]], dtype=float32)
...
 array([[0.0000000e+00, 0.0000000e+00, 0.0000000e+00, ..., 9.1042261e-07,
        4.2489510e-06, 1.0829879e-07],
       [0.0000000e+00, 0.0000000e+00, 0.0000000e+00, ..., 4.5446509e-06,
        1.0727225e-05, 7.5697239e-06],
       [0.0000000e+00, 0.0000000e+00, 0.0000000e+00, ..., 1.4139889e-06,
        8.1363060e-06, 5.8842788e-06],
       ...,
       [0.0000000e+00, 0.0000000e+00, 0.0000000e+00, ..., 1.2733157e-07,
        3.6470925e-07, 2.5473477e-07],
       [0.0000000e+00, 0.0000000e+00, 0.0000000e+00, ..., 7.2166131e-08,
        2.0409759e-07, 2.3035474e-07],
       [0.0000000e+00, 0.0000000e+00, 0.0000000e+00, ..., 5.7966993e-08,
        1.7371592e-07, 1.5426794e-07]], dtype=float32)]

我认为它与2019-09-18 14:43:52.964246+0200 APP_NAME[18561:1491677] - <AppMeasurement>[I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist 2019-09-18 14:43:53.052680+0200 APP_NAME[18561:1491677] 5.17.0 - [Firebase/Analytics][I-ACS023007] Analytics v.50600000 started 2019-09-18 14:43:53.055493+0200 APP_NAME[18561:1491677] 5.17.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled 2019-09-18 14:43:53.060321+0200 APP_NAME[18561:1491697] 5.17.0 - [Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the instructions at: https://firebase.google.com/docs/cloud-messaging/ios/client#method_swizzling_in_firebase_messaging to ensure proper integration. 2019-09-18 14:43:53.118524+0200 APP_NAME[18561:1491639] [MediaRemote] [AVOutputContext] WARNING: AVF context unavailable for +[MRAVOutputContext sharedAudioPresentationContext]_block_invoke 2019-09-18 14:43:53.118777+0200 APP_NAME[18561:1491639] [MediaRemote] [AVOutputContext] WARNING: AVF context unavailable for SYSTEM 2019-09-18 14:43:53.133669+0200 APP_NAME[18561:1491639] NfcManager created 2019-09-18 14:43:53.255271+0200 APP_NAME[18561:1491678] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x7fb876600d20] get output frames failed, state 8196 2019-09-18 14:43:53.256357+0200 APP_NAME[18561:1491678] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x7fb876600d20] get output frames failed, state 8196 2019-09-18 14:43:53.256949+0200 APP_NAME[18561:1491678] TIC Read Status [1:0x0]: 1:57 2019-09-18 14:43:53.257744+0200 APP_NAME[18561:1491678] TIC Read Status [1:0x0]: 1:57 2019-09-18 14:43:53.270 [error][tid:com.facebook.react.JavaScript] t is not a function. (In 't(c)', 't' is false) 2019-09-18 14:43:53.271102+0200 APP_NAME[18561:1491706] t is not a function. (In 't(c)', 't' is false) 2019-09-18 14:43:53.273 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: t is not a function. (In 't(c)', 't' is false) 2019-09-18 14:43:53.272959+0200 APP_NAME[18561:1491679] Unhandled JS Exception: t is not a function. (In 't(c)', 't' is false) 2019-09-18 14:43:53.273 [error][tid:com.facebook.react.JavaScript] Module AppRegistry is not a registered callable module (calling runApplication) 2019-09-18 14:43:53.273202+0200 APP_NAME[18561:1491706] Module AppRegistry is not a registered callable module (calling runApplication) 2019-09-18 14:43:53.285672+0200 APP_NAME[18561:1491679] *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: t is not a function. (In 't(c)', 't' is false)', reason: 'Unhandled JS Exception: t is not a function. (In 't(c)', 't' is false), stack: 常量有关,因为即时消息会在整个代码中使用它来确定环境和所有人之间的关系

1 个答案:

答案 0 :(得分:0)

所以我发现这与redux有关,applyMiddleware函数中有一个空值

https://github.com/LogRocket/redux-logger#log-only-in-development