Comments (8)
I should also note that the auth prior to this works fine.
Original comment by [email protected]
on 20 Sep 2013 at 9:07
from google-api-objectivec-client.
Is the query being executed on the main thread?
Is authentication being done with the same scopes as previously?
Are any exceptions firing?
Original comment by [email protected]
on 20 Sep 2013 at 7:55
from google-api-objectivec-client.
Yes - using
[[NSOperationQueue mainQueue] addOperationWithBlock:^ {
_uploadFileTicket = [service executeQuery:query
completionHandler:^(GTLServiceTicket *ticket,
GTLYouTubeVideo *uploadedVideo,
NSError *error) {
//Carry on
Is this the right way to go about it? I'm not fully confident with operation
queues, but could there be anything potentially blocking the operation queue?
How would I go about checking this?
I've taken the other authentications out and still the same error. Auth done
using
NSString *clientID = @"myClientID";
NSString *clientSecret = @"mySecret";
GTMOAuth2Authentication *auth =
[GTMOAuth2ViewControllerTouch authForGoogleFromKeychainForName:kKeychainItemName
clientID:clientID
clientSecret:clientSecret];
self.youTubeService.authorizer = auth;
SEL finishedSel = @selector(viewController:finishedWithAuth:error:);
GTMOAuth2ViewControllerTouch *viewController;
viewController = [GTMOAuth2ViewControllerTouch controllerWithScope:kGTLAuthScopeYouTube
clientID:clientID
clientSecret:clientSecret
keychainItemName:kKeychainItemName
delegate:self
finishedSelector:finishedSel];
[self presentViewController:viewController animated:NO completion:nil];
// [[self navigationController]pushViewController:viewController animated:YES];
Nope no exceptions firing that I can see - where could I go and further
investigate this? Where would I put my breakpoints/NSLogs?
I've put a log message in GTLYoutubeQuery.m's file, and this method is getting
called
+
(id)queryForVideosInsertWithObject:(GTLYouTubeVideo *)object
part:(NSString *)part
uploadParameters:(GTLUploadParameters *)uploadParametersOrNil {
And the error check for a nil object is being passed, so the query is fine, its
just not being executed.
Original comment by [email protected]
on 20 Sep 2013 at 8:04
from google-api-objectivec-client.
In the Breakpoints pane of Xcode, click the + in the lower left to add an
exception breakpoint.
Is anything showing up in the http log?
https://code.google.com/p/gtm-http-fetcher/wiki/GTMHTTPFetcherIntroduction#HTTP_
Logging
Original comment by [email protected]
on 20 Sep 2013 at 8:17
from google-api-objectivec-client.
When i try to enable logging using [GTMHTTPFetcher setLoggingEnabled I get
+[GTMHTTPFetcher setLoggingEnabled:]: unrecognized selector sent to class
0x40e538.
No exceptions in the code prior to this.
Original comment by [email protected]
on 20 Sep 2013 at 9:09
from google-api-objectivec-client.
Is GTMHTTPFetcherLogging.h/m in the project target?
Original comment by [email protected]
on 20 Sep 2013 at 9:17
from google-api-objectivec-client.
Ugh.. turns out I didnt have GTMHTTPFetcherLogging.m/GTMHTTPUploadFetcher.m in
my project target, thought i had these covered elsewhere. Thats so annoying.
Thanks so much for your help, I've been stuck on this for far too long.
Thankyou so much.
Original comment by [email protected]
on 20 Sep 2013 at 9:33
from google-api-objectivec-client.
Hello,
I'm here to report that I also have the same issue. I have authentication set
up, and I'm trying to the description associated with a YouTube video. It
worked, and then one day it just stopped in August/early September. This
functionality was not critical to the application and was dropped, believing it
was an issue with Google's API, but now the feature does need to be implemented.
My problem is the same as the OP. There are no differences code-wise.
Here's the section of my code where I create the query:
dispatch_async(dispatch_get_main_queue(), ^(void) {
[self setUpPlaybackOfAsset:asset withKeys:assetKeysToLoadAndTest];
GTLQueryYouTube *query = [GTLQueryYouTube queryForVideosListWithPart:@"snippet"];
[query setIdentifier:[HCYoutubeParser youtubeIDFromYoutubeURL:_videoURL]]; // Hard code for now.
__block NSString *result = @"";
GTLServiceYouTube *service = self.youTubeService;
NSLog(@"Preparing to fetch video description. %@", service);
if (service) {
[service executeQuery:query completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) {
if (!error) {
GTLYouTubeVideoListResponse *response = (GTLYouTubeVideoListResponse *)object;
if (response[0]) {
GTLYouTubeVideo *video = response[0]; // Since we specified the ID of the video we want, there's only one entry in the array. Otherwise, we'd have to iterate through (i.e if we want to search).
NSLog(@"Got description: %@", result);
result = video.snippet.descriptionProperty;
[self.videoDescriptionTextField setString:result];
} else {
[self.videoDescriptionTextField setString:@"Failed to get video description."];
}
} else {
NSLog(@"An error occurred: %@", error);
}
}];
} else {
NSLog(@"Can't get YouTube service object.");
}
});
No log statements fire except for the initial one, where it says "Preparing to
fetch video description".
Here's how the YouTube service object is constructed:
- (GTLServiceYouTube *)youTubeService {
static GTLServiceYouTube *service;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
service = [[GTLServiceYouTube alloc] init];
// Have the service object set tickets to fetch consecutive pages
// of the feed so we do not need to manually fetch them.
service.shouldFetchNextPages = YES;
// Have the service object set tickets to retry temporary error conditions
// automatically.
service.retryEnabled = YES;
});
return service;
}
I set breakpoints as you suggested in #4, and coupled a log statement to fire
when an exception occurs. After the previously mentioned log statement, I get
22 exceptions:
2013-10-26 13:15:04.742 Youtube App[46771:303] Preparing to fetch video
description. <GTLServiceYouTube: 0x608000151460>
Exception: hit at All Exceptions. This has occurred 11 times.
.....
Exception: hit at All Exceptions. This has occurred 33 times.
Additionally, I set GTMHTTPFetcher to fire with the following code:
[GTMHTTPFetcher setLoggingEnabled:YES];
[GTMHTTPFetcher setLoggingToFileEnabled:YES];
[GTMHTTPFetcher setLoggingDirectory:NSHomeDirectory()];
Because my application is designed for the Mac App Store, it is sandboxed, and
the proper permissions are set to allow outgoing network access. This was set
before the query stopped executing, so I'm guessing that this is not the case.
I'd love to know if you have any suggestions or advice.
Original comment by [email protected]
on 26 Oct 2013 at 5:29
from google-api-objectivec-client.
Related Issues (20)
- Architectures for target GTLTouchStaticLib should be changed to "Standard architectures (armv7, armv7s, arm64)"
- Unable to "modify" messages/threads using Gmail API HOT 2
- App rejected from App Store: "The app opens a web page in mobile Safari for logging in, then returns the user to the app. The user should be able log in without opening Safari first." HOT 1
- Underlining Connection Timeout(s) and RPC nature of calls HOT 1
- Upload a new file in a trashed folder in Google Drive, the new file should also have trashed attribute(but not) HOT 1
- Cookie Security Concern HOT 4
- GTLService Error returns error in half German - half English HOT 2
- Google Drive Permission Insert Query missing optionals HOT 2
- GTUtilities won't compile on OS X 10.01 HOT 1
- Google Drive's example refers to .xib outside of SVN project HOT 2
- DriveExample won't build on 10.10 HOT 1
- Feature Request: Implement NSURLSession for file Uploads/Downloads (iOS7+) HOT 1
- i can't purchase on my iPhone HOT 3
- Cocoapods support HOT 1
- Where is the Swift version of this!? HOT 3
- Patch for /trunk/Examples/CalendarSample/CalendarSampleAppController.h HOT 1
- [CocoaPods] Duplicate errors with gtm-http-fetcher and GTMHTTPFetcher used at the same time HOT 1
- google-api-objectivec-client + gtm-http-fetcher Duplicate interface definition for class GTMHTTPUploadFetcher
- unexpected behavior of GTLQuery as <GTLQueryProtocol> because of typecasting
- When upload large file to Google Drive, upload progress goes backward HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-api-objectivec-client.