Admob Ads app crashes occasionally on IllegalArgumentException
Asked Answered
R

2

6

I try to integrate AdMob ads and GooglePlay IAP into clean (hello world) cocos2d-js 3.5 project.

Occasionally (every 5th run) the application crashes and shows the exception bellow. This behavior started when I've integrated IAP. Clean AdMob integration is fine (or at least believed to be).

Up to now I only did the Java part (cocos code is not called except the main screen). I did upgrade the google-play-services_lib to 23 version.

The log dump:

E/AndroidRuntime(27040): java.lang.IllegalArgumentException: null reference
E/AndroidRuntime(27040):    at com.google.android.gms.common.internal.d.b(SourceFile:45)
E/AndroidRuntime(27040):    at com.google.android.gms.ads.internal.g.ao.a(SourceFile:60)
E/AndroidRuntime(27040):    at com.google.android.gms.ads.internal.t.b.a(SourceFile:766)
E/AndroidRuntime(27040):    at com.google.android.gms.ads.internal.t.m.run(SourceFile:43)
E/AndroidRuntime(27040):    at android.os.Handler.handleCallback(Handler.java:733)
E/AndroidRuntime(27040):    at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(27040):    at android.os.Looper.loop(Looper.java:149)
E/AndroidRuntime(27040):    at android.app.ActivityThread.main(ActivityThread.java:5257)
E/AndroidRuntime(27040):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(27040):    at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(27040):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:788)
E/AndroidRuntime(27040):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:604)
E/AndroidRuntime(27040):    at dalvik.system.NativeStart.main(Native Method)

Any hints? I can post some code snippets if you find it useful...

UPDATE:

It is likely bug on Google side as Dmitry mentioned. I can see these security warnings just before the crash. It shows that the bug causing ad is "World of Tanks"

W/Ads     (21547): JS: The page at https://googleads.g.doubleclick.net/mads/gma displayed insecure content from http://lh3.googleusercontent.com/mTcg18XIu-LbM4ovcCpet1zMpdkt1QKIZpM7RhdBpH7fjlLFvSRn56yxbh3i92FiHmjLx54rCg.
W/Ads     (21547):  (https://googleads.g.doubleclick.net/mads/gma:0)
I/chromium(21547): [INFO:CONSOLE(0)] "The page at https://googleads.g.doubleclick.net/mads/gma displayed insecure content from http://lh3.googleusercontent.com/mTcg18XIu-LbM4ovcCpet1zMpdkt1QKIZpM7RhdBpH7fjlLFvSRn56yxbh3i92FiHmjLx54rCg.
I/chromium(21547): ", source: https://googleads.g.doubleclick.net/mads/gma (0)
Rink answered 18/8, 2015 at 16:11 Comment(12)
Im having the exact same crash. It started today, and I've had a couple THOUSAND crashes today with that exact stacktrace. Certainly a bug on google's side on a GMS update over the air today. Hopefully they will fix it. I cant reproduce it on my devices, so I tried upgrading to the current GMS (v26, 7.8 or 7.9 not sure) but I dont know if it will fix since I cant reproduce it. I will try to filter out GOW ad as Isaiah suggested.Plovdiv
Please, add your information here: groups.google.com/d/msg/google-admob-ads-sdk/-RTKFeFvgNQ/…Bueno
I have faced same crash. any solution to avoid crash?Proceeding
I would be nice if we could place try-catch block somewhere but this complete call stack is out-of-our-hands :-(Rink
From this security warning, it seems that the crash is related to https using http content, so I just disabled https ads (Admob -> Promote -> Select app -> Settings) and hopefully it will stop crashing.Plovdiv
PerfectGamesOnline, you get that crash on your device, can you tell us your google play services version? I mean the one installed on your device.Bueno
@rottz : I'm having same crashes since August and the Https parameter is already disabledAlex
@rottz: disabling parameter will not help. I've got that disabled already and it crashes at this moment (it is "Monetize" not "Promote)Rink
@dmitry: sorry for stupid question but how do I find out the GPS version on device? Device android version is 4.4.2. GPS linked to app is level 23.Rink
@Rink Please, open Settings/Apps/Google play services. You will see a version number there. My reasoning is quite simple - the bug is quite new, so probably it is a staged rollout of a new version of GPS. If it is, we see just a small percentage of a future problem. In that case we need to inform Google AdMob before that version is rolled out to everyone.Bueno
my version is 7.8.99. As you see in my answer Google is already working on it.Rink
The problem seems to be fixed. Only 9 errors yesterdayAlex
R
0

It is officially recognized as error and being working on now. See: https://groups.google.com/d/msg/google-admob-ads-sdk/-RTKFeFvgNQ/F9rOmGYtKgAJ

Rink answered 20/8, 2015 at 7:8 Comment(0)
B
3

I am having the same problem. I have an already released app and it seems that the Game Of War Ad is what's doing it.

Boggle answered 18/8, 2015 at 20:29 Comment(1)
My players also mentioned seeing Game of War ads just before the crash, but I see crashes in console even after filtering out that package in promoted apps.Bueno
R
0

It is officially recognized as error and being working on now. See: https://groups.google.com/d/msg/google-admob-ads-sdk/-RTKFeFvgNQ/F9rOmGYtKgAJ

Rink answered 20/8, 2015 at 7:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.