1

I'm having random issues with banner ads on a mobile app. After launching the app banner is properly loaded and displayed, but after some random time I got Failed to load ad: 3, banner disappers and is no longer refreshed. I can see repeated messages in logcat:

Ad is not visible. Not refreshing ad.
Scheduling ad refresh 60000 milliseconds from now.

In hierarchy view I can also see that admob view is removed:

View whierarchy when banner is being displayed:

android.widget.FrameLayout{41e45b50 V.E..... ........ 0,725-480,800 #7f09000b app:id/bannerFrame}
  com.heyzap.sdk.ads.BannerAdView{41de9d00 V.E..... ........ 0,0-480,75}
    com.fyber.ads.banners.BannerAdView{41fa1960 V.E..... ........ 0,0-480,75}
      com.google.android.gms.ads.AdView{41de6ef0 V.E..... ........ 0,0-480,75}
        com.google.android.gms.ads.internal.bp{420e3918 V.E..... ........ 0,0-480,75}
          com.google.android.gms.ads.internal.webview.n{41e21828 V.E..... ........ 0,0-480,75}
            com.google.android.gms.ads.internal.webview.o{41e4e298 VFEDHVC. ........ 0,0-480,75}

View hierarchy when banner is no longer visible:

android.widget.FrameLayout{41e39e50 V.E..... ........ 0,725-480,800 #7f09000b app:id/bannerFrame}
  com.heyzap.sdk.ads.BannerAdView{41ddf9c0 V.E..... ......I. 0,0-480,75}
    com.fyber.ads.banners.BannerAdView{41d8d768 V.E..... ........ 0,0-480,75}

Banner properly reloads only after the app is killed and re-run.

I'm using Heyzap v10.3 with AdMob enabled. I have not seen such behavior before v10 sdk.

Here is my logcat: https://gist.github.com/anonymous/5df7e6f866e94d3c47ece8e12e22e560 (5841 is my app process id)

1 Answers1

1

My name is Emory, I work at Heyzap.

From your logcat I can determine a few things.

First, you should disable location based targeting from your admob dashboard to get rid of the App does not have the required permissions to get location

Second, you should be using test ads mode for admob by calling HeyzapAds.addTestDevice(this, "30A1E3C428D9FB9433BD447B2E7891B9") to ensure that all of your calls return fill. There are a number of errors in your logcat about AdMob not filling. Remove this call before submitting your app to production.

Your problem may be just a manifestation of issues caused by these warnings, or could be caused by the aggressive recycling of webviews by the Android OS on certain phones. Please try these fixes and if the issue is still occurring let me know here so we can find a solution.

Thanks, Emory

Emory Petermann
  • 129
  • 1
  • 3
  • I disabled location based targeting for now and it seems to work. I didn't use test ads to simulate real behaviour - test ads have not been disappearing. I don't think this issue is due to recycling of webviews - it occurred on a few devices and did not occur when I used AdMob directly. I will investigate this further and let you know if there's some more issues. – Serpent7776 Mar 13 '17 at 16:03
  • Nah, ads are still disappearing. One thing I noticed is when banner is to be reloaded, previous banner is removed, there is a short moment when no banner is visible and then new banner is displayed. This is not occuring on iOS. Is following scenario possible: banner is about to be reloaded -> old banner is removed -> new banner fails to load -> banner has not been loaded, so no new banner is displayed -> banner is no longer rerfeshing, because no banner is visible? – Serpent7776 Mar 14 '17 at 16:22
  • I think this is the issue with heyzap android sdk. I can replicate this behaviour: launch app -> banner loads -> turn wifi off -> banner disappers -> turn wifi on -> banner no longer refreshes. This is not occuring on iOS: when I turn wifi off, previous banner does not disappear. – Serpent7776 Mar 15 '17 at 14:08
  • We are looking in to the issue. – Emory Petermann Mar 22 '17 at 22:40
  • Hello @Serpent7776 We are updating our SDK version 9 to support the latest version of AdMob. I suggest you use our SDK version 9.10.0 for the time being which I do not believe exhibits this problem. Please email support@heyzap.com if you have any further difficulties. – Emory Petermann Apr 24 '17 at 18:01