热门标签 | 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,它也解决了这个问题。感谢您的回答!
推荐阅读
  • 本文提供了一个详尽的前端开发资源列表,涵盖了从基础入门到高级应用的各个方面,包括HTML5、CSS3、JavaScript框架及库、移动开发、API接口、工具与插件等。 ... [详细]
  • 在尝试加载支持推送通知的iOS应用程序的Ad Hoc构建时,遇到了‘no valid aps-environment entitlement found for application’的错误提示。本文将探讨此错误的原因及多种可能的解决方案。 ... [详细]
  • iOS 设备唯一标识获取的高效解决方案与实践
    在iOS 7中,苹果公司再次禁止了对MAC地址的访问,使得开发者无法直接获取设备的物理地址。为了在开发过程中实现设备的唯一标识,苹果推荐使用Keychain服务来存储和管理唯一的标识符。此外,还可以结合其他技术手段,如UUID和广告标识符(IDFA),以确保设备的唯一性和安全性。这些方法不仅能够满足应用的需求,还能保护用户的隐私。 ... [详细]
  • React项目基础教程第五课:深入解析组件间通信机制 ... [详细]
  • 深入理解iOS中的链式编程:以Masonry为例
    本文通过介绍Masonry这一轻量级布局框架,探讨链式编程在iOS开发中的应用。Masonry不仅简化了Auto Layout的使用,还提高了代码的可读性和维护性。 ... [详细]
  • 默认情况下,Git 使用 Nano 编辑器进行提交信息的编辑,但如果您更喜欢使用 Vim,可以通过简单的配置更改来实现这一变化。本文将指导您如何通过修改全局配置文件来设置 Vim 作为默认的 Git 提交编辑器。 ... [详细]
  • 本文详细介绍了如何在最新版本的Xcode中重命名iOS项目,包括项目名称、应用名称及相关的文件夹和配置文件。通过本文,开发者可以轻松完成项目的重命名工作。 ... [详细]
  • 在iOS开发过程中,当开发团队使用多台Mac设备时,可能会遇到无法继续申请新证书的问题。本文介绍了如何通过导出.p12文件来解决这一问题,并确保团队成员能够在不同设备上共享同一个证书。 ... [详细]
  • ABP框架是ASP.NET Boilerplate的简称,它不仅是一个开源且文档丰富的应用程序框架,还提供了一套基于领域驱动设计(DDD)的最佳实践架构模型。本文将详细介绍ABP框架的特点、项目结构及其在Web API优先架构中的应用。 ... [详细]
  • PHP-Casbin v3.20.0 已经发布,这是一个使用 PHP 语言开发的轻量级开源访问控制框架,支持多种访问控制模型,包括 ACL、RBAC 和 ABAC。新版本在性能上有了显著的提升。 ... [详细]
  • 利用REM实现移动端布局的高效适配技巧
    在移动设备上实现高效布局适配时,使用rem单位已成为一种流行且有效的技术。本文将分享过去一年中使用rem进行布局适配的经验和心得。rem作为一种相对单位,能够根据根元素的字体大小动态调整,从而确保不同屏幕尺寸下的布局一致性。通过合理设置根元素的字体大小,开发者可以轻松实现响应式设计,提高用户体验。此外,文章还将探讨一些常见的问题和解决方案,帮助开发者更好地掌握这一技术。 ... [详细]
  • 浏览器作为我们日常不可或缺的软件工具,其背后的运作机制却鲜为人知。本文将深入探讨浏览器内核及其版本的演变历程,帮助读者更好地理解这一关键技术组件,揭示其内部运作的奥秘。 ... [详细]
  • feat: Enhances Jest Testing Capabilities with Snapshot Support ... [详细]
  • 在处理大规模数据数组时,优化分页组件对于提高页面加载速度和用户体验至关重要。本文探讨了如何通过高效的分页策略,减少数据渲染的负担,提升应用性能。具体方法包括懒加载、虚拟滚动和数据预取等技术,这些技术能够显著降低内存占用和提升响应速度。通过实际案例分析,展示了这些优化措施的有效性和可行性。 ... [详细]
  • 投融资周报 | Circle 达成 4 亿美元融资协议,唯一艺术平台 A 轮融资超千万美元 ... [详细]
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社区 版权所有