React Native应用程序在TestFlight发布时崩溃

biswetbf  于 2023-08-07  发布在  React
关注(0)|答案(2)|浏览(140)

我可以在我的设备和模拟器上以释放模式运行。没有得到任何问题时,运行僵尸督察工具。似乎是null解引用问题,但无法跟踪它。
我怎样才能找出代码中的哪个位置导致了这种情况?我应该采取哪些后续步骤来调查或尝试消除问题?
也很好奇我怎么能找出我的应用程序第8行的日志的函数或行号。

Incident Identifier: E41CBE15-1FAF-4ACD-88E1-E2A8D339E410
Beta Identifier:     A11056FE-EF4C-40D8-B3A8-23E848FF818A
Hardware Model:      iPhone14,2
Process:             MyAppName [2067]
Path:                /private/var/containers/Bundle/Application/78FD1DCF-EE86-4735-A7B7-BA62C038495E/MyAppName.app/MyAppName
Identifier:          com.MyAppName.app
Version:             2.0.1 (7)
AppStoreTools:       13A1030d
AppVariant:          1:iPhone14,2:15
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.MyAppName.app [800]

Date/Time:           2021-11-23 14:20:29.9420 -0500
Launch Time:         2021-11-23 14:20:29.7755 -0500
OS Version:          iPhone OS 15.1 (19B74)
Release Type:        User
Baseband Version:    1.15.02
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000065
Exception Codes: 0x0000000000000001, 0x0000000000000065
VM Region Info: 0x65 is not in any region.  Bytes before following region: 4374609819
      REGION TYPE                 START - END      [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                   104bf4000-104bf8000 [   16K] r-x/r-x SM=COW  ...t.app/MyAppName
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: SIGNAL; [11]
Terminating Process: exc handler [2067]

Terminating Process: exc handler [2067]
Triggered by Thread:  8

Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0:
0   libobjc.A.dylib                        0x1999a564c getMethodNoSuper_nolock(objc_class*, objc_selector*) + 400
1   libobjc.A.dylib                        0x1999a54e8 getMethodNoSuper_nolock(objc_class*, objc_selector*) + 44
2   libobjc.A.dylib                        0x1999a24a4 lookUpImpOrForward + 376
3   libobjc.A.dylib                        0x19999da84 _objc_msgSend_uncached + 68
4   libobjc.A.dylib                        0x1999a4d44 objc_alloc_init + 80
5   UIKitCore                              0x183a7a948 -[UISheetPresentationController initWithPresentedViewController:presentingViewController:] + 180
6   UIKitCore                              0x1837a1fd8 -[_UIRootPresentationController initWithPresentedViewController:presentingWindow:] + 80
7   UIKitCore                              0x183a1d798 -[UIWindow setRootViewController:] + 484
8   MyAppName                                  0x104bf950c 0x104bf4000 + 21772
9   UIKitCore                              0x183a73044 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 356
10  UIKitCore                              0x183c5ab38 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 3524
11  UIKitCore                              0x183c434a4 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1208
12  UIKitCore                              0x183aa0e44 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 152
13  UIKitCore                              0x1838f962c _UIScenePerformActionsWithLifecycleActionMask + 104
14  UIKitCore                              0x183a24b7c __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 224
15  UIKitCore                              0x183b45380 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 248
16  UIKitCore                              0x183d85f8c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 760
17  UIKitCore                              0x183d11710 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 340
18  UIKitCore                              0x1838fa430 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 196
19  UIKitCore                              0x1839ba350 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 892
20  UIKitCore                              0x1838fc340 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 276
21  UIKitCore                              0x1839e6df4 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 384
22  UIKitCore                              0x183e6e260 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.608 + 776
23  UIKitCore                              0x18392ac60 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 256
24  UIKitCore                              0x18396e524 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 288
25  UIKitCore                              0x183aa5d70 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 572
26  UIKitCore                              0x1839e50b4 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 388
27  FrontBoardServices                     0x192e34e20 -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 440
28  FrontBoardServices                     0x192e5acdc __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.215 + 128
29  FrontBoardServices                     0x192e156b4 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240
30  FrontBoardServices                     0x192e16cf4 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke + 372
31  libdispatch.dylib                      0x180faf660 _dispatch_client_callout + 20
32  libdispatch.dylib                      0x180fb3118 _dispatch_block_invoke_direct + 264
33  FrontBoardServices                     0x192e16f94 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48
34  FrontBoardServices                     0x192e163d4 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220
35  FrontBoardServices                     0x192e1a9e4 -[FBSSerialQueue _performNextFromRunLoopSource] + 28
36  CoreFoundation                         0x18135f020 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
37  CoreFoundation                         0x18136fce0 __CFRunLoopDoSource0 + 208
38  CoreFoundation                         0x1812aa054 __CFRunLoopDoSources0 + 376
39  CoreFoundation                         0x1812af7f4 __CFRunLoopRun + 820
40  CoreFoundation                         0x1812c33b8 CFRunLoopRunSpecific + 600
41  GraphicsServices                       0x19cc5338c GSEventRunModal + 164
42  UIKitCore                              0x183c636a8 -[UIApplication _run] + 1100
43  UIKitCore                              0x1839e27f4 UIApplicationMain + 2092
44  MyAppName                                  0x104bf96b8 0x104bf4000 + 22200
45  dyld                                   0x105bc9a24 start + 520

Thread 1 name:   Dispatch queue: com.facebook.react.ShadowQueue
Thread 1:
0   libsystem_kernel.dylib                 0x1b82dd1a4 __ulock_wait + 8
1   libdispatch.dylib                      0x180fb0054 _dlock_wait + 56
2   libdispatch.dylib                      0x180fafdf8 _dispatch_thread_event_wait_slow + 56
3   libdispatch.dylib                      0x180fbeb9c __DISPATCH_WAIT_FOR_QUEUE__ + 364
4   libdispatch.dylib                      0x180fbe744 _dispatch_sync_f_slow + 144
5   MyAppName                                  0x104da5a54 0x104bf4000 + 1776212
6   MyAppName                                  0x104d8b0c0 0x104bf4000 + 1667264
7   libdispatch.dylib                      0x180faf660 _dispatch_client_callout + 20
8   libdispatch.dylib                      0x180fb0f08 _dispatch_once_callout + 32
9   MyAppName                                  0x104d8b09c 0x104bf4000 + 1667228
10  MyAppName                                  0x104d8b380 0x104bf4000 + 1667968
11  MyAppName                                  0x104d8044c 0x104bf4000 + 1623116
12  MyAppName                                  0x104d9b898 0x104bf4000 + 1734808
13  libdispatch.dylib                      0x180fad914 _dispatch_call_block_and_release + 32
14  libdispatch.dylib                      0x180faf660 _dispatch_client_callout + 20
15  libdispatch.dylib                      0x180fb6de4 _dispatch_lane_serial_drain + 672
16  libdispatch.dylib                      0x180fb7958 _dispatch_lane_invoke + 392
17  libdispatch.dylib                      0x180fc21a8 _dispatch_workloop_worker_thread + 656
18  libsystem_pthread.dylib                0x1f1ec60f4 _pthread_wqthread + 288
19  libsystem_pthread.dylib                0x1f1ec5e94 start_wqthread + 8

Thread 2:
0   libsystem_pthread.dylib                0x1f1ec5e8c start_wqthread + 0

Thread 3 name:   Dispatch queue: com.apple.accessibility.perappprefs.queue
Thread 3:
0   CoreFoundation                         0x181369c3c _CFXNotificationRegistrarAddName + 652
1   CoreFoundation                         0x181369be8 _CFXNotificationRegistrarAddName + 568
2   CoreFoundation                         0x1812e8d9c CFXNotificationRegistrarAdd + 512
3   CoreFoundation                         0x18131598c _CFXNotificationRegisterObserver + 248
4   CoreFoundation                         0x1812f57d4 CFNotificationCenterAddObserver + 348
5   libdispatch.dylib                      0x180fad914 _dispatch_call_block_and_release + 32
6   libdispatch.dylib                      0x180faf660 _dispatch_client_callout + 20
7   libdispatch.dylib                      0x180fb6de4 _dispatch_lane_serial_drain + 672
8   libdispatch.dylib                      0x180fb7958 _dispatch_lane_invoke + 392
9   libdispatch.dylib                      0x180fc21a8 _dispatch_workloop_worker_thread + 656
10  libsystem_pthread.dylib                0x1f1ec60f4 _pthread_wqthread + 288
11  libsystem_pthread.dylib                0x1f1ec5e94 start_wqthread + 8

Thread 4 name:   Dispatch queue: com.apple.UIKit.KeyboardManagement
Thread 4:
0   libsystem_kernel.dylib                 0x1b82dd1a4 __ulock_wait + 8
1   libdispatch.dylib                      0x180fb0054 _dlock_wait + 56
2   libdispatch.dylib                      0x180fafdf8 _dispatch_thread_event_wait_slow + 56
3   libdispatch.dylib                      0x180fbeb9c __DISPATCH_WAIT_FOR_QUEUE__ + 364
4   libdispatch.dylib                      0x180fbe744 _dispatch_sync_f_slow + 144
5   UIKitCore                              0x183abc398 __37-[_UIRemoteKeyboards startConnection]_block_invoke_3 + 136
6   CoreFoundation                         0x1812c62f4 __invoking___ + 148
7   CoreFoundation                         0x1812e3ac4 -[NSInvocation invoke] + 468
8   Foundation                             0x182afaf00 __NSXPCCONNECTION_IS_CALLING_OUT_TO_REPLY_BLOCK__ + 24
9   Foundation                             0x182b1bda4 -[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:] + 556
10  Foundation                             0x182af6a84 __88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke_3 + 212
11  libxpc.dylib                           0x1f1efc32c _xpc_connection_reply_callout + 116
12  libxpc.dylib                           0x1f1eef85c _xpc_connection_call_reply_async + 88
13  libdispatch.dylib                      0x180faf6e0 _dispatch_client_callout3 + 20
14  libdispatch.dylib                      0x180fccec8 _dispatch_mach_msg_async_reply_invoke + 348
15  libdispatch.dylib                      0x180fb6cbc _dispatch_lane_serial_drain + 376
16  libdispatch.dylib                      0x180fb798c _dispatch_lane_invoke + 444
17  libdispatch.dylib                      0x180fc21a8 _dispatch_workloop_worker_thread + 656
18  libsystem_pthread.dylib                0x1f1ec60f4 _pthread_wqthread + 288
19  libsystem_pthread.dylib                0x1f1ec5e94 start_wqthread + 8

Thread 5:
0   libsystem_pthread.dylib                0x1f1ec5e8c start_wqthread + 0

Thread 6:
0   libsystem_pthread.dylib                0x1f1ec5e8c start_wqthread + 0

Thread 7 name:  com.apple.uikit.eventfetch-thread
Thread 7:
0   libsystem_kernel.dylib                 0x1b82dc504 mach_msg_trap + 8
1   libsystem_kernel.dylib                 0x1b82dcb9c mach_msg + 76
2   CoreFoundation                         0x1812ab688 __CFRunLoopServiceMachPort + 372
3   CoreFoundation                         0x1812af97c __CFRunLoopRun + 1212
4   CoreFoundation                         0x1812c33b8 CFRunLoopRunSpecific + 600
5   Foundation                             0x182ade354 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 236
6   Foundation                             0x182b1fc28 -[NSRunLoop(NSRunLoop) runUntilDate:] + 92
7   UIKitCore                              0x183bdc8a4 -[UIEventFetcher threadMain] + 524
8   Foundation                             0x182b2e36c __NSThread__start__ + 808
9   libsystem_pthread.dylib                0x1f1ec69a4 _pthread_start + 148
10  libsystem_pthread.dylib                0x1f1ec5ea0 thread_start + 8

Thread 8 name:  com.facebook.react.JavaScript
Thread 8 Crashed:
0   JavaScriptCore                         0x18c5a02b4 JSObjectSetProperty + 168
1   JavaScriptCore                         0x18c5a029c JSObjectSetProperty + 144
2   MyAppName                                  0x104e1ad38 0x104bf4000 + 2256184
3   MyAppName                                  0x104cfdf78 0x104bf4000 + 1089400
4   MyAppName                                  0x104cfc4d8 0x104bf4000 + 1082584
5   MyAppName                                  0x104e23540 0x104bf4000 + 2291008
6   MyAppName                                  0x104e17dd0 0x104bf4000 + 2244048
7   MyAppName                                  0x104d63b30 0x104bf4000 + 1506096
8   MyAppName                                  0x104d6fcf4 0x104bf4000 + 1555700
9   MyAppName                                  0x104d6faa8 0x104bf4000 + 1555112
10  CoreFoundation                         0x181316924 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28
11  CoreFoundation                         0x181317820 __CFRunLoopDoBlocks + 412
12  CoreFoundation                         0x1812af808 __CFRunLoopRun + 840
13  CoreFoundation                         0x1812c33b8 CFRunLoopRunSpecific + 600
14  MyAppName                                  0x104d58e44 0x104bf4000 + 1461828
15  Foundation                             0x182b2e36c __NSThread__start__ + 808
16  libsystem_pthread.dylib                0x1f1ec69a4 _pthread_start + 148
17  libsystem_pthread.dylib                0x1f1ec5ea0 thread_start + 8

Thread 9 name:  JavaScriptCore bmalloc scavenger
Thread 9:
0   libsystem_kernel.dylib                 0x1b82dcf90 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1f1ecd254 _pthread_cond_wait + 1228
2   libc++.1.dylib                         0x199a4be78 std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 100
3   JavaScriptCore                         0x18d3e8b10 bmalloc::Scavenger::threadRunLoop() + 704
4   JavaScriptCore                         0x18d3e8544 bmalloc::Scavenger::threadEntryPoint(bmalloc::Scavenger*) + 16
5   JavaScriptCore                         0x18d3e9a00 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(bmalloc::Scavenger*), bmalloc::Scavenger*> >(void*) + 48
6   libsystem_pthread.dylib                0x1f1ec69a4 _pthread_start + 148
7   libsystem_pthread.dylib                0x1f1ec5ea0 thread_start + 8

Thread 8 crashed with ARM Thread State (64-bit):
    x0: 0x0000000109ded980   x1: 0x0000000109ded97d   x2: 0x0000000000000000   x3: 0x0000000109ded9ad
    x4: 0x0000000000000000   x5: 0x000000016b665c18   x6: 0x0000000000000065   x7: 0x0000000000000000
    x8: 0x0000000109e00000   x9: 0x0000000000000004  x10: 0x0000000000000000  x11: 0x0000000109ded97c
   x12: 0x00000000669df065  x13: 0x0000000000000074  x14: 0x00000000d1a85000  x15: 0x0000000000085000
   x16: 0x00000001f1ebda50  x17: 0x00000001dd3f8260  x18: 0x0000000000000000  x19: 0x0000000109d38068
   x20: 0x000000016b665c18  x21: 0x0000000109e00000  x22: 0x0000000109d8d9b8  x23: 0x0000000000000065
   x24: 0x0000000000000000  x25: 0x0000000109dce808  x26: 0x0000000106828040  x27: 0x0000000000000000
   x28: 0x000000028265e7c0   fp: 0x000000016b665c00   lr: 0x894c9b818c5a029c
    sp: 0x000000016b665b90   pc: 0x000000018c5a02b4 cpsr: 0x40001000
   far: 0x0000000000000065  esr: 0x92000006 (Data Abort) byte read Translation fault

Binary Images:
       0x19999c000 -        0x1999d5fff libobjc.A.dylib arm64e  <10fa90c6dfe538aeb3dc2251181cc272> /usr/lib/libobjc.A.dylib
       0x18374a000 -        0x184fcefff UIKitCore arm64e  <8388eb03002b3b35a78a6a022894292e> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
       0x104bf4000 -        0x1055e3fff MyAppName arm64  <88e3b5ce9df93ebcb845ba7abd349e08> /private/var/containers/Bundle/Application/78FD1DCF-EE86-4735-A7B7-BA62C038495E/MyAppName.app/MyAppName
       0x192e0b000 -        0x192eb6fff FrontBoardServices arm64e  <6fdec0c3e5003e06948ee34bda520801> /System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices
       0x180fab000 -        0x180ff1fff libdispatch.dylib arm64e  <a5cbaab3e3893548baacfab18411b94a> /usr/lib/system/libdispatch.dylib
       0x1812a4000 -        0x1816f7fff CoreFoundation arm64e  <b2d21cfd378c36d5baf73f70599cfefc> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
       0x19cc52000 -        0x19cc5afff GraphicsServices arm64e  <44e4515eb18737f18fe028e7b087daf5> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
       0x105bb0000 -        0x105c07fff dyld arm64e  <c21dba379df93fc7b286734030e18bb1> /usr/lib/dyld
       0x1b82db000 -        0x1b830efff libsystem_kernel.dylib arm64e  <b1b942de75903c61980a19d80ed4da37> /usr/lib/system/libsystem_kernel.dylib
       0x1f1ec5000 -        0x1f1ed0fff libsystem_pthread.dylib arm64e  <1a4a45fd1bb639df84140590ce103717> /usr/lib/system/libsystem_pthread.dylib
       0x182ac6000 -        0x182dcbfff Foundation arm64e  <d59c69755af237bc93be43b80b4293a5> /System/Library/Frameworks/Foundation.framework/Foundation
       0x1f1ee0000 -        0x1f1f17fff libxpc.dylib arm64e  <c4b164ee546f365786ee230d897ef6a0> /usr/lib/system/libxpc.dylib
       0x18c232000 -        0x18d4f2fff JavaScriptCore arm64e  <488fd070baee3b55ac28cee0d299f2b2> /System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore
       0x199a42000 -        0x199aa5fff libc++.1.dylib arm64e  <255864c483d93bac8c7aad1b2d8a60cc> /usr/lib/libc++.1.dylib
               0x0 - 0xffffffffffffffff ??? unknown-arch  <00000000000000000000000000000000> ???

EOF

字符串

vatpfxk5

vatpfxk51#

您可以使用sentry查看生产应用的日志:https://docs.sentry.io/platforms/react-native/

mqkwyuun

mqkwyuun2#

在React Native的新版本中,我遇到了同样的问题,下面是对我有效的解决方案
前往:

TARGETS -> {Your_App} -> Build Phases -> Link Binary With Libraries ->
Keep LibPods-{Your_App}.a and Remove Other items

字符串
Please checkout the image for better understanding...

相关问题