Received an unexpected EOF or 0 bytes from the transport stream

1,891 views
Skip to first unread message

vidya...@gmail.com

unread,
May 5, 2009, 1:27:41 PM5/5/09
to AdWords API Forum
Hi,

We just migrated to use v13 of the Adwords APIs for .Net. While
downloading the report file from the url provided by google for the
keyword performance for various accounts and for various start and end
dates, I encountered the following error:

Type: System.IO.IOException
Message: Received an unexpected EOF or 0 bytes from the transport
stream.
Source: System
StackTrace: at System.Net.ConnectStream.Read(Byte[] buffer, Int32
offset, Int32 size)

I tried using WebClient.DownloadFile() as well as
HttpWebResponse.GetResponseStream() by setting the timeout to 10
minutes. Even then, sometimes, the process fails with the above
exception. It does not occur all the time though.

Any ideas why this could be happening? Any pointers will be useful.

Thanks,
Vidya

AdWords API Advisor

unread,
May 5, 2009, 5:03:29 PM5/5/09
to AdWords API Forum
Hello Vidya,

There have been reports of users downloading empty reports or 20 byte
empty gzip files:

http://groups.google.com/group/adwords-api/browse_thread/thread/8e0b8da8d7f51848
http://groups.google.com/group/adwords-api/browse_thread/thread/3729f0b4a10e131d

But that sounds a little different from what you're reporting, since
it sounds like .NET isn't even registering the HTTP response headers
from the AdWords API servers. Some of the suggestions about retrying
requests do apply. Unfortunately, the engineering team doesn't have a
resolution to those original issues.

Can you log the URL for the reports that your code attempts to
download, and then (within a few minutes of getting the URL) attempt
to access the same URLs from a web browser? I'm curious to see whether
there's a fundamental issue with the URL you're getting back or
whether the URL is valid but .NET is having issues retrieving it.

Cheers,
-Jeff Posnick, AdWords API Team


On May 5, 1:27 pm, "vidya.p...@gmail.com" <vidya.p...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages