kmcgill88 / admob_flutter

Admob Flutter plugin that shows banner ads using native platform views.
https://pub.dartlang.org/packages/admob_flutter
ISC License
435 stars 153 forks source link

Audio cause app crashed on ad load()? #277

Open codetinker opened 3 years ago

codetinker commented 3 years ago

Currently only crashed on AVD: Nexus 6P API 30 (Android 11.0) Works on other devices and android version. crashed on xxx.load()

** logs ** I/WebViewFactory( 4524): Loading com.google.android.webview version 83.0.4103.106 (code 410410681) I/e.android.ap( 4524): The ClassLoaderContext is a special shared library. D/nativeloader( 4524): classloader namespace configured for unbundled product apk. library_path=/product/app/WebViewGoogle/lib/x86:/product/app/WebViewGoogle/WebViewGoogle.apk!/lib/x86:/product/app/TrichromeLibrary/TrichromeLibrary.apk!/lib/x86:/product/lib:/system/product/lib I/e.android.ap( 4524): The ClassLoaderContext is a special shared library. D/nativeloader( 4524): classloader namespace configured for unbundled product apk. library_path=/product/app/WebViewGoogle/lib/x86:/product/app/WebViewGoogle/WebViewGoogle.apk!/lib/x86:/product/app/TrichromeLibrary/TrichromeLibrary.apk!/lib/x86:/product/lib:/system/product/lib I/cr_LibraryLoader( 4524): Loaded native library version number "83.0.4103.106" I/cr_CachingUmaRecorder( 4524): Flushed 3 samples from 3 histograms. I/DynamiteModule( 4524): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:21400 I/DynamiteModule( 4524): Selected remote version of com.google.android.gms.ads.dynamite, version >= 21400 V/DynamiteModule( 4524): Dynamite loader version >= 2, using loadModule2NoCrashUtils W/e.android.ap( 4524): Accessing hidden method Landroid/content/Context;->getFeatureId()Ljava/lang/String; (greylist, reflection, allowed) D/zzfc ( 4524): File /data/user/0/com.domain.app/cache/1610724645094.dex not found. No need for deletion I/DynamiteModule( 4524): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:21400 I/DynamiteModule( 4524): Selected remote version of com.google.android.gms.ads.dynamite, version >= 21400 V/DynamiteModule( 4524): Dynamite loader version >= 2, using loadModule2NoCrashUtils I/Ads ( 4524): This request is sent from a test device. I/e.android.ap( 4524): Background young concurrent copying GC freed 18209(1694KB) AllocSpace objects, 10(260KB) LOS objects, 27% free, 3999KB/5495KB, paused 1.106ms total 197.779ms W/e.android.ap( 4524): Long monitor contention with owner gads-1 (4750) at void com.google.android.gms.internal.ads.zzfp.zzcx()(com.google.android.gms:play-services-ads@@19.8.0:45) waiters=0 in void com.google.android.gms.internal.ads.zzfp.zzcx() for 617ms W/Ads ( 4524): Not retrying to fetch app settings E/chromium( 4524): [ERROR:cookie_manager.cc(137)] Strict Secure Cookie policy does not allow setting a secure cookie for http://googleads.g.doubleclick.net/ for apps targeting >= R. Please either use the 'https:' scheme for this URL or omit the 'Secure' directive in the cookie value. E/chromium( 4524): [ERROR:cookie_manager.cc(137)] Strict Secure Cookie policy does not allow setting a secure cookie for http://googleads.g.doubleclick.net/ for apps targeting >= R. Please either use the 'https:' scheme for this URL or omit the 'Secure' directive in the cookie value. W/e.android.ap( 4524): Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (greylist, reflection, allowed) W/cr_media( 4524): Requires BLUETOOTH permission D/HostConnection( 4524): HostConnection::get() New Host Connection established 0xe9eb86a0, tid 4908 D/HostConnection( 4524): 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_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2 E/chromium( 4524): [ERROR:gl_surface_egl.cc(549)] eglChooseConfig failed with error EGL_SUCCESS D/EGL_emulation( 4524): eglCreateContext: 0xe9eb8f60: maj 2 min 0 rcv 2 D/EGL_emulation( 4524): eglMakeCurrent: 0xe9eb8f60: ver 2 0 (tinfo 0xa4b33010) (first time) E/chromium( 4524): [ERROR:gl_surface_egl.cc(549)] eglChooseConfig failed with error EGL_SUCCESS W/chromium( 4524): [WARNING:simple_index_file.cc(543)] Corrupt Simple Index File. I/VideoCapabilities( 4524): Unsupported profile 4 for video/mp4v-es W/cr_MediaCodecUtil( 4524): HW encoder for video/avc is not available on this device. D/EGL_emulation( 4524): eglCreateContext: 0xa419d5f0: maj 2 min 0 rcv 2 W/chromium( 4524): [WARNING:simple_index_file.cc(543)] Corrupt Simple Index File. I/Choreographer( 4524): Skipped 35 frames! The application may be doing too much work on its main thread. I/e.android.ap( 4524): Background young concurrent copying GC freed 13991(943KB) AllocSpace objects, 20(2132KB) LOS objects, 23% free, 5716KB/7480KB, paused 3ms total 100.446ms I/e.android.ap( 4524): Background concurrent copying GC freed 23675(1171KB) AllocSpace objects, 15(1392KB) LOS objects, 49% free, 4962KB/9925KB, paused 1.829ms total 274.774ms W/e.android.ap( 4524): Accessing hidden method Landroid/media/AudioTrack;->getLatency()I (greylist, reflection, allowed) I/ExoPlayerImpl( 4524): Init ExoPlayerLib/2.4.2 [generic_x86_arm, sdk_gphone_x86_arm, Google, 30] D/MetadataUtil( 4524): Skipped unknown metadata entry: gsst D/MetadataUtil( 4524): Skipped unknown metadata entry: gstd D/CCodec ( 4524): allocate(c2.android.aac.decoder) I/Codec2Client( 4524): Available Codec2 services: "software" I/CCodec ( 4524): Created component [c2.android.aac.decoder] D/CCodecConfig( 4524): read media type: audio/mp4a-latm D/ReflectedParamUpdater( 4524): extent() != 1 for single value type: algo.buffers.max-count.values D/ReflectedParamUpdater( 4524): extent() != 1 for single value type: output.subscribed-indices.values D/ReflectedParamUpdater( 4524): extent() != 1 for single value type: input.buffers.allocator-ids.values D/ReflectedParamUpdater( 4524): extent() != 1 for single value type: output.buffers.allocator-ids.values D/ReflectedParamUpdater( 4524): extent() != 1 for single value type: algo.buffers.allocator-ids.values D/ReflectedParamUpdater( 4524): extent() != 1 for single value type: output.buffers.pool-ids.values D/ReflectedParamUpdater( 4524): extent() != 1 for single value type: algo.buffers.pool-ids.values I/CCodecConfig( 4524): query failed after returning 19 values (BAD_INDEX) D/CCodecConfig( 4524): c2 config diff is Dict { D/CCodecConfig( 4524): c2::u32 coded.aac-packaging.value = 0 D/CCodecConfig( 4524): c2::u32 coded.bitrate.value = 64000 D/CCodecConfig( 4524): c2::u32 coded.pl.level = 0 D/CCodecConfig( 4524): c2::u32 coded.pl.profile = 8192 D/CCodecConfig( 4524): c2::i32 coding.drc.album-mode.value = 0 D/CCodecConfig( 4524): c2::float coding.drc.attenuation-factor.value = 1 D/CCodecConfig( 4524): c2::float coding.drc.boost-factor.value = 1 D/CCodecConfig( 4524): c2::i32 coding.drc.compression-mode.value = 3 D/CCodecConfig( 4524): c2::i32 coding.drc.effect-type.value = 3 D/CCodecConfig( 4524): c2::float coding.drc.encoded-level.value = 0.25 D/CCodecConfig( 4524): c2::float coding.drc.reference-level.value = -16 D/CCodecConfig( 4524): c2::u32 input.buffers.max-size.value = 8192 D/CCodecConfig( 4524): c2::u32 input.delay.value = 0 D/CCodecConfig( 4524): string input.media-type.value = "audio/mp4a-latm" D/CCodecConfig( 4524): c2::u32 output.delay.value = 2 D/CCodecConfig( 4524): c2::float output.drc.output-loudness.value = 0.25 D/CCodecConfig( 4524): string output.media-type.value = "audio/raw" D/CCodecConfig( 4524): c2::u32 raw.channel-count.value = 1 D/CCodecConfig( 4524): c2::u32 raw.max-channel-count.value = 8 D/CCodecConfig( 4524): c2::u32 raw.sample-rate.value = 44100 D/CCodecConfig( 4524): } D/CCodec ( 4524): [c2.android.aac.decoder] buffers are bound to CCodec for this session D/CCodecConfig( 4524): no c2 equivalents for language D/CCodecConfig( 4524): no c2 equivalents for flags D/CCodecConfig( 4524): config failed => CORRUPTED D/CCodecConfig( 4524): c2 config diff is c2::u32 raw.channel-count.value = 2 W/Codec2Client( 4524): query -- param skipped: index = 1107298332. D/CCodec ( 4524): client requested max input size 629, which is smaller than what component recommended (8192); overriding with component recommendation. W/CCodec ( 4524): This behavior is subject to change. It is recommended that app developers double check whether the requested max input size is in reasonable range. D/CCodec ( 4524): setup formats input: AMessage(what = 0x00000000) = { D/CCodec ( 4524): int32_t aac-drc-album-mode = 0 D/CCodec ( 4524): int32_t aac-drc-boost-level = 127 D/CCodec ( 4524): int32_t aac-drc-cut-level = 127 D/CCodec ( 4524): int32_t aac-drc-effect-type = 3 D/CCodec ( 4524): int32_t aac-drc-heavy-compression = 3 D/CCodec ( 4524): int32_t aac-encoded-target-level = -1 D/CCodec ( 4524): int32_t aac-max-output-channel_count = 8 D/CCodec ( 4524): int32_t aac-target-ref-level = 64 D/CCodec ( 4524): int32_t channel-count = 2 D/CCodec ( 4524): int32_t level = 0 D/CCodec ( 4524): int32_t max-input-size = 8192 D/CCodec ( 4524): string mime = "audio/mp4a-latm" D/CCodec ( 4524): int32_t profile = 2 D/CCodec ( 4524): int32_t sample-rate = 44100 D/CCodec ( 4524): } and output: AMessage(what = 0x00000000) = { D/CCodec ( 4524): int32_t aac-drc-album-mode = 0 D/CCodec ( 4524): int32_t aac-drc-boost-level = 127 D/CCodec ( 4524): int32_t aac-drc-cut-level = 127 D/CCodec ( 4524): int32_t aac-drc-effect-type = 3 D/CCodec ( 4524): int32_t aac-drc-heavy-compression = 3 D/CCodec ( 4524): int32_t aac-drc-output-loudness = -1 D/CCodec ( 4524): int32_t aac-encoded-target-level = -1 D/CCodec ( 4524): int32_t aac-max-output-channel_count = 8 D/CCodec ( 4524): int32_t aac-target-ref-level = 64 D/CCodec ( 4524): int32_t channel-count = 2 D/CCodec ( 4524): string mime = "audio/raw" D/CCodec ( 4524): int32_t sample-rate = 44100 D/CCodec ( 4524): } W/Codec2Client( 4524): query -- param skipped: index = 1342179345. W/Codec2Client( 4524): query -- param skipped: index = 2415921170. W/Codec2Client( 4524): query -- param skipped: index = 1610614798. E/FMQ ( 4524): grantorIdx must be less than 3 E/FMQ ( 4524): grantorIdx must be less than 3 D/CCodecBufferChannel( 4524): [c2.android.aac.decoder#824] Created input block pool with allocatorID 16 => poolID 17 - OK (0) I/CCodecBufferChannel( 4524): [c2.android.aac.decoder#824] Created output block pool with allocatorID 16 => poolID 26 - OK D/CCodecBufferChannel( 4524): [c2.android.aac.decoder#824] Configured output block pool ids 26 => OK E/ion ( 4524): ioctl c0044901 failed with code -1: Inappropriate ioctl for device E/FMQ ( 4524): grantorIdx must be less than 3 E/FMQ ( 4524): grantorIdx must be less than 3 D/CCodecConfig( 4524): c2 config diff is c2::i32 coding.drc.compression-mode.value = 1 D/CCodecBuffers( 4524): [c2.android.aac.decoder#824:Output[N]] popFromStashAndRegister: output format changed to AMessage(what = 0x00000000) = { D/CCodecBuffers( 4524): int32_t aac-drc-album-mode = 0 D/CCodecBuffers( 4524): int32_t aac-drc-boost-level = 127 D/CCodecBuffers( 4524): int32_t aac-drc-cut-level = 127 D/CCodecBuffers( 4524): int32_t aac-drc-effect-type = 3 D/CCodecBuffers( 4524): int32_t aac-drc-heavy-compression = 1 D/CCodecBuffers( 4524): int32_t aac-drc-output-loudness = -1 D/CCodecBuffers( 4524): int32_t aac-encoded-target-level = -1 D/CCodecBuffers( 4524): int32_t aac-max-output-channel_count = 8 D/CCodecBuffers( 4524): int32_t aac-target-ref-level = 64 D/CCodecBuffers( 4524): int32_t channel-count = 2 D/CCodecBuffers( 4524): string mime = "audio/raw" D/CCodecBuffers( 4524): int32_t sample-rate = 44100 D/CCodecBuffers( 4524): } I/OMXClient( 4524): IOmx service obtained D/HostConnection( 4524): HostConnection::get() New Host Connection established 0xa41973f0, tid 4958 D/HostConnection( 4524): 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_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2 D/EGL_emulation( 4524): eglCreateContext: 0xa419df90: maj 2 min 0 rcv 2 D/EGL_emulation( 4524): eglMakeCurrent: 0xa419df90: ver 2 0 (tinfo 0xa4b3a810) (first time) E/EGL_emulation( 4524): eglQueryContext 32c0 EGL_BAD_ATTRIBUTE E/EGL_emulation( 4524): tid 4958: eglQueryContext(2019): error 0x3004 (EGL_BAD_ATTRIBUTE) D/SurfaceUtils( 4524): connecting to surface 0xe46dac48, reason connectToSurface I/MediaCodec( 4524): [OMX.android.goldfish.h264.decoder] setting surface generation to 4632577 D/SurfaceUtils( 4524): disconnecting from surface 0xe46dac48, reason connectToSurface(reconnect) D/SurfaceUtils( 4524): connecting to surface 0xe46dac48, reason connectToSurface(reconnect) E/ACodec ( 4524): [OMX.android.goldfish.h264.decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010 D/SurfaceUtils( 4524): disconnecting from surface 0xe46dac48, reason setNativeWindowSizeFormatAndUsage D/SurfaceUtils( 4524): connecting to surface 0xe46dac48, reason setNativeWindowSizeFormatAndUsage D/SurfaceUtils( 4524): set up nativeWindow 0xe46dac48 for 1280x720, color 0x13, rotation 0, usage 0x1002900 W/Gralloc4( 4524): allocator 3.x is not supported W/AudioTrack( 4524): Use of stream types is deprecated for operations other than volume control W/AudioTrack( 4524): See the documentation of AudioTrack() for what to use instead with android.media.AudioAttributes to qualify your playback use case Lost connection to device.

codetinker commented 3 years ago

On phone Vivo s1pro, it does crashed. but show some errors:

*** logs ** D/DynamitePackage(26831): Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl I/Ads (26831): Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("D0A6CC508018EF677C809F812610F75B")) to get test ads on this device. W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed) W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed) W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed) W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed) W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)I/AudioManager(26831): In isSpeakerphoneOn(), calling application: com.android.app W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed) W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed) W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed) W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed) I/Ads (26831): Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("D0A6CC508018EF677C809F812610F75B")) to get test ads on this device. W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed) W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed) W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed) W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed) W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed) I/AudioManager(26831): In isSpeakerphoneOn(), calling application: com.android.app W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed) W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed) W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)W/e.android.ap(26831): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed) W/Ads (26831): Not retrying to fetch app settings E/NetdClient(26831): querySockNetidForUid nid:0, uid:10438, command.cmdId:11, id:0 D/NetdClient(26831): netdClientConnect netId:0, uid:10438, nid:0, addr:2001:4860:4860::8888, lan:0, localhost:0, sa_family:10, sockfd:209, thread:NetworkService E/NetdClient(26831): querySockNetidForUid nid:0, uid:10438, command.cmdId:11, id:0 D/NetdClient(26831): netdClientConnect netId:0, uid:10438, nid:0, addr:0.0.0.0, lan:0, localhost:0, sa_family:2, sockfd:209, thread:NetworkService E/NetdClient(26831): querySockNetidForUid nid:0, uid:10438, command.cmdId:11, id:0 D/NetdClient(26831): netdClientConnect netId:0, uid:10438, nid:0, addr:::, lan:0, localhost:0, sa_family:10, sockfd:209, thread:NetworkService I/Ads (26831): Ad failed to load : 0 I/Ads (26831): Ad failed to load : 0

codetinker commented 3 years ago

I tested on few other new and old phones. All working okay. Except 2 phones tested above.