Mediation Custom Event Crashes App on Latest Android Build

153 views
Skip to first unread message

ez

unread,
Aug 10, 2019, 2:23:39 PM8/10/19
to Google Mobile Ads SDK Developers
Hi Ads SDK Technical Team

Recently our apps crash each time after recent Android update for Mediation Custom Event using Amazon Ad SDK on Pixel 2. But it's working fine on Samsung Galaxy 8. The apps were working for past two years with mediation custom event using Amazon ads. There is no change on the app side.

Here are details.

For Pixel 2 - Crashes

1. Mediation Custom Event using Amazon Ad SDK: amazon-ads-5.8.1.1.jar and amazon-ads-5.9.0.jar
2. Crash on Pixel 2: 
Android version 9
Build number: PQ3A.190801.002
Incremental version: 5670241
3. AD SDK was
com.google.android.gms:play-services-ads:15.0.1

4. Logs

2019-08-10 12:15:48.345 23941-23941/com.android.stock I/Ads: Use AdRequest.Builder.addTestDevice("28998FBAD89BF297A7FF156B9681C72B") to get test ads on this device.
2019-08-10 12:15:48.392 23941-24110/com.android.stock W/Ads: Not retrying to fetch app settings
2019-08-10 12:15:48.530 23941-23941/com.android.stock I/Ads: Use AdRequest.Builder.addTestDevice("28998FBAD89BF297A7FF156B9681C72B") to get test ads on this device.
2019-08-10 12:15:48.550 23941-24080/com.android.stock W/Ads: Update ad debug logging enablement as false
2019-08-10 12:15:48.562 23941-24104/com.android.stock W/Ads: Not retrying to fetch app settings
2019-08-10 12:15:49.109 23941-23950/com.android.stock W/System: A resource failed to call end. 
2019-08-10 12:15:49.224 23941-23950/com.android.stock W/System: A resource failed to call end. 
2019-08-10 12:15:49.789 23941-23941/com.android.stock I/chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: Unexpected token <", source: http://mads.amazon-adsystem.com/amazon.js (1)
2019-08-10 12:15:49.789 23941-23941/com.android.stock I/chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: Unexpected token <", source: http://mads.amazon-adsystem.com/mraid.js (1)
2019-08-10 12:15:49.870 23941-23941/com.android.stock I/chromium: [INFO:CONSOLE(50)] "MRAID log: stateChange: default", source: http://mads.amazon-adsystem.com/ (50)
2019-08-10 12:15:49.870 23941-23941/com.android.stock I/chromium: [INFO:CONSOLE(50)] "MRAID log: MRAID ready", source: http://mads.amazon-adsystem.com/ (50)
2019-08-10 12:15:49.993 23941-23950/com.android.stock W/System: A resource failed to call end. 
2019-08-10 12:15:50.093 23941-23941/com.android.stock I/chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: Unexpected token <", source: http://mads.amazon-adsystem.com/amazon.js (1)
2019-08-10 12:15:50.094 23941-23941/com.android.stock I/chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: Unexpected token <", source: http://mads.amazon-adsystem.com/mraid.js (1)
2019-08-10 12:15:50.194 23941-23941/com.android.stock I/chromium: [INFO:CONSOLE(50)] "MRAID log: stateChange: default", source: http://mads.amazon-adsystem.com/ (50)
2019-08-10 12:15:50.194 23941-23941/com.android.stock I/chromium: [INFO:CONSOLE(50)] "MRAID log: MRAID ready", source: http://mads.amazon-adsystem.com/ (50)
2019-08-10 12:15:50.251 23941-23941/com.android.stock I/chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: Unexpected token <", source: http://mads.amazon-adsystem.com/amazon.js (1)
2019-08-10 12:15:50.251 23941-23941/com.android.stock I/chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: Unexpected token <", source: http://mads.amazon-adsystem.com/mraid.js (1)
2019-08-10 12:15:50.343 23941-23941/com.android.stock I/chromium: [INFO:CONSOLE(50)] "MRAID log: stateChange: default", source: http://mads.amazon-adsystem.com/ (50)
2019-08-10 12:15:50.344 23941-23941/com.android.stock I/chromium: [INFO:CONSOLE(50)] "MRAID log: MRAID ready", source: http://mads.amazon-adsystem.com/ (50)
2019-08-10 12:15:50.352 23941-23941/com.android.stock I/chromium: [INFO:CONSOLE(50)] "MRAID log: viewableChange: true", source: http://mads.amazon-adsystem.com/ (50)
2019-08-10 12:15:50.353 23941-23941/com.android.stock I/chromium: [INFO:CONSOLE(253)] "SDK JS API log: viewableChange: {"viewablePercentage":100,"width":1080,"height":168,"x":0,"y":1626}", source: http://mads.amazon-adsystem.com/ (253)
2019-08-10 12:15:50.355 23941-23941/com.android.stock D/AndroidRuntime: Shutting down VM
    
    
    --------- beginning of crash
2019-08-10 12:15:50.356 23941-23941/com.android.stock E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.android.stock, PID: 23941
    java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
        at android.view.ViewGroup.addViewInner(ViewGroup.java:5034)
        at android.view.ViewGroup.addView(ViewGroup.java:4865)
        at android.view.ViewGroup.addView(ViewGroup.java:4805)
        at android.view.ViewGroup.addView(ViewGroup.java:4778)
        at com.google.android.gms.internal.ads.AF.onSuccess(com.google.android.gms:play-services-ads@@18.1.1:17)
        at com.google.android.gms.internal.ads.aO.run(com.google.android.gms:play-services-ads@@18.1.1:13)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.google.android.gms.internal.ads.yM.a(com.google.android.gms:play-services-ads-lite@@18.1.1:7)
        at com.google.android.gms.internal.ads._i.a(com.google.android.gms:play-services-ads@@18.1.1:8)
        at com.google.android.gms.internal.ads.yM.dispatchMessage(com.google.android.gms:play-services-ads-lite@@18.1.1:5)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6718)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)


For Samsung Galaxy 8 - Working

1. Mediation Custom Event using Amazon Ad SDK: amazon-ads-5.8.1.1.jar and amazon-ads-5.9.0.jar
2. Crash on Galaxy 8: 
Android version 9
Build number: PPR1.180610.011.G950U1UEU5DSD5
Kernel Version: 4.4.153-15499388
3. AD SDK was
com.google.android.gms:play-services-ads:15.0.1

4. Logs without exceptions
2019-08-10 12:38:39.128 9828-9828/com.android.stock I/Ads: Use AdRequest.Builder.addTestDevice("776DA0AE026E13013F82A03AA1065A59") to get test ads on this device.
2019-08-10 12:38:39.172 9828-9828/com.android.stock I/chromium: [INFO:CONSOLE(451)] "SDK JS API log: viewableChange: {"viewablePercentage":0,"width":1080,"height":168,"x":0,"y":0}", source: http://mads.amazon-adsystem.com/ (451)
2019-08-10 12:38:39.172 9828-9828/com.android.stock I/chromium: [INFO:CONSOLE(571)] "MRAID log: viewableChange: false", source: http://mads.amazon-adsystem.com/ (571)
2019-08-10 12:38:39.464 9828-9828/com.android.stock W/Ads: Server parameters: {"class_name":"com.android.stock.AmazonCustomEventBanner","label":"Amazon Custom Event"}
2019-08-10 12:38:39.554 9828-10228/com.android.stock I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
2019-08-10 12:38:39.554 9828-10228/com.android.stock I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
2019-08-10 12:38:40.039 9828-9828/com.android.stock I/chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: Unexpected token <", source: http://mads.amazon-adsystem.com/amazon.js (1)
2019-08-10 12:38:40.039 9828-9828/com.android.stock I/chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: Unexpected token <", source: http://mads.amazon-adsystem.com/mraid.js (1)
2019-08-10 12:38:40.057 9828-9847/com.android.stock W/System: A resource failed to call end. 
2019-08-10 12:38:40.164 9828-10228/com.android.stock I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
2019-08-10 12:38:40.164 9828-10228/com.android.stock I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
2019-08-10 12:38:40.184 9828-9828/com.android.stock I/chromium: [INFO:CONSOLE(156)] "MRAID log: stateChange: default", source: http://mads.amazon-adsystem.com/ (156)
2019-08-10 12:38:40.185 9828-9828/com.android.stock I/chromium: [INFO:CONSOLE(156)] "MRAID log: MRAID ready", source: http://mads.amazon-adsystem.com/ (156)
2019-08-10 12:38:40.185 9828-9828/com.android.stock I/chromium: [INFO:CONSOLE(36)] "SDK JS API log: viewableChange: {"viewablePercentage":100,"width":1080,"height":168,"x":0,"y":1908}", source: http://mads.amazon-adsystem.com/ (36)
2019-08-10 12:38:40.185 9828-9828/com.android.stock I/chromium: [INFO:CONSOLE(156)] "MRAID log: viewableChange: true", source: http://mads.amazon-adsystem.com/ (156)

Later we tried the latest versions up to com.google.android.gms:play-services-ads:18.1.1
Crashes for both Pixel 2 and Galaxy 8. Same exceptions shown above.

Here is the some related code for Amazon Custom Event 

          AdRegistration.setAppKey("our_app_key");
 
           adView = new com.amazon.device.ads.AdLayout(activity, com.amazon.device.ads.AdSize.SIZE_320x50);

            adView.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
            if (adViewLayout.getChildCount() > 0) adViewLayout.removeAllViews();
            adViewLayout.addView(adView);

            adView.loadAd();


Please advise. Let us know if you need more info.

Many thanks.

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 12, 2019, 4:12:26 PM8/12/19
to qzh...@gmail.com, google-adm...@googlegroups.com
Hello there,

Thanks for reaching out to us. Can you please confirm that this is happening with our latest version of the SDK ? Looks like you are still on the pretty old version of the SDK. 

Regards,
Deepika Uragayala
Mobile Ads SDK Team
 

ref:_00D1U1174p._5001UEIdwf:ref

ez

unread,
Aug 18, 2019, 12:24:55 PM8/18/19
to Google Mobile Ads SDK Developers
Hi Deepika

Do you have any update?

We did try the latest SDK com.google.android.gms:play-services-ads:18.1.1. It crashes on all devices we have Pixels, Galaxy etc. The old version works on Galaxy phone.

Thanks

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 19, 2019, 3:12:02 PM8/19/19
to qzh...@gmail.com, google-adm...@googlegroups.com
Hi Eric,

Are you able to reproduce the issue locally? If yes, can you please share a sample project for us to reproduce the issue and send us the complete device logs gathered with the latest version of the SDK so that our team can take a look? We haven't heard about any similar crashes from others on the forum. Also, can you please test it on a different device/reset the device and confirm us again? 

Eric Z

unread,
Aug 22, 2019, 6:23:47 PM8/22/19
to Mobile Ads SDK Forum Advisor Prod, google-adm...@googlegroups.com
Hi Deepika

I am able to produce the error in a Hello World project. I can send you the project. Let me know.

Thanks

Eric
--

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 23, 2019, 3:15:41 PM8/23/19
to qzh...@gmail.com, google-adm...@googlegroups.com
Hello there,

Thank you. Please share a sample project using "Reply privately to Author" option so that we can take a look. 

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 23, 2019, 4:03:18 PM8/23/19
to qzh...@gmail.com, google-adm...@googlegroups.com
Hi Eric,

Yes, please include both Ad unit Id and App Id. 

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 26, 2019, 3:33:23 PM8/26/19
to qzh...@gmail.com, google-adm...@googlegroups.com
Hi Eric,

I'm having  "No cached version of com.android.tools.build:aapt2:3.4.2-5326820 available for offline mode." build error even with Offline mode turned off from the sample app that was provided? Can you tell me if I'm missing something? Also, I don't notice any integration specific issue with the code.

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 27, 2019, 3:56:09 PM8/27/19
to qzh...@gmail.com, google-adm...@googlegroups.com
Hi Eric,

Can you confirm the Android Studio version that is being used? I'm at the latest version(Android Studio 3.5) and is still causing the error during build time.

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 28, 2019, 3:18:21 PM8/28/19
to qzh...@gmail.com, google-adm...@googlegroups.com
Hi Eric,

Sorry for the delay. I'm on the latest version and using classpath 'com.android.tools.build:gradle:3.4.2' but still facing this issue. Let me share this with the rest of the team to debug further. We will get back to you once we have enough details on this.
Reply all
Reply to author
Forward
0 new messages