2016-08-29 7 views
2

Googleドライブを使用してサーバーからドライブにアクセスできるようにしています。 SignInを使用してサーバーに渡すトークンを取得し、ドライブにアクセスできるようにします。トークンが取り消された後Google SignInがクラッシュする

私はアプリにサインインできます。ドライブに適切な権限が必要です。

問題は、以前にSignInクラッシュを使用する権限を与えたアプリのドライブへのアクセスを取り消すときです。

*** -[GSDK_GTMSessionFetcherService fetcherWithRequest:]: message sent to deallocated instance 0x7ff2706c8440 

これは何が起こっているか考えてください。私は解決策を見つけることができません。このコードは、ポッドがフレームワークとしてコードを配布するため、私には簡単に利用できません。私はここで

GoogleSignIn 4.0.0を使用してい

クラッシュ時のスタックトレースです。

2016-08-30 12:28:10.485 MyAPP [68739:3873962] CRASH: -[__NSCFType fetcherWithRequest:]: unrecognized selector sent to instance 0x7fcb28475580 
2016-08-30 12:28:10.486 MyAPP [68739:3873962] Stack Trace: (
    0 CoreFoundation      0x0000000107fe3d85 __exceptionPreprocess + 165 
    1 libobjc.A.dylib      0x0000000107615deb objc_exception_throw + 48 
    2 CoreFoundation      0x0000000107fecd3d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205 
    3 CoreFoundation      0x0000000107f32cfa ___forwarding___ + 970 
    4 CoreFoundation      0x0000000107f328a8 _CF_forwarding_prep_0 + 120 
    5 MyAPP        0x0000000101e89a9e -[GSDK_GTMOAuth2Authentication beginTokenFetchWithDelegate:didFinishSelector:] + 768 
    6 MyAPP        0x0000000101cc2307 +[GIDTokenFetchDelegate beginTokenFetchWithAuth:handler:] + 126 
    7 MyAPP        0x0000000101cbb15a -[GIDSignIn maybeFetchToken:fallback:] + 615 
    8 MyAPP        0x0000000101cba9dc -[GIDSignIn clearAndAuthenticateWithOptions:] + 343 
    9 MyAPP        0x0000000101cba791 -[GIDSignIn signInWithOptions:] + 548 
    10 MyAPP        0x0000000101cb7163 -[GIDSignIn signIn] + 64 
    11 MyAPP        0x00000001017b2a2a -[SendGoogleAuthOperation signInIfPossible] + 458 
    12 MyAPP        0x00000001017b2849 -[SendGoogleAuthOperation requestSignIn] + 169 
    13 MyAPP        0x00000001017b278d -[SendGoogleAuthOperation start] + 621 
    14 Foundation       0x0000000104034336 __NSOQSchedule_f + 194 
    15 libdispatch.dylib     0x00000001096093eb _dispatch_client_callout + 8 
    16 libdispatch.dylib     0x00000001095ef82c _dispatch_queue_drain + 2215 
    17 libdispatch.dylib     0x00000001095eed4d _dispatch_queue_invoke + 601 
    18 libdispatch.dylib     0x00000001095f1996 _dispatch_root_queue_drain + 1420 
    19 libdispatch.dylib     0x00000001095f1405 _dispatch_worker_thread3 + 111 
    20 libsystem_pthread.dylib    0x000000010995d4de _pthread_wqthread + 1129 
    21 libsystem_pthread.dylib    0x000000010995b341 start_wqthread + 13 
) 
2016-08-30 12:28:10.487 MyAPP [68739:3873962] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType fetcherWithRequest:]: unrecognized selector sent to instance 0x7fcb28475580' 
*** First throw call stack: 
(
    0 CoreFoundation      0x0000000107fe3d85 __exceptionPreprocess + 165 
    1 libobjc.A.dylib      0x0000000107615deb objc_exception_throw + 48 
    2 CoreFoundation      0x0000000107fecd3d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205 
    3 CoreFoundation      0x0000000107f32cfa ___forwarding___ + 970 
    4 CoreFoundation      0x0000000107f328a8 _CF_forwarding_prep_0 + 120 
    5 MyAPP        0x0000000101e89a9e -[GSDK_GTMOAuth2Authentication beginTokenFetchWithDelegate:didFinishSelector:] + 768 
    6 MyAPP        0x0000000101cc2307 +[GIDTokenFetchDelegate beginTokenFetchWithAuth:handler:] + 126 
    7 MyAPP        0x0000000101cbb15a -[GIDSignIn maybeFetchToken:fallback:] + 615 
    8 MyAPP        0x0000000101cba9dc -[GIDSignIn clearAndAuthenticateWithOptions:] + 343 
    9 MyAPP        0x0000000101cba791 -[GIDSignIn signInWithOptions:] + 548 
    10 MyAPP        0x0000000101cb7163 -[GIDSignIn signIn] + 64 
    11 MyAPP        0x00000001017b2a2a -[SendGoogleAuthOperation signInIfPossible] + 458 
    12 MyAPP        0x00000001017b2849 -[SendGoogleAuthOperation requestSignIn] + 169 
    13 MyAPP        0x00000001017b278d -[SendGoogleAuthOperation start] + 621 
    14 Foundation       0x0000000104034336 __NSOQSchedule_f + 194 
    15 libdispatch.dylib     0x00000001096093eb _dispatch_client_callout + 8 
    16 libdispatch.dylib     0x00000001095ef82c _dispatch_queue_drain + 2215 
    17 libdispatch.dylib     0x00000001095eed4d _dispatch_queue_invoke + 601 
    18 libdispatch.dylib     0x00000001095f1996 _dispatch_root_queue_drain + 1420 
    19 libdispatch.dylib     0x00000001095f1405 _dispatch_worker_thread3 + 111 
    20 libsystem_pthread.dylib    0x000000010995d4de _pthread_wqthread + 1129 
    21 libsystem_pthread.dylib    0x000000010995b341 start_wqthread + 13 
) 
libc++abi.dylib: terminating with uncaught exception of type NSException 
+0

を保存可能性があります誰もが、この動作を確認していませんか? – d0n13

答えて

1

[OK]を、誰もこれに遭遇した場合に、あなたはサインインしてメインスレッドで

dispatch_async(dispatch_get_main_queue(), ^{ 

    [self.signIn signIn]; 
}); 

を持っている自分自身にいくつかの時間:)

+0

リファレンスhttps://github.com/googlesamples/google-services/issues/108 – d0n13

関連する問題