audio_service icon indicating copy to clipboard operation
audio_service copied to clipboard

issue with Google Mobile Ads Plugin

Open getmmg opened this issue 4 years ago • 3 comments

Which API doesn't behave as documented, and how does it misbehave? Ads are not showing in the app when the user resumes the app by clicking notification in one isolate beta. No issues observed in the main branch.

Minimal reproduction project https://github.com/getmmg/audioserviceoneisolate

To Reproduce (i.e. user steps, not code) Steps to reproduce the behavior:

  1. Run the project and start playing by click a channel name in one of the 2 queues. Test Ad will show in the bottom.
  2. Press back button and come out of the app.
  3. Open app by clicking notification banners ads will not be shown in bottom.
  4. After resuming if the user navigates to different page it will lead to native crash (Not Implemented in the demo code)

Expected behavior Ads should be shown even when the app is resumed.

Runtime Environment (please complete the following information if relevant): Tested on Pixel 4a running android 12. Oneplus running android 11. Same issue observed in both.

Flutter SDK version

$ flutter doctor
Building flutter tool...
Running pub upgrade...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19042.1110], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] VS Code (version 1.58.2)

getmmg avatar Aug 01 '21 17:08 getmmg

Is the crash you mentioned in audio_service or in the ads plugin?

ryanheise avatar Aug 02 '21 01:08 ryanheise

I am really not sure Its a native crash. This is what I get on the console.

F/libc    (11248): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 11248 (e.oneisolatebeta), pid 11248 (e.oneisolatebeta)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sunfish/sunfish:12/SPB3.210618.016/7566885:user/release-keys'
Revision: 'MP1.0'
ABI: 'arm64'
Timestamp: 2021-08-02 11:00:20.166476571+0530
Process uptime: 0s
Cmdline: com.example.oneisolatebeta
pid: 11248, tid: 11248, name: e.oneisolatebeta  >>> com.example.oneisolatebeta <<<
uid: 10453
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1414)] Check failed: CheckException(env).
'
    x0  0000000000000000  x1  0000000000002bf0  x2  0000000000000006  x3  0000007fe68e1df0
    x4  6d602e6c716e6573  x5  6d602e6c716e6573  x6  6d602e6c716e6573  x7  7f7f7f7f7f7f7f7f
    x8  00000000000000f0  x9  5090ea0842887c6c  x10 0000000000000000  x11 ffffff80fffffbdf
    x12 0000000000000001  x13 0000000000000074  x14 0000007fe68e0ca0  x15 000000000163bdae
    x16 000000793d5e4050  x17 000000793d5c0f40  x18 0000007964430000  x19 0000000000002bf0
    x20 0000000000002bf0  x21 00000000ffffffff  x22 b40000776ab90f30  x23 0000000000000000
    x24 0000000000000000  x25 b4000076dabb15a8  x26 0000000000000438  x27 0000000000000112
    x28 0000000000000437  x29 0000007fe68e1e70
    lr  000000793d573bfc  sp  0000007fe68e1dd0  pc  000000793d573c28  pst 0000000000000000
backtrace:
      #00 pc 000000000004fc28  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: 46141770cd5279da33ae77f03b0b8402)
      #01 pc 000000000131ddc4  /data/app/~~7jBO92DIja21Cw_lFfpQvg==/com.example.oneisolatebeta-t11jiRgwVysXxA_pK148cg==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
      #02 pc 0000000001341a9c  /data/app/~~7jBO92DIja21Cw_lFfpQvg==/com.example.oneisolatebeta-t11jiRgwVysXxA_pK148cg==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
      #03 pc 0000000001326eec  /data/app/~~7jBO92DIja21Cw_lFfpQvg==/com.example.oneisolatebeta-t11jiRgwVysXxA_pK148cg==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
      #04 pc 00000000013880f0  /data/app/~~7jBO92DIja21Cw_lFfpQvg==/com.example.oneisolatebeta-t11jiRgwVysXxA_pK148cg==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
      #05 pc 0000000001387f64  /data/app/~~7jBO92DIja21Cw_lFfpQvg==/com.example.oneisolatebeta-t11jiRgwVysXxA_pK148cg==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
      #06 pc 0000000001378d84  /data/app/~~7jBO92DIja21Cw_lFfpQvg==/com.example.oneisolatebeta-t11jiRgwVysXxA_pK148cg==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
      #07 pc 000000000137968c  /data/app/~~7jBO92DIja21Cw_lFfpQvg==/com.example.oneisolatebeta-t11jiRgwVysXxA_pK148cg==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
      #08 pc 000000000137a01c  /data/app/~~7jBO92DIja21Cw_lFfpQvg==/com.example.oneisolatebeta-t11jiRgwVysXxA_pK148cg==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
      #09 pc 00000000013790f4  /data/app/~~7jBO92DIja21Cw_lFfpQvg==/com.example.oneisolatebeta-t11jiRgwVysXxA_pK148cg==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
      #10 pc 0000000001378ecc  /data/app/~~7jBO92DIja21Cw_lFfpQvg==/com.example.oneisolatebeta-t11jiRgwVysXxA_pK148cg==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
      #11 pc 0000000001383ec8  /data/app/~~7jBO92DIja21Cw_lFfpQvg==/com.example.oneisolatebeta-t11jiRgwVysXxA_pK148cg==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
      #12 pc 0000000001342568  /data/app/~~7jBO92DIja21Cw_lFfpQvg==/com.example.oneisolatebeta-t11jiRgwVysXxA_pK148cg==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
      #13 pc 00000000013476f8  /data/app/~~7jBO92DIja21Cw_lFfpQvg==/com.example.oneisolatebeta-t11jiRgwVysXxA_pK148cg==/lib/arm64/libflutter.so (BuildId: 137d09ab83a412ded1c33ef386351fcc0429a53b)
      #14 pc 000000000001691c  /system/lib64/libutils.so (android::Looper::pollInner(int)+912) (BuildId: a3acb0eba7fd91ea48db6f0befa41c65)
      #15 pc 0000000000016524  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+112) (BuildId: a3acb0eba7fd91ea48db6f0befa41c65)
      #16 pc 0000000000149f4c  /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44) (BuildId: 3c8f3cd6d4750757d47f4e1214ba3624)
      #17 pc 000000000018e3ec  /system/framework/arm64/boot-framework.oat (art_jni_trampoline+108) (BuildId: cb34c4d90f859aac199be4afe6337b4416129944)
      #18 pc 000000000201cb3c  /memfd:jit-cache (deleted) (android.os.MessageQueue.next+204)
      #19 pc 000000000202bf48  /memfd:jit-cache (deleted) (android.os.Looper.loopOnce+168)
      #20 pc 000000000030b1e8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #21 pc 000000000032063c  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+312) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #22 pc 0000000000320158  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1076) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #23 pc 00000000007306e0  /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+1788) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #24 pc 000000000031ad14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #25 pc 000000000043db40  /system/framework/framework.jar
      #26 pc 0000000000730574  /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+1424) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #27 pc 000000000031ad14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #28 pc 00000000001c792a  /system/framework/framework.jar
      #29 pc 000000000037bd70  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.2839948399486253567)+828) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #30 pc 000000000037b0b8  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+1380) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #31 pc 0000000000314978  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #32 pc 000000000030b1e8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #33 pc 000000000039be40  /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+996) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #34 pc 000000000039ba34  /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #35 pc 00000000000a7f74  /apex/com.android.art/javalib/arm64/boot.oat (art_jni_trampoline+132) (BuildId: e53e37b13bd8617ab8bd67751e3b0f6bc9447342)
      #36 pc 000000000030af64  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #37 pc 000000000032068c  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+392) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #38 pc 0000000000320158  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1076) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #39 pc 000000000030809c  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+1880) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #40 pc 000000000031ab94  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #41 pc 0000000000246402  /system/framework/framework.jar
      #42 pc 000000000037bd70  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.2839948399486253567)+828) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #43 pc 000000000037b0b8  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+1380) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #44 pc 0000000000314978  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #45 pc 00000000007cf7d8  /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2232) (BuildId: cb34c4d90f859aac199be4afe6337b4416129944)
      #46 pc 000000000030b1e8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #47 pc 00000000003fa2ac  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+740) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #48 pc 00000000003f9a24  /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+268) (BuildId: 7cdbeb144dfb57d010c2e42e1aea418f)
      #49 pc 00000000000adac4  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120) (BuildId: 3c8f3cd6d4750757d47f4e1214ba3624)
      #50 pc 00000000000b8f48  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+836) (BuildId: 3c8f3cd6d4750757d47f4e1214ba3624)
      #51 pc 000000000000258c  /system/bin/app_process64 (main+1336) (BuildId: 67527276f107025933779e03f9398edd)
      #52 pc 00000000000488ac  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+96) (BuildId: 46141770cd5279da33ae77f03b0b8402)
Lost connection to device.

getmmg avatar Aug 02 '21 05:08 getmmg

That crash looks similar to another one reported for the google ads plugin:

https://github.com/flutter/flutter/issues/76728 https://github.com/googleads/googleads-mobile-flutter/pull/9

So it's likely this is another issue with that plugin. It may be worth submitting a similar issue over there, although keep this one open as well.

ryanheise avatar Aug 02 '21 07:08 ryanheise