Request Error: A network error occured

693 views
Skip to first unread message

Matthew Keable

unread,
Sep 17, 2014, 7:28:43 AM9/17/14
to google-adm...@googlegroups.com
I have a page in my iOS app that has 3 DFPBannerViews.

Recently I've been seeing that on most app launches some or all of the ads fail to display. The error thrown in the didFailToRecieveAdWithError: delegate method is "Request Error: A Network Error Occurred". However if I proxy the device using Fiddler I can see that all of the requests receive a response and the response contains some Javascript which then sends an additional request which returns the correct ad content. Even in situations where all 3 ads have failed to load, I can still see the 3 ads being downloaded to the device. I've tested this using the 6.8.0 and the 6.11.1 SDKs and I'm seeing the same behaviour. Am I hitting some form of timeout on the ad or is there something else that I should check first?

Thanks.

Eric Leichtenschlag

unread,
Sep 18, 2014, 9:59:20 PM9/18/14
to google-adm...@googlegroups.com
There is a timeout of 60s for the overall request, and either 5 or 10 seconds for each network if you're mediating. If that first request sends back some JSON, it might be a list of mediation networks to request ads from, and each mediation networks has either 5 or 10 seconds (don't remember which) to fetch an ad before the SDK moves onto the next network. I'd only expect to see a network error be the error reason if the 60s timer went up. Even if every network hit the 5s timer but the 60s timer wasn't up, the SDK would return no fill for the overall response instead of network error.

Would any of these timeouts be relevant to you? Or could proxying be the reason you hit the 60s limit?

Thanks,
Eric

Matthew Keable

unread,
Sep 19, 2014, 5:12:55 AM9/19/14
to google-adm...@googlegroups.com
Hi Eric,

Thanks for responding.

We aren't performing any mediation, just trying to display house ads at the moment. I see the same issue whether I'm proxying or not, the "Network Error" message appears in the console almost as soon as the view has finished loading, less than 5 seconds and definitely a lot less than 60 seconds.

Matthew.

Eric Leichtenschlag

unread,
Sep 19, 2014, 5:03:59 PM9/19/14
to google-adm...@googlegroups.com
Hi Matt,

If you aren't mediating, then you should get the full 60s unless you don't have internet or something else network related goes wrong, such as the SDK failing to load a JavaScript file it uses to make the ad requests. Any chance you could share your sample app or proxying results?

Thanks,
Eric

Matthew Keable

unread,
Sep 22, 2014, 9:04:25 AM9/22/14
to google-adm...@googlegroups.com
Thank you for your response.

I've found the problem, the method that ultimately created the banner views and called loadRequest was running in an autoreleasepool, switching this to work on the main thread seems to have solved the problem. Sorry for troubling you.

Matthew.


On Friday, September 19, 2014 10:03:59 PM UTC+1, Eric Leichtenschlag wrote:
Hi Matt,

If you aren't mediating, then you should get the full 60s unless you don't have internet or something else network related goes wrong, such as the SDK failing to load a JavaScript file it uses to make the ad requests. Any chance you could share your sample app or proxying results?

Thanks,
Eric

On Friday, September 19, 2014 2:12:55 AM UTC-7, Matthew Keable wrote:
Hi Eric,

Thanks for responding.

We aren't performing any mediation, just trying to display house ads at the moment. I see the same issue whether I'm proxying or not, the "Network Error" message appears in the console almost as soon as the view has finished loading, less than 5 seconds and definitely a lot less than 60 seconds.

Matthew Keable

unread,
Oct 7, 2014, 10:12:52 AM10/7/14
to google-adm...@googlegroups.com
So after a long period of investigation it turns out that the threading wasn't the culprit.

So far I've narrowed the problem down to our Interstitial ads that also run in the app. The interstitial launches after our load process, and once it closes we send the user to the screen that contains the 3 Banner ads. If the interstitial receives an ad (whether it displays it or not), then it is likely that at least one of the banner ads will fail to load. Usually 2 or 3 of them fail, but very occasionally all 3 load correctly. If that interstitial gets a didfailtorecievead notification then all 3 Banner ads work fine.

The problem only manifests on iOS 7, iOS 8 devices do not show the error.

The problem has been present in SDK versions 6.8.0, 6.11.1 and 6.12.0.

I have pulled the app apart trying different ways to delay the load of the page containing the banner ads until I know that the Interstitial object has been cleared from memory, making sure that all pointers to it are set to nil so that ARC will clean it up, yet the problem still persists.

Eric Leichtenschlag

unread,
Oct 7, 2014, 7:12:03 PM10/7/14
to google-adm...@googlegroups.com
I couldn't reproduce with this sample.
BannerExample3Ads.zip

Matthew Keable

unread,
Oct 8, 2014, 5:47:09 AM10/8/14
to google-adm...@googlegroups.com
Thanks for taking a look, I really appreciate it. I'll take a look at your sample app and see if I can produce a sample app of my own that reproduces it.
Reply all
Reply to author
Forward
0 new messages