Timeout Exception when loading custom rendered ads in Android 9.0

693 views
Skip to first unread message

sara...@trademe.co.nz

unread,
Aug 16, 2018, 7:41:18 PM8/16/18
to Google Mobile Ads SDK Developers
Hi there,

Since updating my Pixel 2 phone to Android 9, I have been unable to load any native ads in our app. 
To check if this was our issue I tried installing the custom rendering example from https://github.com/googleads/googleads-mobile-android-examples/tree/master/java/doubleclick/CustomRenderingExample which also has the same issue. 
All native ad requests seem to fail with a TimeoutException.

The Google play services SDK version appears to be 15.0.1
The Google Play services apk installed on my device appears to be 13.2.74 (100400-207815929)
My device is a Google Pixel 2 with Android 9 Pie

The error output is:

08-17 11:12:03.737 2777-3495/? W/System.err: java.lang.SecurityException: MODE_WORLD_READABLE no longer supported
08-17 11:12:03.738 2777-3495/? W/System.err:     at android.app.ContextImpl.checkMode(ContextImpl.java:2495)
        at android.app.ContextImpl.openFileOutput(ContextImpl.java:565)
        at android.content.ContextWrapper.openFileOutput(ContextWrapper.java:208)
        at xxxxxx.mmnmmm.bи0438и04380438и0438и(Unknown Source:314)
        at xxxxxx.mmnmmm.bи04380438и0438и0438и(Unknown Source:188)
        at xxxxxx.mmnmmm.b0438ииии04380438и(Unknown Source:25)
        at xxxxxx.oouuou.run(Unknown Source:231)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)
08-17 11:12:04.929 842-884/? I/CHRE: @ 176028.828: [AR_CHRE] still: 100
08-17 11:12:05.724 2810-22325/? E/Ads: Error waiting for future.
    java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException
        at com.google.android.gms.ads.internal.util.future.ae.get(:com.google.android.gms@13274041@13.2.74 (100400-207815929):11)
        at com.google.android.gms.ads.internal.util.future.g.a(:com.google.android.gms@13274041@13.2.74 (100400-207815929):13)
        at com.google.android.gms.ads.internal.request.service.c.a(:com.google.android.gms@13274041@13.2.74 (100400-207815929):65)
        at com.google.android.gms.ads.internal.request.service.c.a(:com.google.android.gms@13274041@13.2.74 (100400-207815929):198)
        at com.google.android.gms.ads.internal.request.service.f.run(:com.google.android.gms@13274041@13.2.74 (100400-207815929):1)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.util.concurrent.TimeoutException
        at com.google.android.gms.ads.internal.util.future.m.run(Unknown Source:2)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:764) 
08-17 11:12:05.731 25172-25191/com.google.example.gms.customrenderingexample W/Ads: There was a problem getting an ad response. ErrorCode: 0
08-17 11:12:05.741 25172-25172/com.google.example.gms.customrenderingexample W/Ads: Failed to load ad: 0
 
 
I have attached the full logcat output from the sample app if that gives any more useful information.

Is there anything I can do to fix this?

Thanks,

Sara

android9-ads-timeout.txt

mobileadssdk-a...@google.com

unread,
Aug 17, 2018, 3:53:33 AM8/17/18
to sara...@trademe.co.nz, Google Mobile Ads SDK Developers
Hi Sara,

Thank you for reaching out to us and for providing to us the captured device logs.

I tested running the CustomRenderingExample sample app on a Pixel 2 emulator device running on Android 9 (API 28) and I was able to load test Custom Rendering Ads using our sample Ad Unit Id. The emulator device I tested on have Google Play Services version 12.8.62 installed. 

That said, when you encountered the Error Code 0 when testing with the CustomRenderingExample sample app, were you using our sample Ad Unit Id or your own live Ad Unit Id?

To help us narrow down the root cause of the error encountered on your end, is it possible for you to capture the Charles logs (here are setup instructions) when the error and exception were encountered? You may provide it to us privately using Reply privately to author option.

Regards,
Ivan Bautista
Mobile Ads SDK Team



On 08/17/18 07:41:18 sara...@trademe.co.nz wrote:
Hi there,

Since updating my Pixel 2 phone to Android 9, I have been unable to load any native ads in our app. 
To check if this was our issue I tried installing the custom rendering example from https://github.com/googleads/googleads-mobile-android-examples/tree/master/java/doubleclick/CustomRenderingExample which also has the same issue. 
All native ad requests seem to fail with a TimeoutException.

The Google play services SDK version appears to be 15.0.1
The Google Play services apk installed on my device appears to be 13.2.74 (100400-207815929)
My device is a Google Pixel 2 with Android 9 Pie

The error output is:

08-17 11:12:03.737 2777-3495/? W/System.err: java.lang.SecurityException: MODE_WORLD_READABLE no longer supported
08-17 11:12:03.738 2777-3495/? W/System.err:     at android.app.ContextImpl.checkMode(ContextImpl.java:2495)
        at android.app.ContextImpl.openFileOutput(ContextImpl.java:565)
        at android.content.ContextWrapper.openFileOutput(ContextWrapper.java:208)
        at xxxxxx.mmnmmm.bи0438и04380438и0438и(Unknown Source:314)
        at xxxxxx.mmnmmm.bи04380438и0438и0438и(Unknown Source:188)
        at xxxxxx.mmnmmm.b0438ииии04380438и(Unknown Source:25)
        at xxxxxx.oouuou.run(Unknown Source:231)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)
08-17 11:12:04.929 842-884/? I/CHRE: @ 176028.828: [AR_CHRE] still: 100
08-17 11:12:05.724 2810-22325/? E/Ads: Error waiting for future.
    java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException
        at com.google.android.gms.ads.internal.util.future.ae.get(:com.google.android.gms@1327...@13.2.74 (100400-207815929):11)
        at com.google.android.gms.ads.internal.util.future.g.a(:com.google.android.gms@13274041@13.2.74 (100400-207815929):13)
        at com.google.android.gms.ads.internal.request.service.c.a(:com.google.android.gms@1327...@13.2.74 (100400-207815929):65)
        at com.google.android.gms.ads.internal.request.service.c.a(:com.google.android.gms@1327...@13.2.74 (100400-207815929):198)
        at com.google.android.gms.ads.internal.request.service.f.run(:com.google.android.gms@1327...@13.2.74 (100400-207815929):1)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.util.concurrent.TimeoutException
        at com.google.android.gms.ads.internal.util.future.m.run(Unknown Source:2)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:764) 
08-17 11:12:05.731 25172-25191/com.google.example.gms.customrenderingexample W/Ads: There was a problem getting an ad response. ErrorCode: 0
08-17 11:12:05.741 25172-25172/com.google.example.gms.customrenderingexample W/Ads: Failed to load ad: 0
 
 
I have attached the full logcat output from the sample app if that gives any more useful information.

Is there anything I can do to fix this?

Thanks,

Sara

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/4dfc6058-32f0-402e-bd12-02133ff06c89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sara Metz

unread,
Aug 23, 2018, 9:50:06 PM8/23/18
to mobileadssdk-a...@google.com, Google Mobile Ads SDK Developers
Hi Ivan,

Sorry for the slow response. I had not modified the sample app at all when I encountered the error, so I should be using the Google sample ad unit id and all code should be at the state it is in the commit referenced above. 

I attempted to get a Charles log of the error, in doing so I added a network security config xml file and changed the AndroidManifest to use this. No other changes were made to the sample app code. 
Unfortunately, there seems to be no network requests made when the sample app is run or when the refresh ad button is pressed on my device and the timeout error appears in the logs each time. There probably isn't much point in sending you an empty Charles log.
I have verified that Charles is working for other apps. Our app, which should be making ad requests, also shows no ad request in the Charles log. All other network traffic seems to work as expected.

Please let me know if there is any other way for me to provide more information.

Cheers, 
Sara



        at com.google.android.gms.ads.internal.util.future.ae.get(:com.google.android.gms@13274041@13.2.74 (100400-207815929):11)
        at com.google.android.gms.ads.internal.util.future.g.a(:com.google.android.gms@13274041@13.2.74 (100400-207815929):13)
        at com.google.android.gms.ads.internal.request.service.c.a(:com.google.android.gms@13274041@13.2.74 (100400-207815929):65)
        at com.google.android.gms.ads.internal.request.service.c.a(:com.google.android.gms@13274041@13.2.74 (100400-207815929):198)
        at com.google.android.gms.ads.internal.request.service.f.run(:com.google.android.gms@13274041@13.2.74 (100400-207815929):1)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.util.concurrent.TimeoutException
        at com.google.android.gms.ads.internal.util.future.m.run(Unknown Source:2)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:764) 
08-17 11:12:05.731 25172-25191/com.google.example.gms.customrenderingexample W/Ads: There was a problem getting an ad response. ErrorCode: 0
08-17 11:12:05.741 25172-25172/com.google.example.gms.customrenderingexample W/Ads: Failed to load ad: 0
 
 
I have attached the full logcat output from the sample app if that gives any more useful information.

Is there anything I can do to fix this?

Thanks,

Sara

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.

mobileadssdk-a...@google.com

unread,
Aug 24, 2018, 4:48:00 AM8/24/18
to Sara Metz, Google Mobile Ads SDK Developers
Hi Sara,

I'm Ivan's colleague and I'll be assisting you on this.

It's indeed odd that you were able to capture Charles Logs in your other apps. That said, I understand you did not modify the sample app, however, for me to check, I would need the copy of the app you are working with as we're able to capture Charles logs using our sample apps in our end.

Regards,
Steven Balan
Mobile Ads SDK Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

        at com.google.android.gms.ads.internal.util.future.ae.get(:com.google.android.gms@1327...@13.2.74 (100400-207815929):11)
        at com.google.android.gms.ads.internal.util.future.g.a(:com.google.android.gms@13274041@13.2.74 (100400-207815929):13)
        at com.google.android.gms.ads.internal.request.service.c.a(:com.google.android.gms@1327...@13.2.74 (100400-207815929):65)
        at com.google.android.gms.ads.internal.request.service.c.a(:com.google.android.gms@1327...@13.2.74 (100400-207815929):198)
        at com.google.android.gms.ads.internal.request.service.f.run(:com.google.android.gms@1327...@13.2.74 (100400-207815929):1)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.util.concurrent.TimeoutException
        at com.google.android.gms.ads.internal.util.future.m.run(Unknown Source:2)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:764) 
08-17 11:12:05.731 25172-25191/com.google.example.gms.customrenderingexample W/Ads: There was a problem getting an ad response. ErrorCode: 0
08-17 11:12:05.741 25172-25172/com.google.example.gms.customrenderingexample W/Ads: Failed to load ad: 0
 
 
I have attached the full logcat output from the sample app if that gives any more useful information.

Is there anything I can do to fix this?

Thanks,

Sara

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

MR

unread,
Sep 27, 2018, 1:30:31 PM9/27/18
to Google Mobile Ads SDK Developers
I am experiencing these time outs randomly on my pixel 2 xl with Android 9 in other apps as well. System reboot fixes this temporarily.
Reply all
Reply to author
Forward
0 new messages