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

Upload Execute Query hangs #45

Open
GoogleCodeExporter opened this issue Jun 10, 2015 · 2 comments
Open

Upload Execute Query hangs #45

GoogleCodeExporter opened this issue Jun 10, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Log into YouTube using iOS SDK and specific client ID/Secret
2. Upload video, works fine
3. Change app to use another client ID/Secret
4. attempt to upload video
5. executeQuery (queryForVideosInsertWithObject) just hangs and never calls 
completionHandler
6. log out, log back in, works fine

What is the expected output? What do you see instead?
- an error message 
- ideally when we check auth.canAuthorize it reports NO


What version of the product are you using? On what operating system?
 3.0 sdk for ios

Please provide any additional information below.

Now this is an extreme example. We've had users hit the same "hang" out in the 
field where the cid/secret are not changing on them. So, did their login expire 
or something else? They can always fix it by logging out and back in. 

We followed the example code for determining if someone is signed in, which is 
below. If there's something further we should check. I've looked at 
expirationDate and expiresIn and they are no help.

- (NSString *)signedInName {
    // Get the email address of the signed-in user
    GTMOAuth2Authentication *auth = [[self youTubeService] authorizer];
    BOOL isSignedIn = auth.canAuthorize;
    if (isSignedIn) {
        return auth.userEmail;
    } else {
        return nil;
    }
}


- (BOOL)loggedIn {
    return [self signedInName]!=nil;
}

Original issue reported on code.google.com by [email protected] on 5 Sep 2013 at 2:10

@GoogleCodeExporter
Copy link
Author

I don't understand how "Change app to use another client ID/Secret" happens in 
a running app.

If a completion handler isn't called, then either the query is being started on 
a background thread without a run loop spinning, or an exception fired. Check 
the console output or the debugger.

Also observe the kGTMOAuth2AccessTokenRefreshFailed notification, as that 
indicates when a user's authentication has been explicitly revoked (typically 
from the google.com/accounts page.)

Original comment by [email protected] on 5 Sep 2013 at 8:38

@GoogleCodeExporter
Copy link
Author

It was between runs of the app and I spent the longest time trying to figure 
out why uploading wasn't working anymore and accidentally stumbled on the log 
out/back in. It makes total sense that you can't use the same authorization 
with a new ID/Secret, but I thought it was odd that this was where it was 
getting stuck.

I'll check to see if there's an exception running. The code is always called in 
the same manner (same thread) so I don't see how that could be happening.

kGTMOAuth2AccessTokenRefreshFailed - good to know!  Thanks. 

Original comment by [email protected] on 5 Sep 2013 at 8:43

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

No branches or pull requests

1 participant