热门标签 | HotTags
当前位置:  开发笔记 > 前端 > 正文

更新到Xcode11.0后反应本机崩溃

如何解决《更新到Xcode11.0后反应本机崩溃》经验,为你挑选了1个好方法。

我刚刚将Xcode更新为版本11.0,现在,当我在插入的iPhone上从Xcode运行react native应用时,该应用在本地调用时崩溃:

2019-10-11 09:52:42.402 [fatal][tid:main] Exception '*** -[__NSArrayM objectAtIndexedSubscript:]: index 1 beyond bounds [0 .. 0]' was thrown while invoking getCurrentAppState on target AppState with params (
    2,
    3
)
callstack: (
    0   CoreFoundation                      0x000000020ae29294  + 252
    1   libobjc.A.dylib                     0x000000020a0039f8 objc_exception_throw + 56
    2   CoreFoundation                      0x000000020ada2ce8 _CFArgv + 0
    3   CoreFoundation                      0x000000020ad27cfc  + 0
    4   MyApp                      0x000000010084dfac -[RCTModuleMethod processMethodSignature] + 10144
    5   MyApp                      0x00000001008526d4 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 164
    6   MyApp                      0x00000001008e488c _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 660
    7   MyApp                      0x00000001008e4400 _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 144
    8   MyApp                      0x00000001008e4364 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 28
    9   libdispatch.dylib                   0x0000000101dcb6f0 _dispatch_call_block_and_release + 24
    10  libdispatch.dylib                   0x0000000101dccc74 _dispatch_client_callout + 16
    11  libdispatch.dylib                   0x0000000101dda6fc _dispatch_main_queue_callback_4CF + 1360
    12  CoreFoundation                      0x000000020adbac1c  + 12
    13  CoreFoundation                      0x000000020adb5b54  + 1924
    14  CoreFoundation                      0x000000020adb50b0 CFRunLoopRunSpecific + 436
    15  Foundation                          0x000000020b782fac  + 300
    16  Foundation                          0x000000020b782e3c  + 96
    17  MyApp                      0x0000000100796c94 +[RNSplashScreen show] + 308
    18  MyApp                      0x00000001006e4d7c -[AppDelegate application:didFinishLaunchingWithOptions:] + 444
    19  UIKitCore                           0x00000002375dbe30  + 412
    20  UIKitCore                           0x00000002375dd594  + 3352
    21  UIKitCore                           0x00000002375e2d20  + 1540
    22  UIKitCore                           0x0000000236ea62dc  + 776
    23  UIKitCore                           0x0000000236eae874  + 160
    24  UIKitCore                           0x0000000236ea5f60  + 236
    25  UIKitCore                           0x0000000236ea6850  + 1064
    26  UIKitCore                           0x0000000236ea4b9c  + 744
    27  UIKitCore                           0x0000000236ea4864  + 428
    28  UIKitCore                           0x0000000236ea93a4  + 220
    29  UIKitCore                           0x0000000236eaa188 _performActionsWithDelayForTransitionContext + 112
    30  UIKitCore                           0x0000000236ea925c  + 244
    31  UIKitCore                           0x0000000236eadf5c  + 360
    32  UIKitCore                           0x00000002375e1328  + 540
    33  UIKitCore                           0x00000002371ddba8  + 360
    34  FrontBoardServices                  0x000000020d7a49fc  + 440
    35  FrontBoardServices                  0x000000020d7ae40c  + 256
    36  FrontBoardServices                  0x000000020d7adc14  + 64
    37  libdispatch.dylib                   0x0000000101dccc74 _dispatch_client_callout + 16
    38  libdispatch.dylib                   0x0000000101dd0840 _dispatch_block_invoke_direct + 232
    39  FrontBoardServices                  0x000000020d7df040  + 40
    40  FrontBoardServices                  0x000000020d7decdc  + 408
    41  FrontBoardServices                  0x000000020d7df294  + 52
    42  CoreFoundation                      0x000000020adbb018  + 24
    43  CoreFoundation                      0x000000020adbaf98  + 88
    44  CoreFoundation                      0x000000020adba880  + 176
    45  CoreFoundation                      0x000000020adb57bc  + 1004
    46  CoreFoundation                      0x000000020adb50b0 CFRunLoopRunSpecific + 436
    47  GraphicsServices                    0x000000020cfb579c GSEventRunModal + 104
    48  UIKitCore                           0x00000002375e4978 UIApplicationMain + 212
    49  MyApp                      0x00000001006e551c main + 124
    50  libdyld.dylib                       0x000000020a87a8e0  + 4
)
2019-10-11 09:52:42.407068+0200 MyApp[309:11033] Exception '*** -[__NSArrayM objectAtIndexedSubscript:]: index 1 beyond bounds [0 .. 0]' was thrown while invoking getCurrentAppState on target AppState with params (
    2,
    3
)
callstack: (
    0   CoreFoundation                      0x000000020ae29294  + 252
    1   libobjc.A.dylib                     0x000000020a0039f8 objc_exception_throw + 56
    2   CoreFoundation                      0x000000020ada2ce8 _CFArgv + 0
    3   CoreFoundation                      0x000000020ad27cfc  + 0
    4   MyApp                      0x000000010084dfac -[RCTModuleMethod processMethodSignature] + 10144
    5   MyApp                      0x00000001008526d4 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 164
    6   MyApp                      0x00000001008e488c _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 660
    7   MyApp                      0x00000001008e4400 _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 144
    8   MyApp                      0x00000001008e4364 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 28
    9   libdispatch.dylib                   0x0000000101dcb6f0 _dispatch_call_block_and_release + 24
    10  libdispatch.dylib                   0x0000000101dccc74 _dispatch_client_callout + 16
    11  libdispatch.dylib                   0x0000000101dda6fc _dispatch_main_queue_callback_4CF + 1360
    12  CoreFoundation                      0x000000020adbac1c  + 12
    13  CoreFoundation                      0x000000020adb5b54  + 1924
    14  CoreFoundation                      0x000000020adb50b0 CFRunLoopRunSpecific + 436
    15  Foundation                          0x000000020b782fac  + 300
    16  Foundation                          0x000000020b782e3c  + 96
    17  MyApp                      0x0000000100796c94 +[RNSplashScreen show] + 308
    18  MyApp                      0x00000001006e4d7c -[AppDelegate application:didFinishLaunchingWithOptions:] + 444
    19  UIKitCore                           0x00000002375dbe30  + 412
    20  UIKitCore                           0x00000002375dd594  + 3352
    21  UIKitCore                           0x00000002375e2d20  + 1540
    22  UIKitCore                           0x0000000236ea62dc  + 776
    23  UIKitCore                           0x0000000236eae874  + 160
    24  UIKitCore                           0x0000000236ea5f60  + 236
    25  UIKitCore                           0x0000000236ea6850  + 1064
    26  UIKitCore                           0x0000000236ea4b9c  + 744
    27  UIKitCore                           0x0000000236ea4864  + 428
    28  UIKitCore                           0x0000000236ea93a4  + 220
    29  UIKitCore                           0x0000000236eaa188 _performActionsWithDelayForTransitionContext + 112
    30  UIKitCore                           0x0000000236ea925c  + 244
    31  UIKitCore                           0x0000000236eadf5c  + 360
    32  UIKitCore                           0x00000002375e1328  + 540
    33  UIKitCore                           0x00000002371ddba8  + 360
    34  FrontBoardServices                  0x000000020d7a49fc  + 440
    35  FrontBoardServices                  0x000000020d7ae40c  + 256
    36  FrontBoardServices                  0x000000020d7adc14  + 64
    37  libdispatch.dylib                   0x0000000101dccc74 _dispatch_client_callout + 16
    38  libdispatch.dylib                   0x0000000101dd0840 _dispatch_block_invoke_direct + 232
    39  FrontBoardServices                  0x000000020d7df040  + 40
    40  FrontBoardServices                  0x000000020d7decdc  + 408
    41  FrontBoardServices                  0x000000020d7df294  + 52
    42  CoreFoundation                      0x000000020adbb018  + 24
    43  CoreFoundation                      0x000000020adbaf98  + 88
    44  CoreFoundation                      0x000000020adba880  + 176
    45  CoreFoundation                      0x000000020adb57bc  + 1004
    46  CoreFoundation                      0x000000020adb50b0 CFRunLoopRunSpecific + 436
    47  GraphicsServices                    0x000000020cfb579c GSEventRunModal + 104
    48  UIKitCore                           0x00000002375e4978 UIApplicationMain + 212
    49  MyApp                      0x00000001006e551c main + 124
    50  libdyld.dylib                       0x000000020a87a8e0  + 4
)

2019-10-11 09:52:43.027 [fatal][tid:main] Exception '*** -[__NSArrayM objectAtIndexedSubscript:]: index 1 beyond bounds [0 .. 0]' was thrown while invoking getInitialNotification on target PushNotificationManager with params (
    148,
    149
)
callstack: (
    0   CoreFoundation                      0x000000020ae29294  + 252
    1   libobjc.A.dylib                     0x000000020a0039f8 objc_exception_throw + 56
    2   CoreFoundation                      0x000000020ada2ce8 _CFArgv + 0
    3   CoreFoundation                      0x000000020ad27cfc  + 0
    4   MyApp                      0x000000010084dfac -[RCTModuleMethod processMethodSignature] + 10144
    5   MyApp                      0x00000001008526d4 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 164
    6   MyApp                      0x00000001008e488c _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 660
    7   MyApp                      0x00000001008e4400 _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 144
    8   MyApp                      0x00000001008e4364 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 28
    9   libdispatch.dylib                   0x0000000101dcb6f0 _dispatch_call_block_and_release + 24
    10  libdispatch.dylib                   0x0000000101dccc74 _dispatch_client_callout + 16
    11  libdispatch.dylib                   0x0000000101dda6fc _dispatch_main_queue_callback_4CF + 1360
    12  CoreFoundation                      0x000000020adbac1c  + 12
    13  CoreFoundation                      0x000000020adb5b54  + 1924
    14  CoreFoundation                      0x000000020adb50b0 CFRunLoopRunSpecific + 436
    15  Foundation                          0x000000020b782fac  + 300
    16  Foundation                          0x000000020b782e3c  + 96
    17  MyApp                      0x0000000100796c94 +[RNSplashScreen show] + 308
    18  MyApp                      0x00000001006e4d7c -[AppDelegate application:didFinishLaunchingWithOptions:] + 444
    19  UIKitCore                           0x00000002375dbe30  + 412
    20  UIKitCore                           0x00000002375dd594  + 3352
    21  UIKitCore                           0x00000002375e2d20  + 1540
    22  UIKitCore                           0x0000000236ea62dc  + 776
    23  UIKitCore                           0x0000000236eae874  + 160
    24  UIKitCore                           0x0000000236ea5f60  + 236
    25  UIKitCore                           0x0000000236ea6850  + 1064
    26  UIKitCore                           0x0000000236ea4b9c  + 744
    27  UIKitCore                           0x0000000236ea4864  + 428
    28  UIKitCore                           0x0000000236ea93a4  + 220
    29  UIKitCore                           0x0000000236eaa188 _performActionsWithDelayForTransitionContext + 112
    30  UIKitCore                           0x0000000236ea925c  + 244
    31  UIKitCore                           0x0000000236eadf5c  + 360
    32  UIKitCore                           0x00000002375e1328  + 540
    33  UIKitCore                           0x00000002371ddba8  + 360
    34  FrontBoardServices                  0x000000020d7a49fc  + 440
    35  FrontBoardServices                  0x000000020d7ae40c  + 256
    36  FrontBoardServices                  0x000000020d7adc14  + 64
    37  libdispatch.dylib                   0x0000000101dccc74 _dispatch_client_callout + 16
    38  libdispatch.dylib                   0x0000000101dd0840 _dispatch_block_invoke_direct + 232
    39  FrontBoardServices                  0x000000020d7df040  + 40
    40  FrontBoardServices                  0x000000020d7decdc  + 408
    41  FrontBoardServices                  0x000000020d7df294  + 52
    42  CoreFoundation                      0x000000020adbb018  + 24
    43  CoreFoundation                      0x000000020adbaf98  + 88
    44  CoreFoundation                      0x000000020adba880  + 176
    45  CoreFoundation                      0x000000020adb57bc  + 1004
    46  CoreFoundation                      0x000000020adb50b0 CFRunLoopRunSpecific + 436
    47  GraphicsServices                    0x000000020cfb579c GSEventRunModal + 104
    48  UIKitCore                           0x00000002375e4978 UIApplicationMain + 212
    49  MyApp                      0x00000001006e551c main + 124
    50  libdyld.dylib                       0x000000020a87a8e0  + 4
)
2019-10-11 09:52:43.038945+0200 MyApp[309:11033] Exception '*** -[__NSArrayM objectAtIndexedSubscript:]: index 1 beyond bounds [0 .. 0]' was thrown while invoking getInitialNotification on target PushNotificationManager with params (
    148,
    149
)
callstack: (
    0   CoreFoundation                      0x000000020ae29294  + 252
    1   libobjc.A.dylib                     0x000000020a0039f8 objc_exception_throw + 56
    2   CoreFoundation                      0x000000020ada2ce8 _CFArgv + 0
    3   CoreFoundation                      0x000000020ad27cfc  + 0
    4   MyApp                      0x000000010084dfac -[RCTModuleMethod processMethodSignature] + 10144
    5   MyApp                      0x00000001008526d4 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 164
    6   MyApp                      0x00000001008e488c _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 660
    7   MyApp                      0x00000001008e4400 _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 144
    8   MyApp                      0x00000001008e4364 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 28
    9   libdispatch.dylib                   0x0000000101dcb6f0 _dispatch_call_block_and_release + 24
    10  libdispatch.dylib                   0x0000000101dccc74 _dispatch_client_callout + 16
    11  libdispatch.dylib                   0x0000000101dda6fc _dispatch_main_queue_callback_4CF + 1360
    12  CoreFoundation                      0x000000020adbac1c  + 12
    13  CoreFoundation                      0x000000020adb5b54  + 1924
    14  CoreFoundation                      0x000000020adb50b0 CFRunLoopRunSpecific + 436
    15  Foundation                          0x000000020b782fac  + 300
    16  Foundation                          0x000000020b782e3c  + 96
    17  MyApp                      0x0000000100796c94 +[RNSplashScreen show] + 308
    18  MyApp                      0x00000001006e4d7c -[AppDelegate application:didFinishLaunchingWithOptions:] + 444
    19  UIKitCore                           0x00000002375dbe30  + 412
    20  UIKitCore                           0x00000002375dd594  + 3352
    21  UIKitCore                           0x00000002375e2d20  + 1540
    22  UIKitCore                           0x0000000236ea62dc  + 776
    23  UIKitCore                           0x0000000236eae874  + 160
    24  UIKitCore                           0x0000000236ea5f60  + 236
    25  UIKitCore                           0x0000000236ea6850  + 1064
    26  UIKitCore                           0x0000000236ea4b9c  + 744
    27  UIKitCore                           0x0000000236ea4864  + 428
    28  UIKitCore                           0x0000000236ea93a4  + 220
    29  UIKitCore                           0x0000000236eaa188 _performActionsWithDelayForTransitionContext + 112
    30  UIKitCore                           0x0000000236ea925c  + 244
    31  UIKitCore                           0x0000000236eadf5c  + 360
    32  UIKitCore                           0x00000002375e1328  + 540
    33  UIKitCore                           0x00000002371ddba8  + 360
    34  FrontBoardServices                  0x000000020d7a49fc  + 440
    35  FrontBoardServices                  0x000000020d7ae40c  + 256
    36  FrontBoardServices                  0x000000020d7adc14  + 64
    37  libdispatch.dylib                   0x0000000101dccc74 _dispatch_client_callout + 16
    38  libdispatch.dylib                   0x0000000101dd0840 _dispatch_block_invoke_direct + 232
    39  FrontBoardServices                  0x000000020d7df040  + 40
    40  FrontBoardServices                  0x000000020d7decdc  + 408
    41  FrontBoardServices                  0x000000020d7df294  + 52
    42  CoreFoundation                      0x000000020adbb018  + 24
    43  CoreFoundation                      0x000000020adbaf98  + 88
    44  CoreFoundation                      0x000000020adba880  + 176
    45  CoreFoundation                      0x000000020adb57bc  + 1004
    46  CoreFoundation                      0x000000020adb50b0 CFRunLoopRunSpecific + 436
    47  GraphicsServices                    0x000000020cfb579c GSEventRunModal + 104
    48  UIKitCore                           0x00000002375e4978 UIApplicationMain + 212
    49  MyApp                      0x00000001006e551c main + 124
    50  libdyld.dylib                       0x000000020a87a8e0  + 4
)

该项目以RN 0.59.5运行,现在我无法更新到0.61 ...



1> Ilario..:

要解决此问题,请在

yourproject/node_modules/react-native/React/Base/RCTModuleMethod.mm.

然后按如下所示进行更正:

https://github.com/facebook/react-native/pull/25146/files#diff-263fc157dfce55895cdc16495b55d190


我更新到RN 0.59.10,它也解决了这个问题。感谢您的回答!
推荐阅读
author-avatar
淋殁
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有