gpt4 book ai didi

ios - 撤销 token 后 Google SignIn 崩溃

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:04:11 25 4
gpt4 key购买 nike

我正在使用 Google 驱动器来允许服务器访问我的驱动器。我使用 SignIn 为传递给它的服务器获取 token ,以便它可以访问驱动器。

我可以正常登录该应用程序,它请求相应的云端硬盘权限。

问题是当我撤销我之前授予使用登录权限的应用程序访问云端硬盘时崩溃。

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

知道是什么导致了这种情况发生。我找不到解决方案。由于 pod 将代码作为框架分发,因此我无法轻松使用该代码。

我使用的是 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

最佳答案

好的,万一有人遇到这个你必须在主线程上登录

dispatch_async(dispatch_get_main_queue(), ^{ 

[self.signIn signIn];
});

可能会节省一些时间 :)

关于ios - 撤销 token 后 Google SignIn 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39211977/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com