Admob plugin not loading test ads

Yeah, sure. Is this the correct ones?

 

Ad format                 Sample ad unit ID

Banner                     ca-app-pub-3940256099942544/6300978111

Interstitial                 ca-app-pub-3940256099942544/1033173712

Rewarded Video      ca-app-pub-3940256099942544/5224354917

Native Advanced     ca-app-pub-3940256099942544/2247696110

Those are the sample ad Units from Admob. How do I send you the appId and adUnits?

You can pm it to me personally to stay secure.

Ok, PM sent.

Thank you for all of the efforts!

Ed

Do not mention it.

I’d be glad to help you, we’ll figure out how to solve that mysterious issue.

Here is another update:

I’ve checked two regions profound: US and RU.

For US I’ve got “No Ads Available” for your adUnitId once, every other launch and refresh was giving me test banners:

For RU region I was getting test ads every time app requested it.

Android situation is the same, with the mentioned earlier exception that test ads are coming to device without “Test Ad” overlay, so it might be a little confusing.

From this we can conclude that test ads are tied to your region and you may get a no fill situation on specific adUnitIds. 

Do I personally think that this is expected behavior? Of course not.
Why is that happening? Only Admob can answer to that and, hopefully, fix it.

Once again, sorry to say that, but Corona have no control over ads fill. Corona’s Admob plugin gives you an easy-to-integrate access to Admob’s SDK and nothing else. I’ve triple checked everything plugin related through internal testing - all working as expected. Test mode is setting correctly and test ads are coming from Admob - the issue is fill of that test ads.

Earlier you’ve wrote that Admob refuses to work with your case and that’s a complete joke of them - you are an Admob’s user, the only difference between you and a native one is ease of integration to your Corona project. My guess is that you’ve asked for help not where you need to - you should write to their support directly, since you are a user, who is not satisfied with the quality of test ads fill and that is the issue they’ve got to help you with, it’s their job.

If you still consider on asking help not from Admob’s support directly - you can ask for help as a native Admob’s user, not mentioning Corona at all, but I highly recommend to solve that issue directly with Admob’s support team.

With that said, I’ll try to find some way to deal with it on our side, but … for now it looks like a completely impossible task to accomplish. Is there anything else I can help you with?

Thank you karpovpw for the exhaustive effort on your part!

I have finally convinced the Admob SDK support team to take a look at my Ad Units and account. I will post back here if there is anything to report.

Ed

Great news, make sure to notify asap.

Hello,

I am back! After some testing by Admob using their Sample App, they are satisfied that there is nothing wrong with my Ad Units - they successfully pull up Test Ads as expected and without any refresh issues.

karpovpw, is it possible I could send you the apk that I have built so that you could see what I see? I made a modification to my test code that the ad listener, upon failure, automatically tried to load an ad again. Every once in a while it succeeds, mostly it fails.

Please advise.

Thank you,

Ed

Hi!

Apk won’t help. You can send a new sample to reproduce an issue through bug submission, if it’s ok for you.

I’m just not sure for now what results do you expect from this new sample? Like, we’ve figured our, that test ads are working as expected and when Admob is sending them - we are displaying it through plugin just fine. The problem comes when Admob doesn’t send these ads - then, well, we have nothing to display, so we’re not displaying anything.

How Admob’s team commenting the error, that you are getting? {“errorMsg”:“No Ads Available”,“errorCode”:3,“adUnitId”:“ca-app-pub-*****”}

I don’t want you to think that Corona refuses to fix a confirmed issue, but I’m still thinking that everything working correct with test ads inside Corona plugin - something’s wrong with test ads fill. That error mentioned above are sent by Admob and not generated inside a plugin, so Admob’s team is the only one who can answer why are you getting it in the first place. It’s a pity that you have to deal with this issue, but I’d worked with Admob’s team a little more. Like, let them investigate why are you getting a {“errorMsg”:“No Ads Available”,“errorCode”:3,“adUnitId”:“ca-app-pub-*****”} if they’re saying that everything working correctly for them. They can look on their side what’s wrong with your test ads fill, we just can’t. Can you ask them to investigate, why are you getting it in the first place? Like, it’s a test ad, how you can get a “No Ads Available” error?

But I could see if we can somehow bypass improper ads fill, just create a new bug submission with your updated sources - I’ll see what we can do with your code.

2 updates:

I replaced line 48 with this:

timer.performWithDelay ( 5000, function() Z.ads.load( "banner", { adUnitId = Z.bannerAdUnitID } )  end )

and it worked…sort of. 

The test ad loaded (although it looked like a real ad…hhmmm) and refreshed 3 times before it went back to the error listed previously (“No Ads Available”). It appears as though the account is getting rate limited, although that would be odd since I am using the default refresh time as defined by Google. Another consideration was that maybe I was NOT in test mode somehow, but in the terminal output this line appears:

plugin.admob: Test mode active for device ‘F80335FFC187C2552B8382EB2C48B994’

According to this page there are 2 ways to test ads with Admob. They are either to use the sample Ad Units listed on the page or to configure the device as a test device while you are testing (which I assume is what the Corona Admob Plugin does). If done correctly, the test ad displayed should have an overlay on the ad that reads ‘Test Ad’. When I was able to get the ad to display using the steps in Update 1 above, my ads did NOT display the overlay.

Anyway for anyone looking at this, those are the 2 updates. I am going to try the sample ad units next and will report back.

Thank you to anyone following this.

Ed

Another update:

When I use the test Ad Units listed on the Admob page, the app successfully loads a test ad and refreshes away! The test ads are pretty easy to distinguish from live ads: They have a black background and say “AdMob Test Smart Banner”. So at this point it would appear that testMode is not currently working in the plugin or there is something I did wrong to set testMode. Either way, hopefully this helps someone else!

Thank you,

Ed

For others that come along later, these are the test Ad Units on the Admob link above:

Ad format                 Sample ad unit ID

Banner                     ca-app-pub-3940256099942544/6300978111

Interstitial                 ca-app-pub-3940256099942544/1033173712

Rewarded Video      ca-app-pub-3940256099942544/5224354917

Native Advanced     ca-app-pub-3940256099942544/2247696110

I don’t see anything immediately wrong with your code. There shouldn’t be timing issues other than to make sure plugin has time to complete initialization before showing ads.

I’ll ask an engineer to look into this thread. But you might want to try and modify the sample app to try and auto load the ad after you get the initialization event.

Rob

Well, that is interesting. At first, I’ve got a couple thoughts about it, but all my attempts on represent this issue failed, sadly.

If you can see this log message plugin.admob: Test mode active for device ‘…’, then test mode is active for sure and the init went fine. Also, I’ve checked all available init parameters combinations and for me test mode always working as expected (banners with “Test ad” overlay and stuff, “AdMob Test Smart Banner” should be specific for test ad units). Also, it would be nice to see a full log.
 

Here’s what we can do to speed things up: make a bug submit at https://portal.coronalabs.com/bug-submission and make sure to include a small sample to reproduce that issue. I’ll check your code and also will make some internal build for debug - then I can give you an insight about what exactly is wrong with your code and we can fix it straight away together.

Btw, have you looked at this mentioned thread https://forums.coronalabs.com/topic/71881-admob-plugin-test-mode-question/ more closely? It seems that admob is working with banners in some specific way on Admob’s side. But I can’t say what’s wrong with your particular case without a sample to reproduce an issue.

Hi karpovpw, thank you for the response!

I was having some troubles earlier with getting a build done so sorry for the slow response.

The link you posted I had read before I posted but it did not seem to apply.

I trimmed the code down to the bare minimum and am still receiving some odd behavior with testMode=true. With the test adUnits provided by Google I get the Smart Banner but when I use my adUnits I am still having issues. Here is the output from the terminal:

03-19 19:38:11.981 12061 12083 V Corona : \> Class.forName: network.LuaLoader 03-19 19:38:11.982 12061 12083 V Corona : \< Class.forName: network.LuaLoader 03-19 19:38:11.982 12061 12083 V Corona : Loading via reflection: network.LuaLoader 03-19 19:38:11.994 12061 12083 I Corona : Platform: Nexus 7 / ARM Neon / 6.0.1 / Adreno (TM) 320 / OpenGL ES 3.0 V@127.0 AU@ (GIT@I96aee987eb) / 2017.3184 / E nglish | US | en\_US | en 03-19 19:38:12.025 12061 12083 V Corona : \> Class.forName: shared.google.play.services.base.LuaLoader 03-19 19:38:12.025 12061 12083 V Corona : \< Class.forName: shared.google.play.services.base.LuaLoader 03-19 19:38:12.026 12061 12083 V Corona : Loading via reflection: shared.google.play.services.base.LuaLoader 03-19 19:38:12.039 12061 12083 V Corona : \> Class.forName: \_CoronaSetup.LuaLoader 03-19 19:38:12.050 12061 12083 V Corona : \> Class.forName: plugin.admob.LuaLoader 03-19 19:38:12.052 12061 12083 V Corona : \< Class.forName: plugin.admob.LuaLoader 03-19 19:38:12.052 12061 12083 V Corona : Loading via reflection: plugin.admob.LuaLoader 03-19 19:38:12.053 12061 12083 I Corona : Time to INIT ads... 03-19 19:38:12.055 12061 12083 I Corona : plugin.admob: Generated AdMob Test ID 'F80335FFC187C2552B8382EB2C48B994' 03-19 19:38:12.080 12061 12083 V Corona : \> Class.forName: CoronaProvider.licensing.google.LuaLoader 03-19 19:38:12.080 12061 12083 V Corona : \< Class.forName: CoronaProvider.licensing.google.LuaLoader 03-19 19:38:12.093 12061 12083 V Corona : Loading via reflection: CoronaProvider.licensing.google.LuaLoader 03-19 19:38:12.341 12061 12061 I Corona : plugin.admob: 1.2.2 (SDK: 11400000) 03-19 19:38:12.343 12061 12083 I Corona : Ad listener was called! 03-19 19:38:12.343 12061 12083 I Corona : Phase: init 03-19 19:38:12.343 12061 12083 I Corona : Now load the banner & interstitial 03-19 19:38:17.357 12061 12083 I Corona : plugin.admob: Test mode active for device 'F80335FFC187C2552B8382EB2C48B994' 03-19 19:38:20.385 12061 12083 I Corona : Ad listener was called! 03-19 19:38:20.385 12061 12083 I Corona : Phase: loaded 03-19 19:38:20.385 12061 12083 I Corona : Banner Ad is loaded, so show it! 03-19 19:38:20.385 12061 12083 I Corona : But this could mean that the interstitial is load, so which is it? 03-19 19:38:20.385 12061 12083 I Corona : Type: banner 03-19 19:38:20.450 12061 12083 I Corona : Ad listener was called! 03-19 19:38:20.450 12061 12083 I Corona : Phase: displayed 03-19 19:39:21.815 12061 12083 I Corona : Ad listener was called! 03-19 19:39:21.815 12061 12083 I Corona : Phase: refreshed 03-19 19:39:21.815 12061 12083 I Corona : Refresh ad 03-19 19:40:23.195 12061 12083 I Corona : Ad listener was called! 03-19 19:40:23.195 12061 12083 I Corona : Phase: refreshed 03-19 19:40:23.195 12061 12083 I Corona : Refresh ad 03-19 19:41:24.464 12061 12083 I Corona : Ad listener was called! 03-19 19:41:24.464 12061 12083 I Corona : Phase: refreshed 03-19 19:41:24.464 12061 12083 I Corona : Refresh ad 03-19 19:42:25.024 12061 12083 I Corona : Ad listener was called! 03-19 19:42:25.024 12061 12083 I Corona : Phase: failed 03-19 19:42:25.024 12061 12083 I Corona : Event failed....data to follow 03-19 19:42:25.024 12061 12083 I Corona : loadFailed

Ok, I submitted some test code a few minutes ago…did not receive a bug submission ID.

I am seeing your submission, thanks for that.

The solution will come up asap, I’ll post in the related threads when it’s done.

Well, here’s what we’ve investigated so far from a sample in your bug submission :

Both ios and android builds are working exactly as expected, showing test ads when testMode is active. I’ve double checked everything through internal debug - all parameters are received and sent to Admob correctly. Sadly, we can’t do anything here.

If you are getting these test ads inconsistently or having any other ads/fill issues with an Admob Corona plugin you should write a request to Admob’s support team, I’m sure they can help you eliminate all of them.

As I’ve said, it’s a pity, but we have no control over what is coming to us from Admob. Test mode working exactly as it should be, but how Admob will answer to us requesting a test ads is a complete mystery.

Btw, seems like android version of test ads do not come with a “Test Ad” overlay.

Dunno, what else I can help you with. Be sure to write back after you’ll solve issues with the help of Admob’s team, I think it can be useful to someone. I’ll be in touch, if you have any more questions or concerns - feel free to share them!

Thank you karpovpw for the help you have provided!

Here is what I receive when I use my appId and adUnitId and set Globals.release = ‘test’:

admob.png

Is it possible I can supply you with my appId and adUnitId that I use so you can see what I see?

Thank you!

Ed

Well, the thing is that I’ve already used your appId and adUnitId, they were included in the sample. I haven’t used our own credentials or something, just used your sample and went through steps to reproduce an issue.