manicoder / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

YouTube search crashes with Exception in google-gdata 2.0 #585

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install google-data API Setup (2.0) MSI
2. Open up "YouTube ASP.NET Sample" in Visual Studio
3. Attempt to browse SearchVideo.aspx

What is the expected output? 
Web page load in browser

What do you see instead?
Exception was thrown
Server Error in '/YouTubeSample' Application.
-----------------------------------------------------------------------

/feeds/api/standardfeeds/top_rated 

Cause of problem?
Open YoutubeService.cs
Go to OnNewFeed() line 306
Comment out the following lines
>>
                if (!Regex.IsMatch(path, @"/feeds/api/playlists/([\w-]+)")
                    && !Regex.IsMatch(path, @"/feeds/api/seasons/([\w-]+)/episodes")
                    )
                {
                    throw new Exception(path);
                }
>>>

Original issue reported on code.google.com by Mike.Lim...@gmail.com on 25 Apr 2012 at 4:20

Attachments:

GoogleCodeExporter commented 9 years ago
Can you please install Fiddler to capture the HTTP request and response and 
share it with us?
The server exception should contain a descriptive error message that will be 
useful to understand the issue.

Original comment by ccherub...@google.com on 25 Apr 2012 at 4:35

GoogleCodeExporter commented 9 years ago
Sure..
URL called is 
https://gdata.youtube.com/feeds/api/standardfeeds/top_rated?time=all_time&orderb
y=relevance
Fiddler XML attached.

IMHO, the HTTP request and response is working fine; a valid YouTubeFeed is 
returned.
Everything works once I commented out the exception code.

Hope this helps

Original comment by Mike.Lim...@gmail.com on 25 Apr 2012 at 9:15

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the log and the screenshots, Mike.
That code has been recently added and I agree it looks wrong. I'll perform some 
more tests tomorrow and I'll commit a patch to address this issue.

Original comment by ccherub...@google.com on 26 Apr 2012 at 3:25

GoogleCodeExporter commented 9 years ago
I removed the exception throwing code in rev. 1180:

http://code.google.com/p/google-gdata/source/detail?r=1180

Thanks again for reporting the bug and for the fix.

Original comment by ccherub...@google.com on 26 Apr 2012 at 4:12

GoogleCodeExporter commented 9 years ago
Version 2.0.1 of the library has been released yesterday to include the fix for 
this issue

Original comment by ccherub...@google.com on 1 May 2012 at 4:08