Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native FBSDK unrecognized selector sent to instance

I am trying to get the react-native FBSDK working. Ironically the same code without any changes worked previously (I even have a screen-recording of the login working) but since restarting xcode and the simulator, I am receiving this crash on app start.

I double checked to make sure I followed the installation steps correctly. I also switched the manually downloaded version with the cocoapods one but same error

2016-12-29 16:13:46.067 myapp[13521:2804102] Falling back to loading access token from NSUserDefaults because of simulator bug
2016-12-29 16:13:46.067 myapp[13521:2804102] -[NSConcreteMutableData isEqualToString:]: unrecognized selector sent to instance 0x610000050bc0
2016-12-29 16:13:46.076 myapp[13521:2804102] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConcreteMutableData isEqualToString:]: unrecognized selector sent to instance 0x610000050bc0'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000105915d4b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x000000010479921e objc_exception_throw + 48
    2   CoreFoundation                      0x0000000105985f04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
    3   CoreFoundation                      0x000000010589b005 ___forwarding___ + 1013
    4   CoreFoundation                      0x000000010589ab88 _CF_forwarding_prep_0 + 120
    5   FBSDKCoreKit                        0x0000000103f9db1a -[FBSDKAccessTokenCacheV4 fetchAccessToken] + 202
    6   FBSDKCoreKit                        0x0000000103f9c0ec -[FBSDKAccessTokenCache fetchAccessToken] + 92
    7   FBSDKCoreKit                        0x0000000103faaded -[FBSDKApplicationDelegate application:didFinishLaunchingWithOptions:] + 125
    8   songchat                            0x0000000103b8c852 -[AppDelegate application:didFinishLaunchingWithOptions:] + 130
    9   UIKit                               0x0000000107ea13c2 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 290
    10  UIKit                               0x0000000107ea2d47 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4236
    11  UIKit                               0x0000000107ea90ed -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731
    12  UIKit                               0x0000000107ea626d -[UIApplication workspaceDidEndTransaction:] + 188
    13  FrontBoardServices                  0x000000010b56f6cb __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
    14  FrontBoardServices                  0x000000010b56f544 -[FBSSerialQueue _performNext] + 189
    15  FrontBoardServices                  0x000000010b56f8cd -[FBSSerialQueue _performNextFromRunLoopSource] + 45
    16  CoreFoundation                      0x00000001058ba761 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    17  CoreFoundation                      0x000000010589f98c __CFRunLoopDoSources0 + 556
    18  CoreFoundation                      0x000000010589ee76 __CFRunLoopRun + 918
    19  CoreFoundation                      0x000000010589e884 CFRunLoopRunSpecific + 420
    20  UIKit                               0x0000000107ea4aea -[UIApplication _run] + 434
    21  UIKit                               0x0000000107eaac68 UIApplicationMain + 159
    22  songchat                            0x0000000103b8ce8f main + 111
    23  libdyld.dylib                       0x0000000109e0f68d start + 1
    24  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
like image 930
patchrail Avatar asked Jun 05 '26 18:06

patchrail


1 Answers

For me, because I was using cocoapods for linking, removing the manual links solved the issue.

That is, go to Xcode > Project Root > Build Phases > Link Binary with Libraries and remove Facebook Core/Login etc.

like image 172
Aaron Avatar answered Jun 07 '26 09:06

Aaron