Interstitial loadAd() requests failing. Could a proxy server cause this?

190 views
Skip to first unread message

Zol Heyman

unread,
Jun 30, 2016, 6:14:24 PM6/30/16
to Google Mobile Ads SDK Developers
A few users can never succeed in getting an interstitial ad to load. I also noticed that these users are getting http response code 302 from all network requests to my server where my app is hosted. It does not affect any usage of features in my app except for the failed loadAd() requests.

Can you think of a reason why this is happening? I have almost 500 users per day using the app and only a few have his issue.

I wondered if they have their android device or maybe their router setup to always use a proxy server. If that were the case, would admob think the request was coming from an illegal server?

Thanks,
Zol Heyman

Vu Chau (Mobile Ads SDK Team)

unread,
Jul 1, 2016, 10:19:00 AM7/1/16
to Google Mobile Ads SDK Developers
Hi Zol,

I'm not sure what could be a reason for getting a 302 while the interstitial is being requested and/or loaded.  Perhaps, if you are using mediation, a specific ad network might have enabled a redirect.

You could try setting up a local server and turning redirect on.  Pass an ad request through it, and see if that works.
If you happen to run into this yourself, you could set up Charles and inspect the log.   

Vu Chau
Mobile Ads SDK Team

Zol Heyman

unread,
Jul 1, 2016, 1:14:38 PM7/1/16
to Google Mobile Ads SDK Developers
Sorry I wasn't clear enough. I'm not seeing 302's during the loadAd() request. The loadAd() requests are all failing for 2 users. But those same 2 users who fail the loadAd() always get 302's from my server when making requests to my app. I'm working with my hosting service (DreamHost) to see why I'm seeing 302's, no explanation as of yet.

Where AdMob might help is by explaining the possible reasons for the loadAd() request failing besides no ad in the inventory. That's not the failure reason because there are hundreds of requests during the same period that succeed. The ad unit just uses AdMob optimization without mediation or any eCPM floor.

I'm putting in code to capture the error code from the onAdFailedToLoad(), but since it's only 2 users that have the problem, I can't be sure when they will update their apps.

The remote ip addresses that fail for those 2 users: 66.87.114.55 and 66.87.132.168.

Vu Chau (Mobile Ads SDK Team)

unread,
Jul 1, 2016, 3:18:37 PM7/1/16
to Google Mobile Ads SDK Developers
Hi Zol,

There are two stages to loading an interstitial (applicable to other ads, as well): loading it [via loadAd()] and displaying it [via show()].  Having no ad in inventory would be a cause for issue occurring after the server has received the ad request.  However, loadAd() is used for sending the request to the server, so if anything is suspected of failing here, it's probably not pertaining to the ad server.

To debug this, we should probably focus on the stage the request leaves your app and arrives at the server.  To be sure, you can always count on isLoaded() to see whether your interstitial is ready/loaded.

Vu Chau
Mobile Ads SDK Team

Zol Heyman

unread,
Jul 1, 2016, 11:04:59 PM7/1/16
to Google Mobile Ads SDK Developers
This problem is restricted to the loadAd() request. Every loadAd() request for these 2 users results in the onAdFailedToLoad() being called in the AdListener. So no need to check isLoaded(), right? Or are you saying there might be an ad loaded even though the onAdFailedToLoad() is being called? If ad is really loaded, then onAdLoaded() would be called in the AdListener.

I will check on the onAdFailedToLoad error code in my next version update, but the fact that no other user's loadAd() is failing every single time, having no ad in the inventory is not the problem. Ads are being loaded from the inventory for them. There is something else going on with the loadAd() request from these 2 users that is causing the failure. The problem is how to find out what it is.

Are there logs that show the loadAd() requests? Requests from the user with source ip address 66.87.114.55 failed today (7/1) 11 times between 3:00 and 4:00 pm, 11 times between 4:00 and 5:00 pm, 6 times between 5:00 and 6:00 pm, and 3 times between 6:00 pm and 7:00 pm. All times are CDT timezone.

Vu Chau (Mobile Ads SDK Team)

unread,
Jul 6, 2016, 10:50:43 AM7/6/16
to Google Mobile Ads SDK Developers
Hi Zol,

That is correct. You should check onAdFailedToLoad() for any error code that is thrown.  Once you have gotten it, you can begin zeroing on the culprit.  However, if the load fails for only a few users out of thousands, I would say it tends to be an edge case (e.g. device-specific, throttled network, among others).

Vu Chau
Mobile Ads SDK Team

Zol Heyman

unread,
Jul 20, 2016, 7:38:32 PM7/20/16
to Google Mobile Ads SDK Developers
After publishing a new version, I found that some users are consistently getting NETWORK ERROR and INTERNAL ERROR in the onAdFailedToLoad().  I have lots of data about when it's happening if that would help.  Quite a few of them are from timezones outside the U.S.

I believe you're correct about it being an edge case, but If you have any theories about what's causing the ad loads to fail, I would love to know.

Thanks,
Zol

Vu Chau (Mobile Ads SDK Team)

unread,
Jul 21, 2016, 10:42:56 AM7/21/16
to Google Mobile Ads SDK Developers
Hi Zol,

I don't have any theories, but the two error codes you managed to retrieve seem to indicate fairly common error scenarios.  

If there is a pattern in the data that reflects which group of your users consistently receive a network error, then it becomes trivial to attempt to reach to the bottom of that (users might be behind a firewall that blocks most of the incoming ad response, or the connection is throttled).  The SDK doesn't have a way to get the ad response (useful in case of a network error, the response would come back corrupted) but if you also see a network error locally, see if you can get a Charles log.

Vu Chau
Mobile Ads SDK Team

Zol Heyman

unread,
Jul 21, 2016, 2:31:30 PM7/21/16
to Google Mobile Ads SDK Developers
The fact that they are common error scenarios doesn't mean much to me. They are the only errors (besides fill errors) that are reported.  What would be the UN-common error scenarios?

By locally I assume you mean from my android device. I don't get the error, but I can't truly test for that because I'm using test ads. Do they go through the same server requests and processing as real ads?

I can give you ip addresses and exact times of when the errors occur. Are there logs that might shed some more light on this?

Vu Chau (Mobile Ads SDK Team)

unread,
Jul 21, 2016, 5:19:33 PM7/21/16
to Google Mobile Ads SDK Developers
Hi Zol,

As said, if an error is client-side, such as a network error, it is a trivial problem to troubleshoot and resolve.  That would entirely be outside the scope of the SDK.  It is doing its best by detecting the error and failing gracefully.

I can't comment on the server-side of test ad versus live ad, but I'm inclined to think it is not an ad unit ID-related issue here.  Ultimately, if the error is with a specific user's setup and environment, we would need to be able to replicate that with steps, et al.

For now, I think we know for certain that the requests are made in the first place.  That rules out potential issues with the SDK.  Going forward, I think it'd make sense to connect you with the Product Support team.  You can use this form to get started.  They should be able to assess any anomalies in reporting.

Let us know if you have additional questions,

Vu Chau
Mobile Ads SDK Team

Reply all
Reply to author
Forward
0 new messages