How do I determine the reason for a SDK initialization timeout?

905 views
Skip to first unread message

Weasel King

unread,
May 23, 2020, 4:38:25 AM5/23/20
to Google Mobile Ads SDK Developers
Hello,

I am trying out AdMob for the first time and I just wanted to get a test banner ad working in AdMob.  But I am getting stuck on initialization, it keeps timing out.

I cannot figure out how to get more info about why initialization is timing out other than it timed out.  So I don't know how to fix it.  

I look in this forum and on the general web and I couldn't anything helpful.  So any guidance would be appreciated.


Part of my build.gradle


dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.navigation:navigation-fragment:2.2.2'
    implementation 'androidx.navigation:navigation-ui:2.2.2'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    implementation 'com.google.android.gms:play-services-ads:19.1.0'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}


Part of AndroidManifest.xml

        <activity
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-3940256099942544~3347511713"/>
    </application>



I added this to MainActivity.java

  @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // Initialize the AdMob SDK
        Log.i(ADMOB_TAG, "Starting AdMob SDK Initialization");
        MobileAds.initialize(this, new OnInitializationCompleteListener() {
            @Override
            public void onInitializationComplete(InitializationStatus initializationStatus) {
                AdapterStatus status =
                        initializationStatus.getAdapterStatusMap().get("com.google.android.gms.ads.MobileAds");

                Log.i(ADMOB_TAG, "AdMob SDK Initialization Completed with State: " +
                        status.getInitializationState() + "  Description: " +
                        status.getDescription()  +  "  Latency (ms): " + status.getLatency());
            }
        });


Every time this is what I see in the log


2020-05-23 01:15:12.866 2910-2910/com.example.tymobtapp I/AdMob: Starting AdMob SDK Initialization
2020-05-23 01:15:22.971 2910-2910/com.example.tymobtapp I/AdMob: AdMob SDK Initialization Completed with State: NOT_READY  Description: Timeout.  Latency (ms): 10006

I have tried cleaning and rebuilding many times,  Always the same.




I am sure it is something simple, but I cannot tell what to do.  Here is the complete log.

2020-05-23 01:15:11.261 2910-2910/? I/ample.tymobtap: Not late-enabling -Xcheck:jni (already on)
2020-05-23 01:15:11.313 2910-2910/? E/ample.tymobtap: Unknown bits set in runtime_flags: 0x8000
2020-05-23 01:15:11.314 2910-2910/? W/ample.tymobtap: Unexpected CPU variant for X86 using defaults: x86
2020-05-23 01:15:12.139 2910-2954/com.example.tymobtapp D/libEGL: Emulator has host GPU support, qemu.gles is set to 1.
2020-05-23 01:15:12.135 2910-2910/com.example.tymobtapp W/RenderThread: type=1400 audit(0.0:167): avc: denied { write } for name="property_service" dev="tmpfs" ino=7074 scontext=u:r:untrusted_app:s0:c133,c256,c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0 app=com.example.tymobtapp
2020-05-23 01:15:12.139 2910-2954/com.example.tymobtapp W/libc: Unable to set property "qemu.gles" to "1": connection failed; errno=13 (Permission denied)
2020-05-23 01:15:12.260 2910-2954/com.example.tymobtapp D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so
2020-05-23 01:15:12.261 2910-2954/com.example.tymobtapp D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so
2020-05-23 01:15:12.283 2910-2954/com.example.tymobtapp D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so
2020-05-23 01:15:12.404 2910-2949/com.example.tymobtapp W/ample.tymobtap: Unsupported class loader
2020-05-23 01:15:12.409 2910-2910/com.example.tymobtapp W/ample.tymobtap: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
2020-05-23 01:15:12.411 2910-2910/com.example.tymobtapp W/ample.tymobtap: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
2020-05-23 01:15:12.418 2910-2958/com.example.tymobtapp W/DynamiteModule: Local module descriptor class for com.google.android.gms.measurement.dynamite not found.
2020-05-23 01:15:12.420 2910-2949/com.example.tymobtapp I/DynamiteModule: Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:21001
2020-05-23 01:15:12.420 2910-2949/com.example.tymobtapp I/DynamiteModule: Selected remote version of com.google.android.gms.ads.dynamite, version >= 21001
2020-05-23 01:15:12.421 2910-2949/com.example.tymobtapp V/DynamiteModule: Dynamite loader version >= 2, using loadModule2NoCrashUtils
2020-05-23 01:15:12.422 2910-2958/com.example.tymobtapp I/DynamiteModule: Considering local module com.google.android.gms.measurement.dynamite:0 and remote module com.google.android.gms.measurement.dynamite:11
2020-05-23 01:15:12.423 2910-2958/com.example.tymobtapp I/DynamiteModule: Selected remote version of com.google.android.gms.measurement.dynamite, version >= 11
2020-05-23 01:15:12.423 2910-2958/com.example.tymobtapp V/DynamiteModule: Dynamite loader version >= 2, using loadModule2NoCrashUtils
2020-05-23 01:15:12.495 2910-2949/com.example.tymobtapp W/ample.tymobtap: Unsupported class loader
2020-05-23 01:15:12.498 2910-2949/com.example.tymobtapp W/ample.tymobtap: Skipping duplicate class check due to unsupported classloader
2020-05-23 01:15:12.514 2910-2958/com.example.tymobtapp W/ample.tymobtap: Unsupported class loader
2020-05-23 01:15:12.541 2910-2958/com.example.tymobtapp W/ample.tymobtap: Skipping duplicate class check due to unsupported classloader
2020-05-23 01:15:12.615 2910-2958/com.example.tymobtapp W/DynamiteModule: Local module descriptor class for com.google.android.gms.measurement.dynamite not found.
2020-05-23 01:15:12.733 2910-2961/com.example.tymobtapp I/FA-Ads: App measurement initialized, version: 22013
2020-05-23 01:15:12.733 2910-2961/com.example.tymobtapp I/FA-Ads: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
2020-05-23 01:15:12.866 2910-2910/com.example.tymobtapp I/AdMob: Starting AdMob SDK Initialization
2020-05-23 01:15:12.943 2910-2910/com.example.tymobtapp W/ample.tymobtap: Accessing hidden method Lsun/misc/Unsafe;->getUnsafe()Lsun/misc/Unsafe; (greylist,core-platform-api, linking, allowed)
2020-05-23 01:15:12.943 2910-2910/com.example.tymobtapp W/ample.tymobtap: Accessing hidden method Lsun/misc/Unsafe;->objectFieldOffset(Ljava/lang/reflect/Field;)J (greylist,core-platform-api, linking, allowed)
2020-05-23 01:15:12.943 2910-2910/com.example.tymobtapp W/ample.tymobtap: Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
2020-05-23 01:15:12.943 2910-2910/com.example.tymobtapp W/ample.tymobtap: Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
2020-05-23 01:15:12.948 2910-2962/com.example.tymobtapp D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2020-05-23 01:15:13.005 2910-2910/com.example.tymobtapp I/WebViewFactory: Loading com.google.android.webview version 74.0.3729.185 (code 373018518)
2020-05-23 01:15:13.007 2910-2910/com.example.tymobtapp I/ample.tymobtap: The ClassLoaderContext is a special shared library.
2020-05-23 01:15:13.010 2910-2910/com.example.tymobtapp I/ample.tymobtap: The ClassLoaderContext is a special shared library.
2020-05-23 01:15:13.047 2910-2910/com.example.tymobtapp I/cr_LibraryLoader: Time to load native libraries: 5 ms (timestamps 8056-8061)
2020-05-23 01:15:13.056 2910-2910/com.example.tymobtapp I/chromium: [INFO:library_loader_hooks.cc(50)] Chromium logging enabled: level = 0, default verbosity = 0
2020-05-23 01:15:13.056 2910-2910/com.example.tymobtapp I/cr_LibraryLoader: Expected native library version number "74.0.3729.185", actual native library version number "74.0.3729.185"
2020-05-23 01:15:13.071 2910-2975/com.example.tymobtapp W/cr_ChildProcLH: Create a new ChildConnectionAllocator with package name = com.google.android.webview, sandboxed = true
2020-05-23 01:15:13.075 2910-2975/com.example.tymobtapp W/ample.tymobtap: Accessing hidden method Landroid/content/Context;->bindServiceAsUser(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/Handler;Landroid/os/UserHandle;)Z (greylist, reflection, allowed)
2020-05-23 01:15:13.083 2910-2910/com.example.tymobtapp I/cr_BrowserStartup: Initializing chromium process, singleProcess=false
2020-05-23 01:15:13.332 2910-2910/com.example.tymobtapp W/ample.tymobtap: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V (greylist, reflection, allowed)
2020-05-23 01:15:13.332 2910-2910/com.example.tymobtapp W/ample.tymobtap: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V (greylist, reflection, allowed)
2020-05-23 01:15:13.332 2910-2910/com.example.tymobtapp W/ample.tymobtap: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
2020-05-23 01:15:13.332 2910-2910/com.example.tymobtapp W/ample.tymobtap: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
2020-05-23 01:15:13.333 2910-2910/com.example.tymobtapp W/ample.tymobtap: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
2020-05-23 01:15:13.333 2910-2910/com.example.tymobtapp W/ample.tymobtap: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
2020-05-23 01:15:13.333 2910-2910/com.example.tymobtapp W/ample.tymobtap: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
2020-05-23 01:15:13.333 2910-2910/com.example.tymobtapp W/ample.tymobtap: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
2020-05-23 01:15:13.390 2910-3025/com.example.tymobtapp W/cr_media: Requires BLUETOOTH permission
2020-05-23 01:15:13.410 2910-3041/com.example.tymobtapp D/HostConnection: HostConnection::get() New Host Connection established 0xc233dbe0, tid 3041
2020-05-23 01:15:13.425 2910-3041/com.example.tymobtapp D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
2020-05-23 01:15:13.433 2910-3041/com.example.tymobtapp D/EGL_emulation: eglCreateContext: 0xe1d0d480: maj 3 min 0 rcv 3
2020-05-23 01:15:13.433 2910-3041/com.example.tymobtapp D/EGL_emulation: eglMakeCurrent: 0xe1d0d480: ver 3 0 (tinfo 0xc281cc40)
2020-05-23 01:15:13.440 2910-3018/com.example.tymobtapp E/chromium: [ERROR:socket_posix.cc(94)] CreatePlatformSocket() failed: Operation not permitted (1)
2020-05-23 01:15:13.440 2910-3018/com.example.tymobtapp E/chromium: [ERROR:socket_posix.cc(94)] CreatePlatformSocket() failed: Operation not permitted (1)
2020-05-23 01:15:13.478 2910-2961/com.example.tymobtapp I/FA-Ads: Tag Manager is not found and thus will not be used
2020-05-23 01:15:13.480 2910-3041/com.example.tymobtapp I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
2020-05-23 01:15:13.484 2910-3041/com.example.tymobtapp W/cr_MediaCodecUtil: HW encoder for video/avc is not available on this device.
2020-05-23 01:15:13.562 2910-2924/com.example.tymobtapp I/ample.tymobtap: NativeAlloc concurrent copying GC freed 3880(321KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3064KB/6128KB, paused 781us total 103.595ms
2020-05-23 01:15:13.585 2910-3041/com.example.tymobtapp D/EGL_emulation: eglCreateContext: 0xed07e6e0: maj 3 min 0 rcv 3
2020-05-23 01:15:13.585 2910-3041/com.example.tymobtapp D/EGL_emulation: eglMakeCurrent: 0xed07e6e0: ver 3 0 (tinfo 0xc281cc40)
2020-05-23 01:15:13.593 2910-2950/com.example.tymobtapp D/HostConnection: HostConnection::get() New Host Connection established 0xd9c57190, tid 2950
2020-05-23 01:15:13.599 2910-3041/com.example.tymobtapp E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef
2020-05-23 01:15:13.599 2910-3041/com.example.tymobtapp E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef
2020-05-23 01:15:13.620 2910-2950/com.example.tymobtapp D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
2020-05-23 01:15:13.620 2910-2950/com.example.tymobtapp W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2020-05-23 01:15:13.642 2910-2950/com.example.tymobtapp D/EGL_emulation: eglCreateContext: 0xd9c1a120: maj 3 min 0 rcv 3
2020-05-23 01:15:13.644 2910-2950/com.example.tymobtapp D/EGL_emulation: eglMakeCurrent: 0xd9c1a120: ver 3 0 (tinfo 0xd9c0fa10)
2020-05-23 01:15:13.667 2910-2950/com.example.tymobtapp W/Gralloc3: mapper 3.x is not supported
2020-05-23 01:15:13.677 2910-2950/com.example.tymobtapp D/HostConnection: createUnique: call
2020-05-23 01:15:13.677 2910-2950/com.example.tymobtapp D/HostConnection: HostConnection::get() New Host Connection established 0xd9c586d0, tid 2950
2020-05-23 01:15:13.691 2910-2950/com.example.tymobtapp D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
2020-05-23 01:15:13.787 2910-2950/com.example.tymobtapp D/eglCodecCommon: allocate: Ask for block of size 0x1000
2020-05-23 01:15:13.787 2910-2950/com.example.tymobtapp D/eglCodecCommon: allocate: ioctl allocate returned offset 0x3fefa6000 size 0x2000
2020-05-23 01:15:13.793 2910-3041/com.example.tymobtapp E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef
2020-05-23 01:15:13.794 2910-3041/com.example.tymobtapp E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef
2020-05-23 01:15:13.830 2910-2950/com.example.tymobtapp D/EGL_emulation: eglMakeCurrent: 0xd9c1a120: ver 3 0 (tinfo 0xd9c0fa10)
2020-05-23 01:15:22.969 2910-2969/com.example.tymobtapp W/ample.tymobtap: Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
2020-05-23 01:15:22.971 2910-2910/com.example.tymobtapp I/AdMob: AdMob SDK Initialization Completed with State: NOT_READY  Description: Timeout.  Latency (ms): 10006
2020-05-23 01:15:24.011 2910-3041/com.example.tymobtapp D/EGL_emulation: eglMakeCurrent: 0xed07e6e0: ver 3 0 (tinfo 0xc281cc40)
2020-05-23 01:16:19.087 2910-2923/com.example.tymobtapp I/ample.tymobtap: System.exit called, status: 1
2020-05-23 01:16:19.088 2910-2923/com.example.tymobtapp I/AndroidRuntime: VM exiting with result code 1, cleanup skipped.

Mobile Ads SDK Forum Advisor Prod

unread,
May 25, 2020, 9:16:40 PM5/25/20
to bluewea...@gmail.com, google-adm...@googlegroups.com

Hi there,

 

Thank you for reaching out to us.

 

Could you kindly provide the details below (via Reply privately to author) so that I can investigate the issue?

  • Copy of a sample project (reproducing the issue)
  • Steps to replicate the issue

 

Regards,

Ziv Yves Sanchez

Mobile Ads SDK Team



ref:_00D1U1174p._5004Q1zrUva:ref
Reply all
Reply to author
Forward
0 new messages