热门标签 | 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,它也解决了这个问题。感谢您的回答!
推荐阅读
  • iOS 设备唯一标识获取的高效解决方案与实践
    在iOS 7中,苹果公司再次禁止了对MAC地址的访问,使得开发者无法直接获取设备的物理地址。为了在开发过程中实现设备的唯一标识,苹果推荐使用Keychain服务来存储和管理唯一的标识符。此外,还可以结合其他技术手段,如UUID和广告标识符(IDFA),以确保设备的唯一性和安全性。这些方法不仅能够满足应用的需求,还能保护用户的隐私。 ... [详细]
  • React项目基础教程第五课:深入解析组件间通信机制 ... [详细]
  • 本文提供了针对iOS设备在Xcode 8.0及以上版本中的调试指南,详细介绍了从环境配置到常见问题解决的全流程。内容涵盖设备连接、证书配置、日志查看及性能监控等多个方面,适用于2015年后的开发环境。通过本指南,开发者可以高效地进行应用调试,提升开发效率。 ... [详细]
  • IOS Run loop详解
    为什么80%的码农都做不了架构师?转自http:blog.csdn.netztp800201articledetails9240913感谢作者分享Objecti ... [详细]
  • Flutter 开发中集成极光推送的详细步骤
    本文详细介绍了如何在 Flutter 项目中集成极光推送服务,包括配置和测试的具体步骤。 ... [详细]
  • 微软推出Windows Terminal Preview v0.10
    微软近期发布了Windows Terminal Preview v0.10,用户可以在微软商店或GitHub上获取这一更新。该版本在2月份发布的v0.9基础上,新增了鼠标输入和复制Pane等功能。 ... [详细]
  • 利用REM实现移动端布局的高效适配技巧
    在移动设备上实现高效布局适配时,使用rem单位已成为一种流行且有效的技术。本文将分享过去一年中使用rem进行布局适配的经验和心得。rem作为一种相对单位,能够根据根元素的字体大小动态调整,从而确保不同屏幕尺寸下的布局一致性。通过合理设置根元素的字体大小,开发者可以轻松实现响应式设计,提高用户体验。此外,文章还将探讨一些常见的问题和解决方案,帮助开发者更好地掌握这一技术。 ... [详细]
  • 在软件开发过程中,经常需要将多个项目或模块进行集成和调试,尤其是当项目依赖于第三方开源库(如Cordova、CocoaPods)时。本文介绍了如何在Xcode中高效地进行多项目联合调试,分享了一些实用的技巧和最佳实践,帮助开发者解决常见的调试难题,提高开发效率。 ... [详细]
  • Presto:高效即席查询引擎的深度解析与应用
    本文深入解析了Presto这一高效的即席查询引擎,详细探讨了其架构设计及其优缺点。Presto通过内存到内存的数据处理方式,显著提升了查询性能,相比传统的MapReduce查询,不仅减少了数据传输的延迟,还提高了查询的准确性和效率。然而,Presto在大规模数据处理和容错机制方面仍存在一定的局限性。本文还介绍了Presto在实际应用中的多种场景,展示了其在大数据分析领域的强大潜力。 ... [详细]
  • 投融资周报 | Circle 达成 4 亿美元融资协议,唯一艺术平台 A 轮融资超千万美元 ... [详细]
  • 本文源自极分享,详细内容请参阅原文。技术债务如同信用卡负债,随着时间推移,修复成本会越来越高,因此程序员必须对此有深刻认识。此外,团队应致力于培养一种持续维护和优化代码的文化,以减少技术债务的累积。 ... [详细]
  • 作为140字符的开创者,Twitter看似简单却异常复杂。其简洁之处在于仅用140个字符就能实现信息的高效传播,甚至在多次全球性事件中超越传统媒体的速度。然而,为了支持2亿用户的高效使用,其背后的技术架构和系统设计则极为复杂,涉及高并发处理、数据存储和实时传输等多个技术挑战。 ... [详细]
  • 今日精选:10款实用的jQuery随机效果插件
    在今天的精选内容中,我们推荐了10款实用的jQuery随机效果插件。这些插件不仅功能强大,而且设计精良,能够为您的网页增添独特的互动体验。从动态图像效果到文本动画,每款插件都提供了丰富的自定义选项,帮助开发者轻松实现创意视觉效果。特别值得一提的是,其中一款插件集成了与Google API的无缝对接,使数据展示更加生动和直观。 ... [详细]
  • 这篇文章将揭示 Vue 和 React 组件库中五个鲜为人知的强大工具。这些工具均以纯 JavaScript 实现,功能卓越。其中,async-validator 是一个数据验证插件,不仅预置了 URL 和电子邮件的验证规则,还支持异步验证功能。 ... [详细]
  • 新增 Android 平台的 getInstallReferrer() 方法以获取安装来源信息 ... [详细]
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社区 版权所有