Urgent error related to google/adMob

Hi, i’m having a real bad problem related to admob. I released my game some days ago, and im still updating it with more stuff (translations, minor bug fixes, etc) whenever i release a new version. Today i’ve upload a new apk, and when it was ready to download, i tried it just to find that whenver the interstitial ad gets called (every 3 levels played) the game CRASHES. I tried another game i have that was built some months ago but updated with the new admobv2 and it works fine whenver the ad appears.

I also want to add that the game was perfectly showing ads in the previous version (that i uploaded 2 days ago), and now i tried building every previous version i had (5 in total) and all of them gave the same error, even the first one, and obviously the add was showing just fine in those, so i guess it’s an error when Corona’s building servers add the admob library.

Here is the bug report i’m getting: 

java.lang.NoSuchMethodError: com.google.android.gms.internal.ah.\<init\> at com.google.android.gms.ads.InterstitialAd.\<init\>(Unknown Source) at CoronaProvider.ads.admob.AdMobAd$2.run(AdMobAd.java:165) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5001) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) at dalvik.system.NativeStart.main(Native Method)

here is my build.settings puglin’s config:

plugins = { ["CoronaProvider.gameNetwork.google"] = { publisherId = "com.coronalabs", }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs" },

and here is the game: https://play.google.com/store/apps/details?id=com.sector9games.cakegame

I’ll just remove the ads and upload a new version because i don’t want people to uninstall the game in this critical phase (app release) but it’s obviously not the best idea since i get no income.

I’ve read some solutions for this error, but all of them were native java related so the solution was just “just add the missing libraries”, sadly i dont know if this is possible for Corona or if it is, i dont know how to do it.

Please someone from Corona give me a solution, it’d be very appreciated.

Thanks for reading.

After some tests, i’ve came to the answer that its not truly an admob error. Why i say this? I tested re.-building the game i say that works fine, and the ads were showing. So i removed gamenetwork plugin and it the ads showed just fine.

I dont know what is going on… my game logins just fine, but when game tries to show an add it crashes because of GPGS plugin? 

Im talking about this one:

 ["CoronaProvider.gameNetwork.google"] = { publisherId = "com.coronalabs", },

I seriously don’t know what to do anymore… i don’t know how the gamenetwork’s plugin can affect admob, because when i remove it, ads work fine. 

I also tried with last public version and it’s not working if that helps…

Can you produce a simple example that demonstrates this issue and file a bug report please?  I’m asking Engineering, but they need the example project.  Make sure to include your build.settings and config.lua.  It should be a .zip file and not some other compression method.  Use the Report a bug link at the top of the page.

Thanks

Rob

FYI…I am also seeing the same problem. Here is my crash report:

W/dalvikvm( 2606): threadid=1: thread exiting with uncaught exception (group=0x41878da0) E/AndroidRuntime( 2606): FATAL EXCEPTION: main E/AndroidRuntime( 2606): Process: com.xxxxxxxxx.xxxxx, PID: 2606 E/AndroidRuntime( 2606): java.lang.NoSuchMethodError: com.google.android.gms.internal.ah.\<init\> E/AndroidRuntime( 2606): at com.google.android.gms.ads.InterstitialAd.\<init\>(Unknown Source) E/AndroidRuntime( 2606): at CoronaProvider.ads.admob.AdMobAd$3.run(AdMobAd.java:199) E/AndroidRuntime( 2606): at android.os.Handler.handleCallback(Handler.java:733) E/AndroidRuntime( 2606): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 2606): at android.os.Looper.loop(Looper.java:146) E/AndroidRuntime( 2606): at android.app.ActivityThread.main(ActivityThread.java:5487) E/AndroidRuntime( 2606): at java.lang.reflect.Method.invokeNative(NativeMethod) E/AndroidRuntime( 2606): at java.lang.reflect.Method.invoke(Method.java:515) E/AndroidRuntime( 2606): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283) E/AndroidRuntime( 2606): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) E/AndroidRuntime( 2606): at dalvik.system.NativeStart.main(Native Method)

I’m experiencing a similar issue as the original poster where my app has been working fine up till 2 days ago when I downloaded the latest corona build and it starts crashing while trying to display ads. 

Here is my plugin in build.settings file.

plugins = { --key is the name passed to the Lua "require()" --game center ["CoronaProvider.gameNetwork.google"] = { --required! publisherId = "com.coronalabs", }, --admob ["plugin.google.play.services"] = { -- required publisherId = "com.coronalabs", }, },

I should also add that just as the original poster (username undecode), when I remove the game center plugin from build.settings, the app works fine, and the ads display fine. But when I add the game center plugin back, it begins to crash again.

Rob, its just gameNetwork + admob plugin and whenever the ad is called, the game crashes. I’ll upload an example but its basically that.

Edit: just sent the bug report with basic code explaining the problem.

I have a similar/same problem.

My game also crashes in nearly the same state as it did not crash wo days ago.

For me the following line crashes the game:

ads.load(“interstitial”)

I wrote about it here:

http://forums.coronalabs.com/topic/51286-admob-v2load-crashes-app-on-android-device-since-today/#entry265886

Hope this finds a solution soon…

Cheers,

Felix

Edit:

I get a Flurry log “uncaught” about this crashes. Dont know if this information helps anybody…

Edit2:

This is my log:

E/AndroidRuntime( 8213): FATAL EXCEPTION: main E/AndroidRuntime( 8213): java.lang.NoSuchMethodError: com.google.android.gms.internal.ah.\<init\> E/AndroidRuntime( 8213): at com.google.android.gms.ads.InterstitialAd.\<init\>(Unknown Source) E/AndroidRuntime( 8213): at CoronaProvider.ads.admob.AdMobAd$3.run(AdMobAd.java:199) E/AndroidRuntime( 8213): at android.os.Handler.handleCallback(Handler.java:725) E/AndroidRuntime( 8213): at android.os.Handler.dispatchMessage(Handler.java:92) E/AndroidRuntime( 8213): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime( 8213): at android.app.ActivityThread.main(ActivityThread.java:5306) E/AndroidRuntime( 8213): at java.lang.reflect.Method.invokeNative(NativeMethod) E/AndroidRuntime( 8213): at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime( 8213): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) E/AndroidRuntime( 8213): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) E/AndroidRuntime( 8213): at dalvik.system.NativeStart.main(Native Method)

I also can confirm, that removing the gameCenter plugin solves the problem with admob…

There are several threads around this and almost everyone is saying that removing the GPGS plugin seems to solve it.  The one thing I don’t have an answer on however is does GPGS work through the AdMob plugin.  Is GPGS still working if you take out the plugin?

Rob

Rob, i don’t know how to test if GPGS works if you remove the plugin, im not an expert on the matter but i think that only new players would know if that works or not. I said this because when i first installed the game, it asked me if i wanted to connect my app to google play. Now when i uninstall and then reinstall it, it just says “welcome X to google play”. 

The only way i see is creating a new GPGS ID and a new AdMob ID, make a dummy app, build it with those ID configurated and test it on the phone, but since a random app asks for admob’s ad maybe google can see it as illegal traffic?

If your app is using Google Play Game Services, surely you have a way to test that it’s working.  Do you have a leaderboards or achievement’s button?   

Rob

I tested my leaderboard functions without the gpgs plugin and it seems to work just fine.
(Logging in, showing the leaderboards and submitting a score.)
Strange…

I tried removing the Google Play Game Services plugin and tested my app and it is working perfectly. Ads are displaying fine. I’m also able to login and submit scores to the leaderboard.

Actually it’s not all that strange.  GPGS is part of the Google Play app, so the Google Play uber drivers should be able to support it.  It would make sense for Google to go that route.

Rob

Hey Rob, are they going to solve this tho? because i’m not 100% sure of releasing a new version without GPGS plugin

It’s the weekend here in the US.  I don’t expect to hear anything about this until Monday or Tuesday at the earliest.  We are slammed with iOS 8 issues.  I’ve emailed the engineering team on this, so now we have to wait and see.

However if you leave the GPGS plugin out and it works and is behaving as you expect, you should be good to go.  Test it and see.

Rob

I’m also having this problem :confused:

My advice for those who can’t wait for Engineering to respond is to simply try it without the Google Play Game Services plugin and only have the Google Play plugin.  If it works, then great.  If not we have to wait on Engineering to solve it and right now iOS 8 is the priority.

Rob

I am not sure if it is related but yesterday my game was in the background when I was in the playstore and suddenly a message appeared that my game was closed by the os. Never happened before but I could not recreate this behaviour until now again, though.

Felix, did you upload a new version of your game without the GPGS plugin?