Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash: OIDURLQueryComponent.m line 117 #88

Open
andy61i opened this issue Sep 18, 2019 · 1 comment
Open

Crash: OIDURLQueryComponent.m line 117 #88

andy61i opened this issue Sep 18, 2019 · 1 comment

Comments

@andy61i
Copy link

andy61i commented Sep 18, 2019

Happens for some users on iOS 12 and 13.

Here is a log from Fabric:

Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x1f043298c __exceptionPreprocess
1 libobjc.A.dylib 0x1ef60b9f8 objc_exception_throw
2 CoreFoundation 0x1f03ac3f8 _CFArgv
3 CoreFoundation 0x1f031d0cc -[__NSArrayM insertObject:atIndex:]
4 Safe In Cloud.Free 0x100c86314 -[OIDURLQueryComponent addParameter:value:] + 117 (OIDURLQueryComponent.m:117)
5 Safe In Cloud.Free 0x100c8495c -[OIDTokenRequest URLRequest] + 297 (OIDTokenRequest.m:297)
6 Safe In Cloud.Free 0x100c77b80 +[OIDAuthorizationService performTokenRequest:originalAuthorizationResponse:callback:] + 433 (OIDAuthorizationService.m:433)
7 Safe In Cloud.Free 0x100c7b004 -[OIDAuthState performActionWithFreshTokens:additionalRefreshParameters:dispatchQueue:] + 513 (OIDAuthState.m:513)
8 Safe In Cloud.Free 0x100c7ad6c -[OIDAuthState performActionWithFreshTokens:additionalRefreshParameters:] + 465 (OIDAuthState.m:465)
9 Safe In Cloud.Free 0x100c87fb8 -[GTMAppAuthFetcherAuthorization authorizeRequestArgs:] + 235 (GTMAppAuthFetcherAuthorization.m:235)
10 Safe In Cloud.Free 0x100c888f4 -[GTMAppAuthFetcherAuthorization authorizeRequest:delegate:didFinishSelector:] + 370 (GTMAppAuthFetcherAuthorization.m:370)
11 Safe In Cloud.Free 0x100c931d8 -[GTMSessionFetcher authorizeRequest] + 1600 (GTMSessionFetcher.m:1600)
12 Safe In Cloud.Free 0x100c8fadc -[GTMSessionFetcher beginFetchMayDelay:mayAuthorize:] + 751 (GTMSessionFetcher.m:751)
13 Safe In Cloud.Free 0x100cb7518 -[GTLRService fetchObjectWithURL:objectClass:bodyObject:dataToPost:ETag:httpMethod:mayAuthorize:completionHandler:executingQuery:ticket:] + 867 (GTLRService.m:867)
14 Safe In Cloud.Free 0x100cb8c34 -[GTLRService fetchObjectWithURL:objectClass:bodyObject:ETag:httpMethod:mayAuthorize:completionHandler:executingQuery:ticket:] + 1127 (GTLRService.m:1127)
15 Safe In Cloud.Free 0x100cbcda4 -[GTLRService executeQuery:completionHandler:] + 2248 (GTLRService.m:2248)
16 Safe In Cloud.Free 0x100c2851c __24-[GDriveDriver userInfo]_block_invoke + 132 (GDriveDriver.m:132)

The calling code:

NSError* error = nil;
GTLRDriveQuery_AboutGet *query = [GTLRDriveQuery_AboutGet query];
query.fields = @"kind,user(kind,displayName,emailAddress,photoLink)";
[self.service executeQuery:query completionHandler:^(GTLRServiceTicket *ticket, id about, NSError *error) {...}];

Pod file:

pod 'GoogleAPIClientForREST'
pod 'GoogleAPIClientForREST/Drive'
pod 'GoogleAPIClientForREST/Oauth2'
pod 'GTMAppAuth'
pod 'AppAuth'

Pod.lock:

  • AppAuth (1.2.0):
    • AppAuth/Core (= 1.2.0)
    • AppAuth/ExternalUserAgent (= 1.2.0)
  • AppAuth/Core (1.2.0)
  • AppAuth/ExternalUserAgent (1.2.0)
  • GoogleAnalytics (3.17.0)
  • GoogleAPIClientForREST (1.3.10):
    • GoogleAPIClientForREST/Core (= 1.3.10)
    • GTMSessionFetcher (>= 1.1.7)
  • GoogleAPIClientForREST/Core (1.3.10):
    • GTMSessionFetcher (>= 1.1.7)
  • GoogleAPIClientForREST/Drive (1.3.10):
    • GoogleAPIClientForREST/Core
    • GTMSessionFetcher (>= 1.1.7)
  • GoogleAPIClientForREST/Oauth2 (1.3.10):
    • GoogleAPIClientForREST/Core
    • GTMSessionFetcher (>= 1.1.7)
  • GTMAppAuth (1.0.0):
    • AppAuth/Core (~> 1.0)
    • GTMSessionFetcher (~> 1.1)
  • GTMSessionFetcher (1.2.2):
    • GTMSessionFetcher/Full (= 1.2.2)
  • GTMSessionFetcher/Core (1.2.2)
  • GTMSessionFetcher/Full (1.2.2):
    • GTMSessionFetcher/Core (= 1.2.2)
@andy61i
Copy link
Author

andy61i commented Sep 18, 2019

The problem can be reproduced if self.service.authorizer is not properly initialized.

@Property (nonatomic) GTLRDriveService* service;
...
NSError* error = nil;
GTLRDriveQuery_AboutGet *query = [GTLRDriveQuery_AboutGet query];
query.fields = @"kind,user(kind,displayName,emailAddress,photoLink)";
[self.service executeQuery:query completionHandler:^(GTLRServiceTicket *ticket, id about, NSError *error) {...}];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant