Re: iAds in GADBannerView are occasionally blank

1,572 views
Skip to first unread message

Rajkumar Parameswaran

unread,
Oct 11, 2012, 10:44:03 AM10/11/12
to google-adm...@googlegroups.com
Hey Daniel,

I'm trying to work on reproducing the issue so wondering what refresh rate you've set for your placement?

On Wed, Oct 10, 2012 at 8:34 PM, Daniel Hallman <daniel....@gmail.com> wrote:
I'm using an iPhone 5/iOS 6 in Debug mode on with AdMob SDK 6.2.0.

While displaying an iAd, GADBannerView will randomly go blank. It is as if a failure occurred but the didFailToReceiveAdWithError: callback is not fired.  I put print statements in both adViewDidReceiveAd: and didFailToReceiveAdWithError: but neither function is called when the ad goes suddenly blank.  When a new ad come in and fires the adViewDidReceiveAd:, the ad shows properly.  If I turn off my WiFi, the didFailToReceiveAdWithError: is correctly called, and the view is hidden.

The sudden blankness only happens following a correctly displayed iAd.  I've even tried turning off Admob network ads, so only iAds show, and the problem still occurs.  However, if I turn iAds off, and leave Admob on, the problem does not occur (again, the problem only seems to happen with a currently showing iAd).

--
 
 
 

Rajkumar Parameswaran

unread,
Oct 15, 2012, 2:06:09 PM10/15/12
to google-adm...@googlegroups.com
Hey all,

Are you sure you're using the latest iAD adapter (LibAdapterIAD-Oct42012). We recently added some code to handle this issue.

Raj

On Sat, Oct 13, 2012 at 3:42 PM, Daniel Hallman <daniel....@gmail.com> wrote:
Typically I just run the default, which I believe is 30 seconds.  The refresh rate doesn't seem to matter, but for testing purpose, I put it at 12 seconds.  The issue is intermittent, but it happens often enough that we had to go with strictly Apple ADBannerViews for now.
--
 
 
 

Rajkumar Parameswaran

unread,
Nov 6, 2012, 7:04:35 PM11/6/12
to google-adm...@googlegroups.com
Which adapter and version of iAd adapter are you using?

Also, what do you mean by code refresh? Do you mean that you're manually creating your own timer that requests a new ad every 15 seconds? If so can you show us your code that does this.

On Sat, Nov 3, 2012 at 2:43 PM, C Bounsall <cabou...@gmail.com> wrote:
Having the same issue, ads display on initial request but subsequent refresh by admob displays blank. Changed to utilize code refresh but when the ad displays it disappears within 5 seconds?? Code refreshes every 15 seconds.

--




Rajkumar Parameswaran

unread,
Feb 14, 2013, 1:52:09 PM2/14/13
to google-adm...@googlegroups.com
Hey Bart,

A couple of questions to try to track down the problem. As soon as the blank ad comes in, is the adViewDidReceiveAd: called? I'm wondering if the delegates somewhere got wired differently and we're just not getting a failure call from iAd.

Also, when you tested this, was your app running the whole time or did you put it into the background and bring it back. In an older version of the adapter we saw that when we brought the app into the foreground iAd would make a request and we weren't hooking into the callback correclty at that point, but this should have been fixed in the Oct 4 release.

Finally, if there's any chance you've got a sample app where this happens or can build one, it'd probably help us out the most in finding the issue.


On Fri, Feb 8, 2013 at 5:43 PM, Bart Cichosz <bar...@gmail.com> wrote:
I am running into exactly the same issue. I am mediating between adMob and iAd ads and roughly 1 in 20-30 ads returned are blank, even though the adViewDidReceiveAd: method is the one that is called. I am using the most recent SDK on iOS 6.1 (iPhone 5), including the October 4, 2012 iAdAdapter. I tried at refresh rates of 12 and 35 seconds. I also verified that the mediatedAdView property of GADBannerView passed to adViewDidReceiveAd: is not nil when the ad is blank (if it was, I could have used that as a workaround to hide the banner until the next request is fulfilled). 


--
 
---
You received this message because you are subscribed to the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Rajkumar Parameswaran

unread,
Mar 13, 2013, 9:32:20 PM3/13/13
to google-adm...@googlegroups.com
Hey Bart,

Thanks for the awesome rundown. Sorry it took me a while to get back to this but I'm looking into it. So the only other time that AdMob makes another request is when you explicitly change the frame size, are you doing this somewhere in your code? (Either explicitly or using autolayout somehow)

What else are you doing in adView:didFailToReceiveAdWithError:? I'm assuming if you just set your GADBannerView's hidden property to YES on didFailToReceiveAdWithError: and don't do anything else, it won't trigger a refresh?

Raj


On Thu, Feb 28, 2013 at 6:27 PM, Bart Cichosz <bar...@gmail.com> wrote:
Raj,

Sorry for the delay responding. I haven't thought to check this thread for a while.

Few days ago I upgraded to version 6.3 of SDK and haven't noticed any problems until tonight (even though no code in the app changed since then).

To answer your questions:

1. Yes, adView:DidReceiveAd: gets called even when a "blank" iAd is loaded (adView:didFailToReceiveAdWithError: is not called in that case)
2. This was happening without putting the app in the background.

Since my original e-mail I added a category on the UIView to show me view hierarchy of the ad view when adView:DidReceiveAd: gets called. As you can see below, there appears to be no obvious differences between the two instances:


iAd showing:

2013-02-28 20:39:15.248 Till[12568:907] Received banner ----------------------------------------------------------------------
2013-02-28 20:39:15.249 Till[12568:907] <GADBannerView: 0x1f86d1d0; frame = (0 498; 320 50); autoresize = LM+RM+TM; layer = <CALayer: 0x1f86d2b0>>
2013-02-28 20:39:15.250 Till[12568:907]  <ADBannerView: 0x1ed69530; frame = (0 0; 320 50); clipsToBounds = YES; autoresize = W; gestureRecognizers = <NSArray: 0x231603f0>; layer = <CALayer: 0x2315c4c0>> isBannerLoaded: 1
2013-02-28 20:39:15.251 Till[12568:907]   <ADRemoteView: 0x23159da0; frame = (0 0; 320 50); autoresize = W+H; userInteractionEnabled = NO; layer = <CALayerHost: 0x231653c0>>
2013-02-28 20:39:15.252 Till[12568:907]   <UIView: 0x23165ac0; frame = (0 0; 320 50); alpha = 0; autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x23163820>>

iAd not showing (blank rectangle):

2013-02-28 20:38:50.258 Till[12568:907] Received banner ----------------------------------------------------------------------
2013-02-28 20:38:50.259 Till[12568:907] <GADBannerView: 0x1f86d1d0; frame = (0 498; 320 50); autoresize = LM+RM+TM; layer = <CALayer: 0x1f86d2b0>>
2013-02-28 20:38:50.260 Till[12568:907]  <ADBannerView: 0x1f856c60; frame = (0 0; 320 50); clipsToBounds = YES; autoresize = W; gestureRecognizers = <NSArray: 0x1f8d6b00>; layer = <CALayer: 0x1f8060e0>> isBannerLoaded: 1
2013-02-28 20:38:50.261 Till[12568:907]   <ADRemoteView: 0x1f8d10f0; frame = (0 0; 320 50); autoresize = W+H; userInteractionEnabled = NO; layer = <CALayerHost: 0x1f8d2f10>>
2013-02-28 20:38:50.262 Till[12568:907]   <UIView: 0x1f80ed10; frame = (0 0; 320 50); alpha = 0; autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x1f8cf3d0>>



I spent some more time than previously testing today, and I noticed three different kinds of unexpected behavior (the first one is the same I noticed in the past):

1. iAd was showing black rectangle only (although its views were loaded as shown above)
2. iAd was shown for 2-4 seconds then disappeared (for testing purposes I have the refresh set at 12 seconds through the web site) without triggering either success or failure delegates. Although this could be something in my code, it is unlikely - the only place I hide the ad view is in adView:didFailToReceiveAdWithError: and NSLog in there was not executed). 
3. Two adView:DidReceiveAd: were called 2-4 seconds apart. Both of them with iAd loaded and showing. When the next (3rd in the sequence) adView:DidReceiveAd: was called, it was 12 seconds (+/- 1 second) after the first (and not the most recent) adView:DidReceiveAd:

I am wondering if there are circumstances under which the mediation code is trying to refresh iAd twice too quickly (or perhaps twice at the same time), causing what it gets back from Apple "undefined" (sometimes 1 ad, sometimes two of them one following another quickly, perhaps one of them without the actual ad)? 

I'll see if I can put together a sample app for you, but it will likely be little more than what the SDK instructions provide for basic setup, since that's all that happens in my app (just start showing apps, slide ad view onto the screen if not there in success delegate, slide off in failure delegate).

Bart

Rajkumar Parameswaran

unread,
Mar 22, 2013, 3:28:18 PM3/22/13
to google-adm...@googlegroups.com
Hey Bart,

Thanks for the clarification, I understand now what you're trying to say. However, I'm still really struggling to reproduce the issue. I've tried a couple different devices now and can't get the black ad to show up. I've attached the sample app I'm using (essentially a simple app) but I was wondering if you could plug your ID into there and see if the black ad issue is happening for you using this as well.

Just copy the binary into the AdMob SDK folder (I couldn't include because of size issues uploading to the forum).

Raj


On Fri, Mar 22, 2013 at 12:26 PM, Rajkumar Parameswaran <raj...@google.com> wrote:
Hey Bart,

Thanks for the clarification, I understand now what you're trying to say. However, I'm still really struggling to reproduce the issue. I've tried a couple different devices now and can't get the black ad to show up. I've attached the sample app I'm using (essentially a simple app) but I was wondering if you could plug your ID into there and see if the black ad issue is happening for you using this as well.

Raj


On Thu, Mar 14, 2013 at 7:20 PM, Bart Cichosz <bar...@gmail.com> wrote:
Raj,

The answer to your first question is no -- that's not at all what I was saying :-) 

Note that these are three separate cases of strange behavior I observed on separate occasions during one night of testing - not three steps that happen in sequence.

In case #1 adView:DidReceiveAd: gets called every 12 seconds, but sometimes iAd is just a black rectangle (even though view hierarchy seems to be fine when comparing it to view hierarchy when iAd is shown correctly - adView:DidReceiveAd: is what calls my UIView category method to display that hierarchy). adView:didFailToReceiveAdWithError: is not called at all in this case.

In case #2, adView:DidReceiveAd: is called every 12 seconds, but the iAd disappears (i.e. the view turns into black rectangle) after few seconds. When it disappears neither adView:DidReceiveAd: nor didFailToReceiveAdWithError: get called. Because of that (a) I cannot see if the view hierarchy changed since the method to show it is not called, (b) the disappearance is not caused by my view modifications, since those modification only happen in didFailToReceiveAdWithError: in my code (which is not called).

In case #3, adView:DidReceiveAd: gets called every 12 seconds, but sometimes  another adView:DidReceiveAd: gets called 2-4 seconds into this 12 second period (usually displaying all ads correctly).

As far as your second paragraph questions go -- adView:didFailToReceiveAdWithError: simply animates the ad view off the screen (I am not hiding it via the hidden property). However, the is not where the issue is, as none of the above three cases result in adView:didFailToReceiveAdWithError: being called. 

Now, if I am running the app for a few minutes, and go through few dozen requests, eventually an ad is not returned and  adView:didFailToReceiveAdWithError: does get called, ad view is animated off the screen properly, requests continue, and once a new ad is received the view correctly animates back onto the screen. Sorry for the confusion.

So my simplified NSLog output might look as follows (+x means x seconds later) - for simplicity I am assuming all received ads are iAds (and text after // is my comment and not NSLog output):

0: adView:DidReceiveAd: // Ad view animated onto the screen - iAD shown
+12: adView:DidReceiveAd: // Ad changes - iAD shown
+12: adView:DidReceiveAd: // Ad changes - iAD shown
+12: adView:DidReceiveAd: // Ad changes - black rectangle shown - case #1
+12: adView:DidReceiveAd: // Ad changes - iAD shown
+12: adView:DidReceiveAd: // Ad changes - iAD shown
+12: adView:DidReceiveAd: // Ad changes - iAD shown
+12: adView:DidReceiveAd: // Ad changes - iAD shown
+12: adView:didFailToReceiveAdWithError: // ad view animated off the screen - expected and correct behavior
+12: adView:DidReceiveAd: // Ad view animated onto the screen - iAD shown
+12: adView:DidReceiveAd: // Ad changes - iAD shown
+12: adView:DidReceiveAd: // Ad changes - iAD shown
+3: adView:DidReceiveAd: // Ad changes - iAD shown - case #3
+9: adView:DidReceiveAd: // Ad changes - iAD shown
+12: adView:DidReceiveAd: // Ad changes - iAD shown
+12: adView:DidReceiveAd: // Ad changes - iAD shown
+2: // Neither delegate called, but the ad changes into a black rectangle - case #2
+10: adView:DidReceiveAd: // Ad changes - iAD shown
+12: adView:DidReceiveAd: // Ad changes - iAD shown
and so on...

Note that the refresh timing is not set anywhere in the app - I always set that through the mediation settings on the web site.

I hope this makes things clearer. :-)

Regards,

Bart
BannerExample 2.zip

Evgeny Cherpak

unread,
May 17, 2013, 1:42:58 AM5/17/13
to Google AdMob Ads Developers
Hi,
I'm seeing this issue as well and able to reproduce it with those
steps.

Wait until AdMob shows the iAd ad (too much 'ad' in this sentence).
Then press home button to send your app to the background.
Wait ~30 seconds (it's my refresh rate), and return to your app.

You will notice blank (black) banner instead of ad, that will
eventually change into the add after some time.

-Evgeny

On Apr 1, 12:49 am, Bart Cichosz <bar...@gmail.com> wrote:
> Raj,
>
> I've run the sample code using my mediation identifier. I did not get a
> black rectangle, but I did get two cases where the ad disappeared entirely,
> revealing the view underneath it. In the log below this happened at the
> 17:30:33.984 and 17:32:29.315 marks. The mediation id is set to refresh
> every 12 seconds.
>
> 2013-03-31 17:27:41.274 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:27:53.052 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:28:04.020 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:28:16.870 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:28:28.076 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:28:34.571 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:28:40.758 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:28:52.136 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:29:04.857 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:29:16.190 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:29:28.859 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:29:40.241 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:29:52.920 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:30:04.306 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:30:17.010 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:30:28.359 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:30:33.984 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:30:41.462 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:30:52.417 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:31:05.242 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:31:16.469 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:31:29.282 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:31:45.997 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:31:57.240 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:32:05.242 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:32:16.600 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:32:29.315 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:32:40.715 BannerExample[16801:907] Received ad successfully
> 2013-03-31 17:32:53.377 BannerExample[16801:907] Received ad successfully
>
> As you can see adViewDidReceiveAd: was called in both cases.
>
> Now that I think about this, in my app the background is black, so when the
> ad "comes through as a black rectangle", it is not that it is a black
> rectangle, but rather that it disappears like in this sample code, and I am
> seeing what is underneath it, i.e. the background.
>
> In any case, when the ad does not come through,
> adView:didFailToReceiveAdWithError: should be called and it looks like that
> not always is the case as the log above demonstrates.
>
> Regards,
>
> Bart
>
>
>
>
>
>
>
> On Friday, March 22, 2013 3:28:18 PM UTC-4, Raj Parameswaran wrote:
>
> > Hey Bart,
>
> > Thanks for the clarification, I understand now what you're trying to say.
> > However, I'm still really struggling to reproduce the issue. I've tried a
> > couple different devices now and can't get the black ad to show up. I've
> > attached the sample app I'm using (essentially a simple app) but I was
> > wondering if you could plug your ID into there and see if the black ad
> > issue is happening for you using this as well.
>

Rajkumar Parameswaran

unread,
May 22, 2013, 12:41:31 PM5/22/13
to google-adm...@googlegroups.com
Hey all,

Thanks for all the info. I've filed a bug with our engineers who are looking into a fix. In the meantime, if this is mostly happening when your app is backgrounded, you might just want to listen to the foregrounding event and hide your adview and make another request explicitly in that case.

Raj


Hamish Graham

unread,
Jun 24, 2013, 6:51:32 PM6/24/13
to google-adm...@googlegroups.com
Hi Raj

Any update on this?

I have the same issue that iAds are often blank when mediating between iAd and Admob.  I would like to use Admob mediation but this issue is stopping me.

I am using the latest version of the SDK and the latest iAd adapter.

Thanks, Hamish
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.

Rajkumar Parameswaran

unread,
Jun 28, 2013, 7:31:25 PM6/28/13
to google-adm...@googlegroups.com
Unfortunately there are no updates on this issue at this time. I'll ping this thread once I've got an update from the engineers.


To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.

Hamish Graham

unread,
Aug 15, 2013, 10:35:45 PM8/15/13
to google-adm...@googlegroups.com
Still no update on this Raj?  I'm needing to swap from Adwhirl to Admob mediation but still getting this problem with blanks.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


Drew Olbrich

unread,
Aug 24, 2013, 3:46:21 PM8/24/13
to google-adm...@googlegroups.com
I experienced this same problem, with banners that would spontaneously disappear without a call to adView:didFailToReceiveAdWithError:, revealing the black view behind them.

The black view looked pretty bad in my app, so I worked around this problem by polling the GADBannerView's hidden property. If the banner disappears, I slide its parent view, which I have a given a slightly nicer looking white background, offscreen.

(I posted what I thought was an explanation for the bug here a few days ago, although that turned out not to be true. The message never got posted though -- I think.)

Drew

Denver Coulson

unread,
Oct 9, 2013, 8:46:10 PM10/9/13
to google-adm...@googlegroups.com, drew.o...@gmail.com
Are you checking the hidden property on a per-frame basis? 
Also when your banner disappears, does it call adViewDidReceiveAd? My iAd banner goes blank even when adViewDidReceiveAd is not called.
Reply all
Reply to author
Forward
0 new messages