Getting blank DFPBannerView often

512 views
Skip to first unread message

MANIKANDAN K

unread,
Mar 26, 2016, 11:31:10 PM3/26/16
to Google Mobile Ads SDK Developers
Hi Team,

I want to implement DFP banners in our native iOS app. But, i am getting blank DFP banner very often eventhough the success delegate "adViewDidReceiveAd" gets called.

Attached the sample project for your reference(pls link Google Mobile ads framework before running it). In that, Go to next view controller by clicking on 'Next' button and come back to initial view controller. Try doing this multiple times and notice the blank banner showing up often.

Any quick help would be appreciated.


Regards
Mani
DFPBannerExample - Edited.zip

Vu Chau (Mobile Ads SDK Team)

unread,
Mar 27, 2016, 5:07:47 PM3/27/16
to Google Mobile Ads SDK Developers
Hi Mani,

When you were getting the "blank banners", which SDK version were you on, and is there a specific range of devices that were affected? 
I'm attempting to reproduce the issue using your code (I must have tried going back and forth between the viewcontrollers no less than 20 times), on v7.7.0, but I'm always getting back a banner each time.

I'm also seeing adViewDidReceiveAd getting called each time a banner is loaded.  So, if it's also called for you but you don't see any banner, then there must have been some issues presenting it onto the viewcontroller.  

Vu Chau
Mobile Ads SDK Team

MANIKANDAN K

unread,
Mar 27, 2016, 5:45:21 PM3/27/16
to Google Mobile Ads SDK Developers
Hi Vu Chau,

I was using v7.6.0 earlier. but now i downloaded the latest SDK v7.7.0 and verified, still getting blank banners often. I am able to reproduce it in both simulator and iphones.

Which adUnit are you trying with? Bcoz, i am not getting any blank banners with Google's sample AdUnit Id(/6499/example/banner). Getting blank banners often only when i use my network adUnitId. And also, "adViewDidReceiveAd" is getting called each time even when i see blank banners.

And I dont think its an issue with presenting it onto the view controller. The sample code attached is the google provided one and i am getting blank banners even with that, when i use my network adunit Id with custom targeting parameters.

Can you pls try with some network adunit id other than the sample one provided by Google?


Regards
Mani

Vu Chau (Mobile Ads SDK Team)

unread,
Mar 27, 2016, 7:50:44 PM3/27/16
to Google Mobile Ads SDK Developers
Hi Mani,

By "blank banners", do you mean a empty banner without any content, or no banner at all?  If this is a concern, you can definitely write up some logic, such as app events, to remove your GADBannerView and the allotted space from the viewcontroller.

I was testing with a few other ad unit IDs (incl. the sample one) and yours, and I was able to see banners returned for all scenarios.  By now I'm starting to suspect that your ad might be trying to serve some other ads whose sizes might be greater than the rectangle you allocated for your creative (this I can't say for sure, since geo-restriction might apply for us, so I might be seeing more eligible ads than you are).  And since the ad has already been fetched (adViewDidReceiveAd called), and the SDK can't render it on the screen, there is "nothing" visible.  
However, that is only a theory.  To validate this, I'd recommend using a tool such as Charles to proxy your network traffic.  From there, you can check for each ad request if there is a legitimate ad response from the server.

As you said, it shouldn't be an implementation problem, since you were seeing the issue with our sample code.  The root issue might be ad unit ID specific, but if adViewDidReceiveAd is called when absolutely nothing is returned from the server, then that might be a bug.  Since I haven't been able to reproduce the original issue, I'd recommend not allocating a definitive area for your ad, plus removing custom targeting.  This is to increase the rate at which we are confident there is always an ad returned for every request.  With those changes in place, do a couple more testing and let me know if you continue seeing the issue.

Vu Chau
Mobile Ads SDK Team

MANIKANDAN K

unread,
Mar 27, 2016, 9:05:01 PM3/27/16
to Google Mobile Ads SDK Developers


On Sunday, 27 March 2016 16:50:44 UTC-7, Vu Chau (Mobile Ads SDK Team) wrote:
Hi Mani,

By "blank banners", do you mean a empty banner without any content, or no banner at all?  If this is a concern, you can definitely write up some logic, such as app events, to remove your GADBannerView and the allotted space from the viewcontroller. [Mani] Yes. Its empty banner(white) without any content. Right now, i am allotting space for banner only in adViewDidReceiveAd callback. But in this case, blank banner is shown since "adViewDidReceiveAd" is called. Can you pls help me understand, how to avoid it using app events till we resolve this issue?

I was testing with a few other ad unit IDs (incl. the sample one) and yours, and I was able to see banners returned for all scenarios.  By now I'm starting to suspect that your ad might be trying to serve some other ads whose sizes might be greater than the rectangle you allocated for your creative (this I can't say for sure, since geo-restriction might apply for us, so I might be seeing more eligible ads than you are).  And since the ad has already been fetched (adViewDidReceiveAd called), and the SDK can't render it on the screen, there is "nothing" visible.  
However, that is only a theory.  To validate this, I'd recommend using a tool such as Charles to proxy your network traffic.  From there, you can check for each ad request if there is a legitimate ad response from the server. [Mani] I don't think its a size issue. In that case, you also shouldn't see the banner. I will validate the request/response using Charles Proxy and will let you know.

As you said, it shouldn't be an implementation problem, since you were seeing the issue with our sample code.  The root issue might be ad unit ID specific, but if adViewDidReceiveAd is called when absolutely nothing is returned from the server, then that might be a bug.  Since I haven't been able to reproduce the original issue, I'd recommend not allocating a definitive area for your ad, plus removing custom targeting.  This is to increase the rate at which we are confident there is always an ad returned for every request.  With those changes in place, do a couple more testing and let me know if you continue seeing the issue. [Mani] You are saying you are not able to reproduce the issue. Can you pls let me know which device, OS version and which code base are you testing with?

MANIKANDAN K

unread,
Mar 27, 2016, 9:06:28 PM3/27/16
to Google Mobile Ads SDK Developers
Hi Vu Chau,

Find below my comments inline.

Vu Chau (Mobile Ads SDK Team)

unread,
Mar 28, 2016, 10:12:44 AM3/28/16
to Google Mobile Ads SDK Developers
Hi Mani,

I believe an empty/white banner would still be counted as a banner, unless you explicitly did not supply such format to start with.  So, I'd suggest validating your DFP inventory and make sure only eligible formats you and your team intend to serve will be served.  

Regarding app events, what you'd do is, on the server side when you are coding your ad, you can have a number of events written in JavaScript, such as:

<script>

   // Send a color=green event when ad loads.

   admob.events.dispatchAppEvent("color", "green");


   handleClick = function() {

     // Send a color=blue event when ad is clicked.

     admob.events.dispatchAppEvent("color", "blue");

   };

</script>

Then, in your app's code, implement the AppEventListener interface:
import com.google.android.gms.ads.doubleclick.*;

public class BannerExample extends Activity implements AppEventListener {
}

public interface AppEventListener {
void onAppEvent(String name, String info);
}

adView.setAppEventListener(this);
And finally, do things as you wish (in this case, removing your GADBannerView from the viewcontroller) depending on events your ad dispatches (such as if the ad's background is white, signaling it's going to be a blank banner):

@Override
public void onAppEvent(String name, String info) {
 if ("color".equals(name)) {
   if ("green".equals(info)
     // Set background color to green.
    else if ("blue".equals(info)
     // Set background color to blue.

}

I tested with a few iPhone 6 simulators (iOS 8+), using our sample code and the one you provided, with a few DFP ad unit IDs.

Vu Chau
Mobile Ads SDK Team

MANIKANDAN K

unread,
Mar 28, 2016, 6:26:25 PM3/28/16
to Google Mobile Ads SDK Developers
Hi Vu Chau,

Attached the request and response of working and blank banners taken through Charles Proxy for your reference. I hope this should be good enough to find the root cause.

Please let me know if you need more info.


Regards
Mani
Blank banner - Request & Response.txt
Working Banner - Request & Response.txt

Vu Chau (Mobile Ads SDK Team)

unread,
Mar 29, 2016, 10:44:20 AM3/29/16
to Google Mobile Ads SDK Developers
Hi Mani,

Appreciated that you sent over the Charles logs.  I have taken a close look at the logs, and while I didn't identify a definitive root cause to the blank banner issue, I spotted a few things that might warrant further examination.

When a blank banner is received from the server, it appears this JS (http://ads.rubiconproject.com/ad/11448.js) is also returned.  I'm not sure if you recognize that library; if you don't, I'd recommend speaking with your DFP Technical Account Manager to get that straightened out.  

Also, from what I'm seeing, the blank banner originates from the server as-is (i.e. it leaves the server as empty).  I don't think the SDK would have any influence over that, given the two ad requests you provided were very similar to each other.  Which leads me to believe that receiving an empty banner is a server-side issue.  There is plenty of logic involved on the server that will ultimately determine which banner to serve.  We don't have visibility into that, since the SDK is pretty much a client library.  So, bother your TAM on this and have them double check your DFP inventory to make sure everything looks valid.  Also check with them if you can enable refreshing on your creative.

Vu Chau
Mobile Ads SDK Team

MANIKANDAN K

unread,
Mar 29, 2016, 1:00:30 PM3/29/16
to Google Mobile Ads SDK Developers
Hi Vu Chau,

If its a server side issue, then it shouldn't work on android also. But, it renders perfectly in Android all the times with the same setup.

Any thoughts?


Regards
Mani

Vu Chau (Mobile Ads SDK Team)

unread,
Mar 29, 2016, 5:08:36 PM3/29/16
to Google Mobile Ads SDK Developers
Hi Mani,

The server looks at various factors (geo, device, device form factor, etc.) to determine which ad to serve, and when.  From the SDK's perspective, we don't know how that works.  If the server returns an empty banner to your devices often, and not others that are geographically apart, then validating your inventory and serving settings will be a good start. I personally still haven't gotten any empty banner on my end.

Vu Chau
IMA SDK Team

MANIKANDAN K

unread,
Mar 30, 2016, 1:05:56 AM3/30/16
to Google Mobile Ads SDK Developers
Thanks Vu Chau for your support so far.

We will contact our DFP Technical Account Manager for further assistance.


Regards
Mani

ayang229

unread,
Mar 1, 2018, 3:34:00 AM3/1/18
to Google Mobile Ads SDK Developers
hi ,Mani:
    how did you resolve this Problem?we have encounter same blank ad issue, use test Id is OK,but Our AD Id sometimes show blank Ad

在 2016年3月30日星期三 UTC+8下午1:05:56,MANIKANDAN K写道:
Reply all
Reply to author
Forward
0 new messages