Coder Social home page Coder Social logo

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.