我已经在 IOS TestFlight 上发布了我的 React Native 应用程序几周,一切看起来都很好,除了应用程序有时会崩溃(启动屏幕将显示大约 1 秒,然后应用程序崩溃)。一旦崩溃开始,重新打开应用程序将再次崩溃。
我在 Xcode 中查找了我的崩溃日志,该错误是RCTFatal + 448 (RCTAssert.m:132)
由main + 88 (main.m:14)
See screenshot引起的。
我确定应用程序处于Release
模式;我无法在模拟器上复制崩溃;我安装了Bugsnag,没有报错;我有componentDidCatch
错误边界index.js
,没有发现错误,所以我猜错误不是来自我的 JavaScript 代码?
有没有人遇到过类似的问题并解决了?这是我的崩溃日志,package.json
以防万一
Date/Time: 2019-03-11 19:39:06.1522 +1000
Launch Time: 2019-03-11 19:39:05.6004 +1000
OS Version: iPhone OS 12.1.4 (16D57)
Baseband Version: 3.31.00
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x211811ea4 __exceptionPreprocess + 228 (NSException.m:172)
1 libobjc.A.dylib 0x2109e1a50 objc_exception_throw + 56 (objc-exception.mm:557)
2 App 0x104b475f8 RCTFatal + 448 (RCTAssert.m:132)
3 App 0x104ba2da0 facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&) + 712 (RCTNativeModule.mm:116)
4 App 0x104ba292c invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dy... + 88 (RCTNativeModule.mm:71)
5 libdispatch.dylib 0x2112496c8 _dispatch_call_block_and_release + 24 (init.c:1372)
6 libdispatch.dylib 0x21124a484 _dispatch_client_callout + 16 (object.m:511)
7 libdispatch.dylib 0x211229b34 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 1012 (inline_internal.h:2441)
8 CoreFoundation 0x2117a1ce4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 (CFRunLoop.c:1813)
9 CoreFoundation 0x21179cbac __CFRunLoopRun + 1964 (CFRunLoop.c:3113)
10 CoreFoundation 0x21179c0e0 CFRunLoopRunSpecific + 436 (CFRunLoop.c:3247)
11 GraphicsServices 0x213a15584 GSEventRunModal + 100 (GSEvent.c:2245)
12 UIKitCore 0x23eb30c00 UIApplicationMain + 212 (UIApplication.m:4347)
13 App 0x104aed3b4 main + 88 (main.m:14)
14 libdyld.dylib 0x21125abb4 start + 4
Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000002113a7104 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000211427948 pthread_kill$VARIANT$armv81 + 296 (pthread.c:1492)
2 libsystem_c.dylib 0x00000002112fed78 abort + 140 (abort.c:94)
3 libc++abi.dylib 0x00000002109c8f78 abort_message + 132 (abort_message.cpp:75)
4 libc++abi.dylib 0x00000002109c9120 default_terminate_handler() + 304 (cxa_default_handlers.cpp:68)
5 libobjc.A.dylib 0x00000002109e1e58 _objc_terminate() + 124 (objc-exception.mm:693)
6 App 0x0000000104d37470 CPPExceptionTerminate() + 520 (BSG_KSCrashSentry_CPPException.mm:193)
7 libc++abi.dylib 0x00000002109d50fc std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:66)
8 libc++abi.dylib 0x00000002109d5188 std::terminate() + 84 (cxa_handlers.cpp:97)
9 libdispatch.dylib 0x000000021124a498 _dispatch_client_callout + 36 (object.m:514)
10 libdispatch.dylib 0x0000000211229b34 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 1012 (inline_internal.h:2441)
11 CoreFoundation 0x00000002117a1ce4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 (CFRunLoop.c:1813)
12 CoreFoundation 0x000000021179cbac __CFRunLoopRun + 1964 (CFRunLoop.c:3113)
13 CoreFoundation 0x000000021179c0e0 CFRunLoopRunSpecific + 436 (CFRunLoop.c:3247)
14 GraphicsServices 0x0000000213a15584 GSEventRunModal + 100 (GSEvent.c:2245)
15 UIKitCore 0x000000023eb30c00 UIApplicationMain + 212 (UIApplication.m:4347)
16 App 0x0000000104aed3b4 main + 88 (main.m:14)
17 libdyld.dylib 0x000000021125abb4 start + 4
"dependencies": {
"@turf/boolean-point-in-polygon": "^6.0.1",
"@turf/helpers": "^6.1.4",
"@types/react-navigation": "^2.0.24",
"amazon-cognito-identity-js": "^3.0.3",
"apollo-boost": "^0.1.16",
"apollo-cache-inmemory": "^1.3.5",
"apollo-cache-persist": "^0.1.1",
"apollo-link": "^1.2.3",
"apollo-link-http-common": "^0.2.5",
"apollo-link-state": "^0.4.2",
"aws-amplify": "^1.1.17",
"aws-amplify-react-native": "^2.0.5",
"aws-appsync": "^1.3.4",
"aws-appsync-react": "^1.1.4",
"axios": "^0.18.0",
"buffer": "^5.2.1",
"bugsnag-react-native": "^2.15.0",
"date-fns": "^1.29.0",
"graphql": "^14.0.2",
"lodash": "^4.17.11",
"react": "16.5.0",
"react-apollo": "^2.2.4",
"react-native": "0.57.0",
"react-native-camera": "^1.3.1",
"react-native-device-info": "^0.24.3",
"react-native-dotenv": "^0.2.0",
"react-native-fbsdk": "^0.8.0",
"react-native-google-signin": "^1.0.2",
"react-native-heic-converter": "^1.2.0",
"react-native-maps": "^0.22.0",
"react-native-open-settings": "^1.0.1",
"react-native-push-notification": "^3.1.2",
"react-native-quick-actions": "^0.3.7",
"react-native-splash-screen": "^3.2.0",
"react-native-vector-icons": "^6.1.0",
"react-navigation": "^2.17.0",
"rn-fetch-blob": "^0.10.13",
"subscriptions-transport-ws": "^0.9.15",
"tslint": "^5.11.0",
"uuid": "^3.3.2"
},