MobileAds.initialize doesnt complete even after 30 seconds

496 views
Skip to first unread message

jan...@gmail.com

unread,
Nov 23, 2021, 10:05:54 AM11/23/21
to Google Mobile Ads SDK Developers
Hi!

Since 10 November we have strange initialisation problem in one of our applications.
Problem is when we call MobileAds.initialize and wait for onInitializationComplete.
But it doesn't fire as per documentation. 

I tried to localise what the problem and created test app.
And here are results. After using test admob app id from google website and using this code for initialisation status:

MobileAds.initialize(this, new OnInitializationCompleteListener() {
@Override
public void onInitializationComplete(@NonNull InitializationStatus initializationStatus) {
Log.d(TAG, "onInitializationComplete");
Map<String, AdapterStatus> statusMap = initializationStatus.getAdapterStatusMap();
for (String adapterClass : statusMap.keySet()) {
AdapterStatus status = statusMap.get(adapterClass);
Log.d(TAG, String.format(
"Adapter name: %s, Description: %s, Latency: %d",
adapterClass, status.getDescription(), status.getLatency()));
}
}
});

This is what I get in log with test id:

com.interstitial.test D/MainActivity: onCreate
com.interstitial.test D/MainActivity: onInitializationComplete
com.interstitial.test D/MainActivity: Adapter name: com.google.android.gms.ads.MobileAds, Description: , Latency: 23
com.interstitial.test D/MainActivity: Adapter name: com.google.ads.mediation.vungle.VungleMediationAdapter, Description: Failed to create Adapter., Latency: 0
com.interstitial.test D/MainActivity: Adapter name: com.google.ads.mediation.applovin.AppLovinMediationAdapter, Description: Failed to create Adapter., Latency: 1
com.interstitial.test D/MainActivity: Adapter name: com.google.ads.mediation.adcolony.AdColonyMediationAdapter, Description: Failed to create Adapter., Latency: 2
com.interstitial.test D/MainActivity: Adapter name: com.google.ads.mediation.tapjoy.TapjoyMediationAdapter, Description: Failed to create Adapter., Latency: 0

Then I change to app id where initialisation works:

com.interstitial.test D/MainActivity: onCreate
com.interstitial.test D/MainActivity: onInitializationComplete
com.interstitial.test D/MainActivity: Adapter name: com.google.android.gms.ads.MobileAds, Description: , Latency: 23
com.interstitial.test D/MainActivity: Adapter name: com.google.ads.mediation.facebook.FacebookMediationAdapter, Description: Failed to create Adapter., Latency: 2

And when I try to run the same code with other apps admob id, onInitializationComplete never fires, waited like 5 mins.

Have complete test code with admob app ids if needed I can share.


Mobile Ads SDK Forum Advisor

unread,
Nov 23, 2021, 5:23:52 PM11/23/21
to jan...@gmail.com, google-adm...@googlegroups.com
Hi Jan,

Thank you for bringing this concern to our attention.We would start by asking if you can share with us via the “Reply to author” button. With a simple sample app, along with the steps to replicate this issue. At the same time if you can include any stack traces or Charles logs to help in our investigation. This would be greatly appreciated.

Regards,

Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2RvbXJ:ref

Roman

unread,
Nov 24, 2021, 4:09:12 AM11/24/21
to Google Mobile Ads SDK Developers
Hello Jan,

This is well-know problem that persist for about 2 years already, we're trying to push Admob team to fix it. So far there is no progress.
It would be really beneficial if you'd share a sample code to public. 

Message has been deleted

Mobile Ads SDK Forum Advisor

unread,
Nov 24, 2021, 4:52:08 PM11/24/21
to jan...@gmail.com, google-adm...@googlegroups.com
Hi Jan,

Thank you for the response. In looking over this we see that you have 2 mediation networks. Thus we will need to see how you are incorporating the adapters into your app. For this you can zip the file and send it to us at mobileads...@gmail.com or you can share the file via google files.
Reply all
Reply to author
Forward
0 new messages