SkygearIO / skygear-SDK-iOS

Skygear SDK for iOS
https://skygear.io
Other
10 stars 28 forks source link

Crash when using loginWithFacebookAccessToken #232

Closed limouren closed 6 years ago

limouren commented 6 years ago
  pod 'SKYKit', '1.6.0'
  pod 'SKYKit/Facebook', '1.6.0'

Got the following crash after calling [SKYAuthContainer-loginWithFacebookAccessToken:completionHandler:] in a swift app.

2018-08-10 14:39:06.451560+0800 myapp[26966:6028283] -[SKYAuthContainer performUserAuthOperation:completionHandler:]: unrecognized selector sent to instance 0x60000047b980
2018-08-10 14:39:06.462948+0800 myapp[26966:6028283] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SKYAuthContainer performUserAuthOperation:completionHandler:]: unrecognized selector sent to instance 0x60000047b980'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000114f861e6 __exceptionPreprocess + 294
    1   libobjc.A.dylib                     0x000000011406e031 objc_exception_throw + 48
    2   CoreFoundation                      0x0000000115007784 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
    3   CoreFoundation                      0x0000000114f08898 ___forwarding___ + 1432
    4   CoreFoundation                      0x0000000114f08278 _CF_forwarding_prep_0 + 120
    5   SKYKit                              0x0000000110d20635 -[SKYAuthContainer(Facebook) loginWithFacebookAccessToken:completionHandler:] + 309
    6   myapp                             0x000000010b607a81 _T07myapp19LoginWithFacebookOpV5startyyF + 497
    7   myapp                             0x000000010b105093 _T07myapp19LoginActionCreatorsV17loginWithFacebookyySb_s5Error_pSgtc10completion_tFZ + 115
    8   myapp                             0x000000010b08d352 _T07myapp21LandingViewControllerC17loginWithFacebookyyF + 178
    9   myapp                             0x000000010b08cdf3 _T07myapp21LandingViewControllerC26connectWithFacebookClickedyyFySo28FBSDKLoginManagerLoginResultCSg_s5Error_pSgtcfU_ + 291
    10  myapp                             0x000000010b08d15d _T07myapp21LandingViewControllerC26connectWithFacebookClickedyyFySo28FBSDKLoginManagerLoginResultCSg_s5Error_pSgtcfU_TA + 13
    11  myapp                             0x000000010b08d1e0 _T0So28FBSDKLoginManagerLoginResultCSgs5Error_pSgIegxx_ACSo7NSErrorCSgIeyByy_TR + 128
    12  FBSDKLoginKit                       0x000000010e8e949a -[FBSDKLoginManager invokeHandler:error:] + 266
    13  FBSDKLoginKit                       0x000000010e8e9063 -[FBSDKLoginManager completeAuthentication:expectChallenge:] + 1955
    14  FBSDKLoginKit                       0x000000010e8ec3c0 __78-[FBSDKLoginManager(Native) application:openURL:sourceApplication:annotation:]_block_invoke + 80
    15  FBSDKLoginKit                       0x000000010e8e3c0a -[FBSDKLoginURLCompleter completeLogIn:withHandler:] + 1130
    16  FBSDKLoginKit                       0x000000010e8ec2dc -[FBSDKLoginManager(Native) application:openURL:sourceApplication:annotation:] + 636
    17  FBSDKCoreKit                        0x000000010e7ebc79 __77-[FBSDKApplicationDelegate application:openURL:sourceApplication:annotation:]_block_invoke + 89
    18  UIKit                               0x0000000111f64ca2 -[UIPresentationController transitionDidFinish:] + 1346
    19  UIKit                               0x00000001121e9034 -[_UICurrentContextPresentationController transitionDidFinish:] + 44
    20  UIKit                               0x0000000111f68b12 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke.436 + 183
    21  UIKit                               0x0000000112b4c3b4 -[_UIViewControllerTransitionContext completeTransition:] + 102
    22  UIKit                               0x0000000111f61a8e -[UITransitionView notifyDidCompleteTransition:] + 251
    23  UIKit                               0x0000000111f61705 -[UITransitionView _didCompleteTransition:] + 1397
    24  UIKit                               0x0000000111f63d3c -[UITransitionView _transitionDidStop:finished:] + 104
    25  UIKit                               0x0000000111e87ea9 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 343
    26  UIKit                               0x0000000111e884ec -[UIViewAnimationState animationDidStop:finished:] + 293
    27  UIKit                               0x0000000111e885a0 -[UIViewAnimationState animationDidStop:finished:] + 473
    28  QuartzCore                          0x000000010fdd95e5 _ZN2CA5Layer23run_animation_callbacksEPv + 323
    29  libdispatch.dylib                   0x00000001163d17ec _dispatch_client_callout + 8
    30  libdispatch.dylib                   0x00000001163dc8cf _dispatch_main_queue_callback_4CF + 628
    31  CoreFoundation                      0x0000000114f48c99 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    32  CoreFoundation                      0x0000000114f0cea6 __CFRunLoopRun + 2342
    33  CoreFoundation                      0x0000000114f0c30b CFRunLoopRunSpecific + 635
    34  GraphicsServices                    0x0000000118acea73 GSEventRunModal + 62
    35  UIKit                               0x0000000111df3057 UIApplicationMain + 159
    36  myapp                             0x000000010ab27997 main + 55
    37  libdyld.dylib                       0x000000011644e955 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
limouren commented 6 years ago

Changing Podfile to be the following would fix this:

  pod 'SKYKit', :git => 'git@github.com:SkygearIO/skygear-SDK-iOS.git', :commit => 'd5ad040'
  pod 'SKYKit/Facebook', :git => 'git@github.com:SkygearIO/skygear-SDK-iOS.git', :commit => 'd5ad040'
ben181231 commented 6 years ago

Hopefully the coming v1.6.1 will fix this.