ios - React-native Xcode 错误 : "Thread 1: signal SIGABRT"

标签 ios xcode react-native

我在 XCode 中构建应用程序后遇到了这个问题。 以下是一些日志:

2019-12-23 11:43:38.538929+0200 signer[87746:1862730] You've implemented -[<UIApplicationDelegate> application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist.
2019-12-23 11:43:38.541152+0200 signer[87746:1862730] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
2019-12-23 11:43:38.546 [info][tid:main][RCTCxxBridge.mm:213] Initializing <RCTCxxBridge: 0x7fa7de405980> (parent: <RCTBridge: 0x600002424cb0>, executor: (null))
2019-12-23 11:43:38.550376+0200 signer[87746:1862730] Initializing <RCTCxxBridge: 0x7fa7de405980> (parent: <RCTBridge: 0x600002424cb0>, executor: (null))
2019-12-23 11:43:38.639 [info][tid:main][RCTRootView.m:293] Running application signer ({
    initialProps =     {
    };
    rootTag = 1;
})
2019-12-23 11:43:38.639089+0200 signer[87746:1862730] Running application signer ({
    initialProps =     {
    };
    rootTag = 1;
})
2019-12-23 11:43:38.990604+0200 signer[87746:1862730] -[RCTReconnectingWebSocket initWithURL:queue:]: unrecognized selector sent to instance 0x600000149650
2019-12-23 11:43:39.046365+0200 signer[87746:1862730] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RCTReconnectingWebSocket initWithURL:queue:]: unrecognized selector sent to instance 0x600000149650'
*** First throw call stack:
(
  0   CoreFoundation                      0x00007fff23c7127e exceptionPreprocess + 350
  1   libobjc.A.dylib                     0x00007fff513fbb20 objc_exception_throw + 48
  2   CoreFoundation                      0x00007fff23c91fd4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
  3   CoreFoundation                      0x00007fff23c75c4c ___forwarding___ + 1436
  4   CoreFoundation                      0x00007fff23c77f78 _CF_forwarding_prep_0 + 120
  5   signer                              0x00000001083876a5 _ZL17socketForLocationP8NSString + 821
  6   signer                              0x000000010838708c -[RCTPackagerConnection init] + 284
  7   signer                              0x0000000108386f44 __49+[RCTPackagerConnection sharedPackagerConnection]_block_invoke + 36
  8   libdispatch.dylib                   0x0000000109240d48 _dispatch_client_callout + 8
  9   libdispatch.dylib                   0x0000000109242297 _dispatch_once_callout + 66
  10  signer                              0x0000000108386ef4 +[RCTPackagerConnection sharedPackagerConnection] + 84
  11  signer                              0x000000010830e757 -[RCTDevSettings setBridge:] + 567
  12  Foundation                          0x00007fff25712ee3 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 325
  13  signer                              0x0000000108373f2d -[RCTModuleData setBridgeForInstance] + 509
  14  signer                              0x0000000108373ab3 -[RCTModuleData setUpInstanceAndBridge] + 2131
  15  signer                              0x0000000108375427 __25-[RCTModuleData instance]_block_invoke + 39
  16  signer                              0x0000000108396083 RCTUnsafeExecuteOnMainQueueSync + 67
  17  signer                              0x0000000108375122 -[RCTModuleData instance] + 738
  18  signer                              0x00000001082b32d4 __49-[RCTCxxBridge _prepareModulesWithDispatchGroup:]_block_invoke + 196
  19  libdispatch.dylib                   0x000000010923fdd4 _dispatch_call_block_and_release + 12
  20  libdispatch.dylib                   0x0000000109240d48 _dispatch_client_callout + 8
  21  libdispatch.dylib                   0x000000010924eadb _dispatch_main_queue_callback_4CF + 721
  22  CoreFoundation                      0x00007fff23bd4049 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9
  23  CoreFoundation                      0x00007fff23bceca9 __CFRunLoopRun + 2329
  24  CoreFoundation                      0x00007fff23bce066 CFRunLoopRunSpecific + 438
25  GraphicsServices                    0x00007fff384c0bb0 GSEventRunModal + 65
  26  UIKitCore                           0x00007fff48092d4d UIApplicationMain + 1621
  27  signer                              0x00000001081dc8d0 main + 112
  28  libdyld.dylib                       0x00007fff5227ec25 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

同一个项目在 Android 上构建得很好,但 ios 会抛出此错误。 我在网上没有找到任何可以解决此类问题的内容。 任何帮助表示赞赏!

最佳答案

“线程 1:信号 SIGABRT”是 XCode 中的通用 fatal error ,基本上意味着应用程序已崩溃。这是堆栈跟踪上方的实际错误: 2019-12-23 11:43:39.046365+0200 signer[87746:1862730] *** 由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“-[RCTReconnectingWebSocket” initWithURL:queue:]: 无法识别的选择器发送到实例 0x600000149650'。我真的帮不上更多的忙,但你可能会更幸运地查一下这个。

关于ios - React-native Xcode 错误 : "Thread 1: signal SIGABRT",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59453162/

相关文章:

react-native - 从商店 redux 获取状态值

android - React Native Simulation无法启动

ios - uitableview insertRowAtIndexPath 将行加倍

ios - 从 iOS 应用程序 (Swift) 中的 S3 存储桶中删除文件

ios - 如何在不在 ViewController 类中时以编程方式更改 View Controller

ios - 我如何创建一个带有静态单元格的 UItableViewContoller 并将带有原型(prototype)单元格的 UITableView 插入其中一个静态单元格?

react-native - 在没有调试的情况下启动时 react native 错误

ios - iOS 8页面指示器样式

xcode - 我可以将在 Sketch 中完成的设计转移到 Xcode 的 Storyboard 中吗?

ios - Cocos2d 和 ios5 : ccTouchesBegan