MainActivity shows TestBanner1 correctly, but TestBanner2 on EventActivity fails to load

105 views
Skip to first unread message

Alexandre Rodrigues

unread,
Nov 14, 2018, 3:19:43 PM11/14/18
to Google Mobile Ads SDK Developers
Hi,

Please, banner fails to load (most of attempts as a Error Code 0) on EventActivity.

Considerations: 

1) Result is the same on emulator, on real devices, using test_id or using real_id.

2) I have a working TestBanner1 on a recyclerView on MainActivity (but for some reason a regular BANNER fails to load on EventActivity). 

3) I tried to attach mediation-test-suite:0.9.2: everything green but it shows a config problem ... again not possible to be it because i have a working ad in another activity using the same ad_unit_id

4) I tried to remove the MainActivity banner to see if there was something affecting. It did not work

5) The problem is not the ad_unit_id. As I said I am using also the test_id.

6) See below that I tried with different devices, diferent versions of play-services-ads, i tried to remove other things to see if something was affecting and many other things that I am not mentioning... but really nothing have worked. 

Guys, honestly, I have no clue on my side what should i do. Logs are definitely not showing the problem. I need your help.


    <string name="admob_app_id">ca-app-pub-3940256099942544~3347511713</string>
    <string name="admob_adunit_id_main">ca-app-pub-3940256099942544/6300978111</string>
    <string name="admob_adunit_id_bottomevent">ca-app-pub-3940256099942544/6300978111</string>


ATTEMPT1:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/event_relative_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="doein.doeinproject.Event">
...
    <com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto"
        android:id="@+id/adView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        ads:adSize="SMART_BANNER"
        ads:adUnitId="@string/admob_adunit_id_bottomevent"></com.google.android.gms.ads.AdView>
</RelativeLayout>

code:
        mAdView = findViewById(R.id.adView);
        AdRequest adRequest = new AdRequest.Builder()
                .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
                .addTestDevice("62EBAC7D548795CF72CE37271865DEDB")
                .addTestDevice("3E951848FB5722A8EA187DE7EF7784B9")
                .addTestDevice("2D5BE582E26E348E8FAEFD4FD4FBC178")
                .build();
        mAdView.loadAd(adRequest);

ATTEMPT2: using play-services-ads:11.0.0
11-14 16:51:46.939 9952-9952/doein.doeinproject I/dalvikvm: Could not find method android.webkit.WebChromeClient.onPermissionRequest, referenced from method com.google.android.gms.internal.ads.zzaqo.onPermissionRequest
11-14 16:51:46.939 9952-9952/doein.doeinproject I/dalvikvm: Could not find method android.webkit.PermissionRequest.getResources, referenced from method com.google.android.gms.internal.ads.zzaqo.onPermissionRequest
11-14 17:00:27.936 9952-9952/doein.doeinproject I/Ads: Starting ad request.
11-14 17:00:27.936 9952-9952/doein.doeinproject I/Ads: This request is sent from a test device.
11-14 17:01:29.251 9952-9952/doein.doeinproject E/Ads: Timed out waiting for WebView to finish loading.


ATEMPT4: using Real device:
11-14 17:10:39.120 16951-16951/doein.doeinproject I/Ads: Updating ad debug logging enablement.
11-14 17:10:41.680 16951-17119/doein.doeinproject W/Ads: Update ad debug logging enablement as false
11-14 17:10:45.600 16951-16951/doein.doeinproject I/Ads: This request is sent from a test device.
11-14 17:10:45.730 16951-17527/doein.doeinproject W/Ads: Invoke Firebase method getInstance error.
11-14 17:10:45.730 16951-17527/doein.doeinproject W/Ads: The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date
11-14 17:10:46.350 23198-17556/? I/Ads: SDK version: afma-sdk-a-v14366007.11010000.1
11-14 17:11:47.410 16951-16951/doein.doeinproject I/Ads: Ad failed to load : 0


ATTEMPT5:
       AdView mAdView = new AdView(this);
        mAdView.setAdSize(AdSize.MEDIUM_RECTANGLE);
        mAdView.setAdUnitId(getResources().getString(R.string.admob_adunit_id_bottomevent));
        FrameLayout frameLayout = (FrameLayout) findViewById(R.id.ev_frame_adview);
        frameLayout.addView(mAdView);
        AdRequest adRequest = new AdRequest.Builder().build();
        mAdView.loadAd(adRequest);
        mAdView.setAdListener(new AdListener() {

=> play-services-ads:17.1.1
.internal.ads.zzbfy.onPermissionRequest
11-14 16:44:58.956 9585-9585/doein.doeinproject I/dalvikvm: Could not find method android.webkit.PermissionRequest.getResources, referenced from method com.google.android.gms.internal.ads.zzbfy.onPermissionRequest
11-14 16:44:59.920 9585-9632/doein.doeinproject W/Ads: Invoke Firebase method getInstance error.
11-14 16:44:59.920 9585-9632/doein.doeinproject W/Ads: The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date
11-14 16:45:01.356 9585-9585/doein.doeinproject I/Ads: Starting ad request.
11-14 16:45:01.356 9585-9585/doein.doeinproject I/Ads: SDK version: afma-sdk-a-v14300000.14300000.0
11-14 16:45:01.360 9585-9585/doein.doeinproject I/Ads: Use AdRequest.Builder.addTestDevice("62EBAC7D548795CF72CE37271865DEDB") to get test ads on this device.
11-14 16:45:01.368 9585-9585/doein.doeinproject W/Ads: Not retrying to fetch app settings
11-14 16:46:02.855 9585-9585/doein.doeinproject E/Ads: Timed out waiting for WebView to finish loading.

ATTEMPT6: using play-services-ads:11.0.0
11-14 16:49:23.672 9769-9769/doein.doeinproject I/Ads: Starting ad request.
11-14 16:49:23.672 9769-9769/doein.doeinproject I/Ads: Use AdRequest.Builder.addTestDevice("62EBAC7D548795CF72CE37271865DEDB") to get test ads on this device.
11-14 16:49:23.684 9769-9769/doein.doeinproject W/Ads: Not retrying to fetch app settings
11-14 16:50:24.892 9769-9769/doein.doeinproject E/Ads: Timed out waiting for WebView to finish loading.


ATTEMPT7: using publisher:

    <com.google.android.gms.ads.doubleclick.PublisherAdView
        android:id="@+id/publisherAdView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_alignParentBottom="true"
        ads:adSize="BANNER"
        ads:adUnitId="/6499/example/banner">
    </com.google.android.gms.ads.doubleclick.PublisherAdView>

        mPublisherAdView = findViewById(R.id.publisherAdView);
        PublisherAdRequest adRequest = new PublisherAdRequest.Builder().build();
        mPublisherAdView.loadAd(adRequest);

-14 14:54:35.945 1643-1643/doein.doeinproject I/Ads: SDK version: afma-sdk-a-v14300000.14300000.0
11-14 14:54:35.947 1643-1643/doein.doeinproject I/Ads: Use AdRequest.Builder.addTestDevice("54139152462B86D6D5712AC747383BE6") to get test ads on this device.
11-14 14:54:46.031 1643-1683/doein.doeinproject E/Ads: Error waiting for future.
                                                       java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException
                                                           at com.google.android.gms.internal.ads.zzbcl.get(Unknown Source)
                                                           at com.google.android.gms.internal.ads.zzbbq.zza(Unknown Source)
                                                           at com.google.android.gms.internal.ads.zzatq.zza(Unknown Source)
                                                           at com.google.android.gms.internal.ads.zzatq.zzb(Unknown Source)
                                                           at com.google.android.gms.internal.ads.zzats.run(Unknown Source)
                                                           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
                                                           at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                                                           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                                                           at java.lang.Thread.run(Thread.java:761)
                                                        Caused by: java.util.concurrent.TimeoutException
                                                           at com.google.android.gms.internal.ads.zzbbu.run(Unknown Source)
                                                           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
                                                           at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                           at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
                                                           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
                                                           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
                                                           at java.lang.Thread.run(Thread.java:761) 
11-14 14:54:46.031 1643-1683/doein.doeinproject W/Ads: There was a problem getting an ad response. ErrorCode: 0
11-14 14:54:46.032 1643-1643/doein.doeinproject W/Ads: Failed to load ad: 0


I have no idea what's going on.

mobileadssdk-a...@google.com

unread,
Nov 14, 2018, 4:33:28 PM11/14/18
to Alexandre Rodrigues, Google Mobile Ads SDK Developers
Hi there,

Thanks for reaching out to us. Can you please confirm whether you are seeing this on the latest version of the SDK? The crash logs seems to point to a known issue that has been recently fixed. So, if you could confirm the SDK version, we will be able to investigate further.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
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/6b13357c-aca9-4074-b79a-75dffd7dbb80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alexandre Rodrigues

unread,
Nov 14, 2018, 4:58:26 PM11/14/18
to mobileadssdk-a...@google.com, google-adm...@googlegroups.com
Hi,
Yes. I used  com.google.android.gms:play-services-ads:17.1.1. (see that i am not using firebase)
But this library usage returns a warning: "All gms/firebase libraries must use the exact same version specification. Found versions 17.1.1, 16.0.3, 16.0.1, 16.0.0. Examples include play-services-ads:17.1.1 and play-services-measument-base:16.0.4". Even with this warning, testBanner1 is displayed on MainActivity, but testBanner2 is not displayed on EventActivity.

Any idea? Thanks in advance.

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,
Nov 15, 2018, 3:14:11 PM11/15/18
to Alexandre Rodrigues, google-adm...@googlegroups.com
Hi there,

Thanks for sharing additional details. I'll share this with the rest of the team and I will update you via this thread if I have any new information to share.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 11/14/18 16:57:55 alexan...@gmail.com wrote:
Hi,
Yes. I used  com.google.android.gms:play-services-ads:17.1.1. (see that i am not using firebase)
But this library usage returns a warning: "All gms/firebase libraries must use the exact same version specification. Found versions 17.1.1, 16.0.3, 16.0.1, 16.0.0. Examples include play-services-ads:17.1.1 and play-services-measument-base:16.0.4". Even with this warning, testBanner1 is displayed on MainActivity, but testBanner2 is not displayed on EventActivity.

Any idea? Thanks in advance.

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.

Alexandre Rodrigues

unread,
Nov 16, 2018, 8:06:08 AM11/16/18
to mobileadssdk-a...@google.com, google-adm...@googlegroups.com
Thanks.
I would appreciate even a direction to debug. So far, I have no clue, as I said.
Just to add more details when I create a whole new project and insert the banner, it works. I don't understand this behaviour.
Thanks again. Please, anyting idea let me know. App is just waiting this resource to launch.
Alex


Em qui, 15 de nov de 2018 às 18:13, <mobileadssdk-a...@google.com> escreveu:
Hi there,

Thanks for sharing additional details. I'll share this with the rest of the team and I will update you via this thread if I have any new information to share.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 11/14/18 16:57:55 alexan...@gmail.com wrote:
Hi,
Yes. I used  com.google.android.gms:play-services-ads:17.1.1. (see that i am not using firebase)
But this library usage returns a warning: "All gms/firebase libraries must use the exact same version specification. Found versions 17.1.1, 16.0.3, 16.0.1, 16.0.0. Examples include play-services-ads:17.1.1 and play-services-measument-base:16.0.4". Even with this warning, testBanner1 is displayed on MainActivity, but testBanner2 is not displayed on EventActivity.

Any idea? Thanks in advance.

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,
Nov 16, 2018, 3:36:41 PM11/16/18
to Alexandre Rodrigues, google-adm...@googlegroups.com
Hi there,

Thanks for waiting on this. Can you make sure that all of the libraries are pointing to the same version? What specific library is causing this error - "All gms/firebase libraries must use the exact same version specification. Found versions 17.1.1, 16.0.3, 16.0.1, 16.0.0. Examples include play-services-ads:17.1.1 and play-services-measument-base:16.0.4"? 

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 11/16/18 08:05:34 alexan...@gmail.com wrote:
Thanks.
I would appreciate even a direction to debug. So far, I have no clue, as I said.
Just to add more details when I create a whole new project and insert the banner, it works. I don't understand this behaviour.
Thanks again. Please, anyting idea let me know. App is just waiting this resource to launch.
Alex


Em qui, 15 de nov de 2018 às 18:13, <mobileadssdk-advisor+support@google.com> escreveu:
Hi there,

Thanks for sharing additional details. I'll share this with the rest of the team and I will update you via this thread if I have any new information to share.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 11/14/18 16:57:55 alexan...@gmail.com wrote:
Hi,
Yes. I used  com.google.android.gms:play-services-ads:17.1.1. (see that i am not using firebase)
But this library usage returns a warning: "All gms/firebase libraries must use the exact same version specification. Found versions 17.1.1, 16.0.3, 16.0.1, 16.0.0. Examples include play-services-ads:17.1.1 and play-services-measument-base:16.0.4". Even with this warning, testBanner1 is displayed on MainActivity, but testBanner2 is not displayed on EventActivity.

Any idea? Thanks in advance.

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.

Alexandre Rodrigues

unread,
Nov 17, 2018, 4:42:42 AM11/17/18
to mobileadssdk-a...@google.com, google-adm...@googlegroups.com
Hi, 
Thanks for the answer. Please, the problem is that SyncNow might be checking sublibraries that I do not have access. For example, I dont know which library "play-services-measument-base:16.0.4 " belongs to. Below, follow all dependencies i am using:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'android.arch.work:work-runtime:1.0.0-alpha10' //work_manager_library
implementation 'com.android.support:support-v4:26.1.0'
compile 'com.android.support:support-annotations:27.1.1'
implementation 'com.google.android.gms:play-services-ads:17.1.1' //for adMob
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.android.support:recyclerview-v7:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.android.volley:volley:1.1.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'org.florescu.android.rangeseekbar:rangeseekbar-library:0.3.0'
implementation ('com.facebook.android:facebook-login:[4,5)'){
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'cardview-v7'
exclude group: 'com.android.support', module: 'customtabs'
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.android.support', module: 'support-core-utils'
}
In short, I do not know how to make all libraries point to the version. Also, i check google/stackoverflow: they only show how to supress the warning using "//noinspection GradleCompatible" which did not work since it is just a way to supress a warning. 

Would you guys have an ideia how to do it?


Em sex, 16 de nov de 2018 às 18:36, <mobileadssdk-a...@google.com> escreveu:
Hi there,

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.

Alexandre Rodrigues

unread,
Nov 19, 2018, 3:21:32 PM11/19/18
to mobileadssdk-a...@google.com, google-adm...@googlegroups.com
Guys,
Please, let me know if I need to provide you extra information regarding this issue. 
Thanks in advance.

mobileadssdk-a...@google.com

unread,
Nov 19, 2018, 4:22:04 PM11/19/18
to Alexandre Rodrigues, google-adm...@googlegroups.com
Hi Alex,

This seems like an implementation related issue rather than an issue with our SDK. I would suggest that you post it on stackoverflow or any other source for further assistance. I can also take a look into this again if you can share a simple sample project with us. You can use "Reply Privately to Author" option.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

        android:id="@+id/publisherAdView&q

Alexandre Rodrigues

unread,
Nov 20, 2018, 8:12:52 AM11/20/18
to mobileadssdk-a...@google.com, google-adm...@googlegroups.com
All right. Solved.

On my mainAcitivty I had the following code:

protected void onPause() {
handler.removeCallbacks(runnable);
new WebView(this).pauseTimers();
super.onPause();
}

The piece  new WebView(this).pauseTimers(); was supposed to help to avoid memoryLeak and CPU high_usage from admob. But the point is that it not only pauses webview from MainActivity but all webview on project. That's why banners were only showing on MainAcitivy.

After commenting
 new WebView(this).pauseTimers() , testBanner on EventActivity is showing correctly.

I just could find this solution because you mentioned this might be a known issue on first answer... then i found this similiar problem below on forum which showed the solution:
https://groups.google.com/forum/#!topic/google-admob-ads-sdk/XIyFgbXW6b8

Thanks for the help, 
Deepika.
I hope my description above might help someone on the future, too.
Alex
Reply all
Reply to author
Forward
0 new messages