Problem with ads (not shown)

Hi,

For a few hours, my ads are not working anymore although I have made no changes in my code.

And all these worked normally yesterday…

Here is my code for the ads:

local ads = require( "ads" ) local bannerAppID = "ca-app-pub-nnnnnnnnnnn/nnnnnnnnn" --for your iOS banner local interstitialAppID = "ca-app-pub-nnnnnnnnnnn/nnnnnnnn" --for your iOS interstitial if ( system.getInfo( "platformName" ) == "Android" ) then bannerAppID = "ca-app-pub-4091388246334706/3327353876" --for your Android banner interstitialAppID = " ca-app-pub-4091388246334706/6070922270" --for your Android interstitial print("entered ads1") end local adProvider = "admob" local function adListener( event ) -- The 'event' table includes: -- event.name: string value of "adsRequest" -- event.response: message from the ad provider about the status of this request -- event.phase: string value of "loaded", "shown", or "refresh" -- event.type: string value of "banner" or "interstitial" -- event.isError: boolean true or false print("entered ads2") local msg = event.response -- Quick debug message regarding the response from the library print( "Message from the ads library: ", msg ) if ( event.isError ) then print( "Error, no ad received", msg ) myData.gotAnAdd = "false" else print( "Ah ha! Got one!" ) myData.gotAnAdd = "true" end end ads.init( adProvider, bannerAppID, adListener ) if (iap.getInventoryValue("unlock")~=true) then if myData.gotAnAdd == "true" then print("Displaying an ad") ads.show( "banner", { x=0, y=1750, appId=bannerAppID } ) end end

And, it seems that the function adListener is never entered as “entered ads2” is never printed in the console log. And there is no error in the console log apart from “ERROR: Unable to resolve host “stats.coronalabs.com”: No address associated with hostname”.

Thanks in advance for your replies

Pierre

Here is the log:

V/Corona ( 6606): \> Class.forName: network.LuaLoader V/Corona ( 6606): \< Class.forName: network.LuaLoader V/Corona ( 6606): Loading via reflection: network.LuaLoader I/Corona ( 6606): Platform: SM-G361F / ARM Neon / 5.1.1 / Vivante GC7000UL / OpenGL ES 3.0 / 2016.2906 / français | FR | fr\_FR | fr V/Corona ( 6606): \> Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona ( 6606): \< Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona ( 6606): Loading via reflection: CoronaProvider.licensing.google.LuaLoader I/Corona ( 6606): ok I/Corona ( 6606): true I/Corona ( 6606): ok I/Corona ( 6606): WARNING: licensing.init() was already called for google. I/Corona ( 6606): entered ads1 V/Corona ( 6606): \> Class.forName: CoronaProvider.ads.admob.LuaLoader V/Corona ( 6606): \< Class.forName: CoronaProvider.ads.admob.LuaLoader V/Corona ( 6606): Loading via reflection: CoronaProvider.ads.admob.LuaLoader V/Corona ( 6606): \> Class.forName: plugin.google.iap.v3.LuaLoader V/Corona ( 6606): \< Class.forName: plugin.google.iap.v3.LuaLoader V/Corona ( 6606): Loading via reflection: plugin.google.iap.v3.LuaLoader I/Corona ( 6606): I/Corona ( 6606): mainmenu: create event I/Corona ( 6606): mainmenu: show event I/Corona ( 6606): ok1 I/Corona ( 6606): nil I/Corona ( 6606): ok2 I/Corona ( 6606): main menu has well appeared 33333 V/Corona ( 6606): \> Class.forName: CoronaProvider.gameNetwork.google.LuaLoader V/Corona ( 6606): \< Class.forName: CoronaProvider.gameNetwork.google.LuaLoader V/Corona ( 6606): Loading via reflection: CoronaProvider.gameNetwork.google.LuaLoader I/Corona ( 6606): main loaded I/Corona ( 6606): myData.settings.alreadyChosen I/Corona ( 6606): true

Here is the log:

V/Corona ( 6606): \> Class.forName: network.LuaLoader V/Corona ( 6606): \< Class.forName: network.LuaLoader V/Corona ( 6606): Loading via reflection: network.LuaLoader I/Corona ( 6606): Platform: SM-G361F / ARM Neon / 5.1.1 / Vivante GC7000UL / OpenGL ES 3.0 / 2016.2906 / français | FR | fr\_FR | fr V/Corona ( 6606): \> Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona ( 6606): \< Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona ( 6606): Loading via reflection: CoronaProvider.licensing.google.LuaLoader I/Corona ( 6606): ok I/Corona ( 6606): true I/Corona ( 6606): ok I/Corona ( 6606): WARNING: licensing.init() was already called for google. I/Corona ( 6606): entered ads1 V/Corona ( 6606): \> Class.forName: CoronaProvider.ads.admob.LuaLoader V/Corona ( 6606): \< Class.forName: CoronaProvider.ads.admob.LuaLoader V/Corona ( 6606): Loading via reflection: CoronaProvider.ads.admob.LuaLoader V/Corona ( 6606): \> Class.forName: plugin.google.iap.v3.LuaLoader V/Corona ( 6606): \< Class.forName: plugin.google.iap.v3.LuaLoader V/Corona ( 6606): Loading via reflection: plugin.google.iap.v3.LuaLoader I/Corona ( 6606): I/Corona ( 6606): mainmenu: create event I/Corona ( 6606): mainmenu: show event I/Corona ( 6606): ok1 I/Corona ( 6606): nil I/Corona ( 6606): ok2 I/Corona ( 6606): main menu has well appeared 33333 V/Corona ( 6606): \> Class.forName: CoronaProvider.gameNetwork.google.LuaLoader V/Corona ( 6606): \< Class.forName: CoronaProvider.gameNetwork.google.LuaLoader V/Corona ( 6606): Loading via reflection: CoronaProvider.gameNetwork.google.LuaLoader I/Corona ( 6606): main loaded I/Corona ( 6606): myData.settings.alreadyChosen I/Corona ( 6606): true