Comments (7)
Please use the library's http logging feature to provide a log of the request
and response that led to the assertion, as well as the full description of the
assertion.
https://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Logging
_HTTP_Server_Traffic
Original comment by [email protected]
on 27 Apr 2013 at 10:14
from google-api-objectivec-client.
Here it is.
2013-04-28 16:53:57.618 YouTubeForKids[90712:cc0b] *** Assertion failure in
-[GTLService parseObjectFromDataOfFetcher:](),
/Users/tkormann/Documents/Wheepix/Projects/google-api-objectivec-client-read-onl
y/Source/Objects/GTLService.m:1145
Hope it helps.
Best Regards.
Original comment by [email protected]
on 28 Apr 2013 at 3:08
Attachments:
from google-api-objectivec-client.
It looks like the request has an invalid "fields" value. Try omitting that
property.
Original comment by [email protected]
on 29 Apr 2013 at 11:20
from google-api-objectivec-client.
Hi,
Thank for your answer. Indeed, not setting the "fields" property to my
GTLQueryYouTube fixes the assertion but now, as you know, in terms of data
transfer it's far from optimal.
Frankly, I still think there is an issue because given a bunch of video ids, I
have no way to know whether or not I should avoid (or not) the "fields"
property. In other words, there is no way to do a minimal query for a given set
of video ids if you are not sure all of them still exist at a given point in
time.
In fact, in my case, it would have even been more efficient to add a "fake"
videoId to my list just to be sure to get something, rather than transferring
all fields for all videos each time.
What do you recommend ?
Thanks.
Original comment by [email protected]
on 30 Apr 2013 at 6:31
from google-api-objectivec-client.
The fields parameter is safe, as far as I'm aware. But it can be tricky. Your
query had an invalid value for fields; try building the fields parameter up
slowly to get the desired response.
I usually add fields only as a final optimization once my app's queries are
working properly.
Original comment by [email protected]
on 1 May 2013 at 12:54
- Changed state: Invalid
from google-api-objectivec-client.
Your answer makes me think I might not have been clear in my explanation. My
query works perfectly fine. All the fields are valid. If I perform my query
against a set of video ids that DO exist (not banned), everything works like a
charm.
It's only when I am running the query against a set of video ids and ALL of
them have been banned from YouTube, that I get the assertion failure.
For instance, running the query against 2 video ids, one that exists and one
that has been banned, it works. But if for some reason, I only have banned
videos in the query, I got the failure. This is why I do think there is an
issue.
So, the "fields" property can not be safely used except if you are absolutely
sure that at least one of the video id you specify using
"queryForVideosListWithIdentifier" has not been banned from YouTube.
Here is a code snippet:
NSString *videoIds = @"hK8lUKt35vM"; // OK
NSString *videoIds = @"j7V_8QpnafA"; // KO video banned
NSString *videoIds = @"hK8lUKt35vM, j7V_8QpnafA"; // OK one video not banned
NSString *videoIds = @"j7V_8QpnafA, ylUWojqQRp0"; // KO both videos are banned
GTLQueryYouTube *gtlQuery = [GTLQueryYouTube
queryForVideosListWithIdentifier:videoIds part:@"id,snippet,contentDetails"];
gtlQuery.fields =
@"items(id,snippet/title,snippet/thumbnails/medium,contentDetails/duration)";
[service executeQuery:gtlQuery completionHandler:^(GTLServiceTicket *ticket,
GTLYouTubeVideoListResponse *response,
NSError *error) { }];
Original comment by [email protected]
on 1 May 2013 at 6:44
from google-api-objectivec-client.
The GTLService.m class does not currently have an assertion on line 1145, so
I'm not certain what assert your code is hitting.
https://code.google.com/p/google-api-objectivec-client/source/browse/trunk/Sourc
e/Objects/GTLService.m#1145
Original comment by [email protected]
on 13 May 2013 at 11:42
from google-api-objectivec-client.
Related Issues (20)
- 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 2
- google-api-objectivec-client + gtm-http-fetcher Duplicate interface definition for class GTMHTTPUploadFetcher HOT 1
- unexpected behavior of GTLQuery as <GTLQueryProtocol> because of typecasting
- When upload large file to Google Drive, upload progress goes backward HOT 3
- Source code shown in browser and got by checkout is different a lot
- Google Cloud Storage sample HOT 1
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.