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)