quick_actions not working
Which API doesn't behave as documented, and how does it misbehave?
quick_actions not working when the activity is com.ryanheise.audioservice.AudioServiceActivity
Minimal reproduction project https://github.com/nt4f04unds-archive/issues/tree/audio_service_671 (clone command in readme)
To Reproduce (i.e. user steps, not code)
- add
com.ryanheise.audioservice.AudioServiceActivity - observe on fisrt launch from actions app doesn't load, nor the action fires, when you pause the activity, it throws
- if you try again opening it with action, it will crash with logs below
Error messages
1. when after the first opening with action you go to home (pause the activity), it throws this, but not crashes
E/FlutterEngineCxnRegstry( 9737): Attempted to notify ActivityAware plugins of onUserLeaveHint, but no Activity was attached.
W/FlutterJNI( 9737): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter/lifecycle. Response ID: 0
E/SurfaceView( 9737): Exception configuring surface
E/SurfaceView( 9737): java.lang.RuntimeException: Cannot execute operation because FlutterJNI is not attached to native.
E/SurfaceView( 9737): at io.flutter.embedding.engine.FlutterJNI.ensureAttachedToNative(FlutterJNI.java:386)
E/SurfaceView( 9737): at io.flutter.embedding.engine.FlutterJNI.onSurfaceDestroyed(FlutterJNI.java:496)
E/SurfaceView( 9737): at io.flutter.embedding.engine.renderer.FlutterRenderer.stopRenderingToSurface(FlutterRenderer.java:224)
E/SurfaceView( 9737): at io.flutter.embedding.android.FlutterSurfaceView.disconnectSurfaceFromRenderer(FlutterSurfaceView.java:283)
E/SurfaceView( 9737): at io.flutter.embedding.android.FlutterSurfaceView.access$400(FlutterSurfaceView.java:35)
E/SurfaceView( 9737): at io.flutter.embedding.android.FlutterSurfaceView$1.surfaceDestroyed(FlutterSurfaceView.java:73)
E/SurfaceView( 9737): at android.view.SurfaceView.updateSurface(SurfaceView.java:650)
E/SurfaceView( 9737): at android.view.SurfaceView.windowStopped(SurfaceView.java:223)
E/SurfaceView( 9737): at android.view.ViewRootImpl.setWindowStopped(ViewRootImpl.java:1407)
E/SurfaceView( 9737): at android.view.WindowManagerGlobal.setStoppedState(WindowManagerGlobal.java:656)
E/SurfaceView( 9737): at android.app.Activity.performStop(Activity.java:7481)
E/SurfaceView( 9737): at android.app.ActivityThread.callActivityOnStop(ActivityThread.java:4200)
E/SurfaceView( 9737): at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4178)
E/SurfaceView( 9737): at android.app.ActivityThread.handleStopActivity(ActivityThread.java:4253)
E/SurfaceView( 9737): at android.app.servertransaction.StopActivityItem.execute(StopActivityItem.java:41)
E/SurfaceView( 9737): at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
E/SurfaceView( 9737): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
E/SurfaceView( 9737): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
E/SurfaceView( 9737): at android.os.Handler.dispatchMessage(Handler.java:106)
E/SurfaceView( 9737): at android.os.Looper.loop(Looper.java:201)
E/SurfaceView( 9737): at android.app.ActivityThread.main(ActivityThread.java:6810)
E/SurfaceView( 9737): at java.lang.reflect.Method.invoke(Native Method)
E/SurfaceView( 9737): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
E/SurfaceView( 9737): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
W/FlutterJNI( 9737): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter/lifecycle. Response ID: 0
E/FlutterEngineCxnRegstry( 9737): Attempted to notify ActivityAware plugins of onSaveInstanceState, but no Activity was attached.
2. on the second run with action it crashes with this
E/AndroidRuntime(10435): FATAL EXCEPTION: main
E/AndroidRuntime(10435): Process: com.example.audio_service_662, PID: 10435
E/AndroidRuntime(10435): java.lang.RuntimeException: Unable to destroy activity {com.example.audio_service_662/com.ryanheise.audioservice.AudioServiceActivity}: java.lang.RuntimeException: Cannot execute operation because FlutterJNI is not attached to native.
E/AndroidRuntime(10435): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4521)
E/AndroidRuntime(10435): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4539)
E/AndroidRuntime(10435): at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:39)
E/AndroidRuntime(10435): at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
E/AndroidRuntime(10435): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
E/AndroidRuntime(10435): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
E/AndroidRuntime(10435): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(10435): at android.os.Looper.loop(Looper.java:201)
E/AndroidRuntime(10435): at android.app.ActivityThread.main(ActivityThread.java:6810)
E/AndroidRuntime(10435): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(10435): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
E/AndroidRuntime(10435): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
E/AndroidRuntime(10435): Caused by: java.lang.RuntimeException: Cannot execute operation because FlutterJNI is not attached to native.
E/AndroidRuntime(10435): at io.flutter.embedding.engine.FlutterJNI.ensureAttachedToNative(FlutterJNI.java:386)
E/AndroidRuntime(10435): at io.flutter.embedding.engine.FlutterJNI.onSurfaceDestroyed(FlutterJNI.java:496)
E/AndroidRuntime(10435): at io.flutter.embedding.engine.renderer.FlutterRenderer.stopRenderingToSurface(FlutterRenderer.java:224)
E/AndroidRuntime(10435): at io.flutter.embedding.android.FlutterView.detachFromFlutterEngine(FlutterView.java:993)
E/AndroidRuntime(10435): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onDestroyView(FlutterActivityAndFragmentDelegate.java:492)
E/AndroidRuntime(10435): at io.flutter.embedding.android.FlutterActivity.release(FlutterActivity.java:594)
E/AndroidRuntime(10435): at io.flutter.embedding.android.FlutterActivity.onDestroy(FlutterActivity.java:616)
E/AndroidRuntime(10435): at android.app.Activity.performDestroy(Activity.java:7524)
E/AndroidRuntime(10435): at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1307)
E/AndroidRuntime(10435): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4506)
E/AndroidRuntime(10435): ... 11 more
Expected behavior quick_actions should not break
Screenshots n/a
Runtime Environment (please complete the following information if relevant): android
Flutter SDK version
flutter doctor -v
[✓] Flutter (Channel sweyer, 2.2.0-11.0.pre.158, on Microsoft Windows [Version 10.0.19041.928], locale ru-RU)
• Flutter version 2.2.0-11.0.pre.158 at c:\dev\src\flutter
• Upstream repository [email protected]:nt4f04und/flutter.git
• Framework revision 1a5a05b7ae (2 weeks ago), 2021-04-06 05:14:02 +0800
• Engine revision e3832e14b4
• Dart version 2.14.0 (build 2.14.0-8.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\Users\danya\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.7)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.7.30621.155
• Windows 10 SDK version 10.0.19041.0
[✓] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[✓] IntelliJ IDEA Community Edition (version 2020.3)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.3
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.55.2)
• VS Code at C:\Users\danya\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.21.0
[✓] Connected device (4 available)
• Redmi Note 5 (mobile) • 40c9f14 • android-arm64 • Android 9 (API 28)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19041.928]
• Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.128
• Edge (web) • edge • web-javascript • Microsoft Edge 89.0.774.77
• No issues found!
Additional context no
I'm not too familiar with quick_actions. I also notice you're using the commit before I removed the audio_service bug logs. Can you include those in the output for context? I think we need to understand what exactly led up to this point in terms of the FlutterEngine/plugin lifecycle.
Actually, there's a few scenarios of what might happen
Tested on Android 11 emulator and Android 9 real device - seems that there's no difference in behavior. All logs from emulator, on real device they are just slightly different (see 4th bullet)
- The one I described in OP, i.e. first time it won't load, then you open it second time and it crashes
logs
I/System.out( 5010): ### onDetachedFromActivity
I/System.out( 5010): ### disconnect
I/System.out( 5010): ### disconnect returned
I/System.out( 5010): ### Reusing existing FlutterEngine
I/System.out( 5010): ### mainClientInterface set
I/System.out( 5010): ### connect
D/MediaBrowserCompat( 5010): Connecting to a MediaBrowserService.
I/System.out( 5010): ### connect returned
I/System.out( 5010): ### onDestroy
I/System.out( 5010): ### FlutterEngine.destroy()
I/System.out( 5010): ### onDetachedFromActivity
I/System.out( 5010): ### disconnect
I/System.out( 5010): ### disconnect returned
I/System.out( 5010): ### onDetachedFromEngine
I/System.out( 5010): ### 1 client handlers
I/System.out( 5010): ### disconnect
I/System.out( 5010): ### disconnect returned
I/System.out( 5010): ### onDetachedFromEngine completed
E/libEGL ( 5010): call to OpenGL ES API with no current context (logged once per thread)
I/System.out( 5010): ### releaseMediaSession
I/System.out( 5010): ### deactivateMediaSession
I/System.out( 5010): ### release mediaSession
E/FlutterEngineCxnRegstry( 5010): Attempted to notify ActivityAware plugins of onUserLeaveHint, but no Activity was attached.
W/FlutterJNI( 5010): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter/lifecycle. Response ID: 0
E/SurfaceView( 5010): Exception configuring surface
E/SurfaceView( 5010): java.lang.RuntimeException: Cannot execute operation because FlutterJNI is not attached to native.
E/SurfaceView( 5010): at io.flutter.embedding.engine.FlutterJNI.ensureAttachedToNative(FlutterJNI.java:386)
E/SurfaceView( 5010): at io.flutter.embedding.engine.FlutterJNI.onSurfaceDestroyed(FlutterJNI.java:496)
E/SurfaceView( 5010): at io.flutter.embedding.engine.renderer.FlutterRenderer.stopRenderingToSurface(FlutterRenderer.java:224)
E/SurfaceView( 5010): at io.flutter.embedding.android.FlutterSurfaceView.disconnectSurfaceFromRenderer(FlutterSurfaceView.java:283)
E/SurfaceView( 5010): at io.flutter.embedding.android.FlutterSurfaceView.access$400(FlutterSurfaceView.java:35)
E/SurfaceView( 5010): at io.flutter.embedding.android.FlutterSurfaceView$1.surfaceDestroyed(FlutterSurfaceView.java:73)
E/SurfaceView( 5010): at android.view.SurfaceView.notifySurfaceDestroyed(SurfaceView.java:1830)
E/SurfaceView( 5010): at android.view.SurfaceView.updateSurface(SurfaceView.java:1126)
E/SurfaceView( 5010): at android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:306)
E/SurfaceView( 5010): at android.view.View.dispatchWindowVisibilityChanged(View.java:14691)
5
E/SurfaceView( 5010): at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1614)
E/SurfaceView( 5010): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2433)
E/SurfaceView( 5010): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1952)
E/SurfaceView( 5010): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8171)
E/SurfaceView( 5010): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
E/SurfaceView( 5010): at android.view.Choreographer.doCallbacks(Choreographer.java:796)
E/SurfaceView( 5010): at android.view.Choreographer.doFrame(Choreographer.java:731)
E/SurfaceView( 5010): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
E/SurfaceView( 5010): at android.os.Handler.handleCallback(Handler.java:938)
E/SurfaceView( 5010): at android.os.Handler.dispatchMessage(Handler.java:99)
E/SurfaceView( 5010): at android.os.Looper.loop(Looper.java:223)
E/SurfaceView( 5010): at android.app.ActivityThread.main(ActivityThread.java:7656)
E/SurfaceView( 5010): at java.lang.reflect.Method.invoke(Native Method)
E/SurfaceView( 5010): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/SurfaceView( 5010): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
W/FlutterJNI( 5010): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter/lifecycle. Response ID: 0
E/FlutterEngineCxnRegstry( 5010): Attempted to notify ActivityAware plugins of onSaveInstanceState, but no Activity was attached.
D/AndroidRuntime( 5010): Shutting down VM
E/AndroidRuntime( 5010): FATAL EXCEPTION: main
E/AndroidRuntime( 5010): Process: com.example.audio_service_671, PID: 5010
E/AndroidRuntime( 5010): java.lang.RuntimeException: Unable to destroy activity {com.example.audio_service_671/com.ryanheise.audioservice.AudioServiceActivity}: java.lang.RuntimeException: Cannot execute operation because FlutterJNI is not attached to native.
E/AndroidRuntime( 5010): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5111)
E/AndroidRuntime( 5010): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5140)
E/AndroidRuntime( 5010): at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:44)
E/AndroidRuntime( 5010): at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
E/AndroidRuntime( 5010): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
E/AndroidRuntime( 5010): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
E/AndroidRuntime( 5010): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime( 5010): at android.os.Looper.loop(Looper.java:223)
E/AndroidRuntime( 5010): at android.app.ActivityThread.main(ActivityThread.java:7656)
E/AndroidRuntime( 5010): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 5010): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/AndroidRuntime( 5010): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
E/AndroidRuntime( 5010): Caused by: java.lang.RuntimeException: Cannot execute operation because FlutterJNI is not attached to native.
E/AndroidRuntime( 5010): at io.flutter.embedding.engine.FlutterJNI.ensureAttachedToNative(FlutterJNI.java:386)
E/AndroidRuntime( 5010): at io.flutter.embedding.engine.FlutterJNI.onSurfaceDestroyed(FlutterJNI.java:496)
E/AndroidRuntime( 5010): at io.flutter.embedding.engine.renderer.FlutterRenderer.stopRenderingToSurface(FlutterRenderer.java:224)
E/AndroidRuntime( 5010): at io.flutter.embedding.android.FlutterView.detachFromFlutterEngine(FlutterView.java:993)
E/AndroidRuntime( 5010): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onDestroyView(FlutterActivityAndFragmentDelegate.java:492)
E/AndroidRuntime( 5010): at io.flutter.embedding.android.FlutterActivity.release(FlutterActivity.java:594)
E/AndroidRuntime( 5010): at io.flutter.embedding.android.FlutterActivity.onDestroy(FlutterActivity.java:616)
E/AndroidRuntime( 5010): at android.app.Activity.performDestroy(Activity.java:8245)
E/AndroidRuntime( 5010): at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1344)
E/AndroidRuntime( 5010): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5096)
E/AndroidRuntime( 5010): ... 11 more
I/Process ( 5010): Sending signal. PID: 5010 SIG: 9
Lost connection to device.
- Sometimes it skips the moment where application doesn't load, i.e. it crashes at the first time I open it with quick actions and after that opens normally as per №2
logs (only until it crashes)
I/System.out( 5418): ### onDetachedFromActivity
I/System.out( 5418): ### disconnect
I/System.out( 5418): ### disconnect returned
I/System.out( 5418): ### Reusing existing FlutterEngine
I/System.out( 5418): ### mainClientInterface set
I/System.out( 5418): ### connect
D/MediaBrowserCompat( 5418): Connecting to a MediaBrowserService.
I/System.out( 5418): ### connect returned
I/System.out( 5418): ### onDestroy
I/System.out( 5418): ### FlutterEngine.destroy()
I/System.out( 5418): ### onDetachedFromActivity
I/System.out( 5418): ### disconnect
I/System.out( 5418): ### disconnect returned
I/System.out( 5418): ### onDetachedFromEngine
I/System.out( 5418): ### 1 client handlers
I/System.out( 5418): ### disconnect
I/System.out( 5418): ### disconnect returned
I/System.out( 5418): ### onDetachedFromEngine completed
E/libEGL ( 5418): call to OpenGL ES API with no current context (logged once per thread)
I/System.out( 5418): ### releaseMediaSession
I/System.out( 5418): ### deactivateMediaSession
I/System.out( 5418): ### release mediaSession
D/AndroidRuntime( 5418): Shutting down VM
E/AndroidRuntime( 5418): FATAL EXCEPTION: main
E/AndroidRuntime( 5418): Process: com.example.audio_service_671, PID: 5418
E/AndroidRuntime( 5418): java.lang.RuntimeException: Cannot execute operation because FlutterJNI is not attached to native.
E/AndroidRuntime( 5418): at io.flutter.embedding.engine.FlutterJNI.ensureAttachedToNative(FlutterJNI.java:386)
E/AndroidRuntime( 5418): at io.flutter.embedding.engine.FlutterJNI.setViewportMetrics(FlutterJNI.java:528)
E/AndroidRuntime( 5418): at io.flutter.embedding.engine.renderer.FlutterRenderer.setViewportMetrics(FlutterRenderer.java:276)
E/AndroidRuntime( 5418): at io.flutter.embedding.android.FlutterView.sendViewportMetricsToFlutter(FlutterView.java:1171)
E/AndroidRuntime( 5418): at io.flutter.embedding.android.FlutterView.onApplyWindowInsets(FlutterView.java:631)
E/AndroidRuntime( 5418): at io.flutter.plugin.editing.ImeSyncDeferringInsetsCallback$InsetsListener.onApplyWindowInsets(ImeSyncDeferringInsetsCallback.java:199)
E/AndroidRuntime( 5418): at android.view.View.dispatchApplyWindowInsets(View.java:11309)
E/AndroidRuntime( 5418): at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:7320)
E/AndroidRuntime( 5418): at android.view.ViewGroup.brokenDispatchApplyWindowInsets(ViewGroup.java:7334)
E/AndroidRuntime( 5418): at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:7325)
E/AndroidRuntime( 5418): at android.view.ViewGroup.brokenDispatchApplyWindowInsets(ViewGroup.java:7334)
E/AndroidRuntime( 5418): at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:7325)
E/AndroidRuntime( 5418): at android.view.ViewGroup.brokenDispatchApplyWindowInsets(ViewGroup.java:7334)
E/AndroidRuntime( 5418): at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:7325)
E/AndroidRuntime( 5418): at android.view.ViewGroup.brokenDispatchApplyWindowInsets(ViewGroup.java:7334)
E/AndroidRuntime( 5418): at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:7325)
E/AndroidRuntime( 5418): at android.view.ViewRootImpl.dispatchApplyInsets(ViewRootImpl.java:2291)
E/AndroidRuntime( 5418): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2419)
E/AndroidRuntime( 5418): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1952)
E/AndroidRuntime( 5418): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8171)
E/AndroidRuntime( 5418): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
E/AndroidRuntime( 5418): at android.view.Choreographer.doCallbacks(Choreographer.java:796)
E/AndroidRuntime( 5418): at android.view.Choreographer.doFrame(Choreographer.java:731)
E/AndroidRuntime( 5418): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
E/AndroidRuntime( 5418): at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime( 5418): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 5418): at android.os.Looper.loop(Looper.java:223)
E/AndroidRuntime( 5418): at android.app.ActivityThread.main(ActivityThread.java:7656)
E/AndroidRuntime( 5418): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 5418): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/AndroidRuntime( 5418): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
I/Process ( 5418): Sending signal. PID: 5418 SIG: 9
Lost connection to device.
- Sometimes it just works and I see the popup after app open, it happens on consecutive runs after it crashes, but not always (I don't have logs, since debugger detaches after app crashes)
- Sometimes on the first open with actions when it doesn't load, it logs this
logs
I/System.out( 5577): ### onDetachedFromActivity
I/System.out( 5577): ### disconnect
I/System.out( 5577): ### disconnect returned
I/System.out( 5577): ### Reusing existing FlutterEngine
I/System.out( 5577): ### mainClientInterface set
I/System.out( 5577): ### connect
D/MediaBrowserCompat( 5577): Connecting to a MediaBrowserService.
I/System.out( 5577): ### connect returned
I/System.out( 5577): ### onDestroy
I/System.out( 5577): ### FlutterEngine.destroy()
I/System.out( 5577): ### onDetachedFromActivity
I/System.out( 5577): ### disconnect
I/System.out( 5577): ### disconnect returned
I/System.out( 5577): ### onDetachedFromEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### disconnect
I/System.out( 5577): ### disconnect returned
I/System.out( 5577): ### onDetachedFromEngine completed
E/libEGL ( 5577): call to OpenGL ES API with no current context (logged once per thread)
I/System.out( 5577): ### releaseMediaSession
I/System.out( 5577): ### deactivateMediaSession
I/System.out( 5577): ### release mediaSession
I/System.out( 5577): ### onCreate
I/System.out( 5577): ### AudioService will resume on click
I/System.out( 5577): ### Creating new FlutterEngine
D/EGL_emulation( 5577): eglCreateContext: 0xec831710: maj 2 min 0 rcv 2
D/EGL_emulation( 5577): eglCreateContext: 0xec8317f0: maj 2 min 0 rcv 2
D/HostConnection( 5577): HostConnection::get() New Host Connection established 0xeca15850, tid 5630
D/HostConnection( 5577): 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_gles_max_version_2
D/EGL_emulation( 5577): eglMakeCurrent: 0xec8317f0: ver 2 0 (tinfo 0xecb79c30) (first time)
I/System.out( 5577): ### onAttachedToEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### new AudioHandlerInterface
I/System.out( 5577): ### connect
D/MediaBrowserCompat( 5577): Connecting to a MediaBrowserService.
I/System.out( 5577): ### connect returned
I/System.out( 5577): ### onAttachedToEngine completed
I/System.out( 5577): flutterEngine warmed up
I/System.out( 5577): ### onDestroy
I/System.out( 5577): ### FlutterEngine.destroy()
I/System.out( 5577): ### onDetachedFromEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### disconnect
I/System.out( 5577): ### disconnect returned
I/System.out( 5577): ### onDetachedFromEngine completed
I/System.out( 5577): ### releaseMediaSession
I/System.out( 5577): ### deactivateMediaSession
I/System.out( 5577): ### release mediaSession
I/System.out( 5577): ### onCreate
I/System.out( 5577): ### AudioService will resume on click
I/System.out( 5577): ### Creating new FlutterEngine
D/EGL_emulation( 5577): eglCreateContext: 0xec831010: maj 2 min 0 rcv 2
D/EGL_emulation( 5577): eglCreateContext: 0xec832820: maj 2 min 0 rcv 2
D/HostConnection( 5577): HostConnection::get() New Host Connection established 0xeca14110, tid 5633
D/HostConnection( 5577): 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_gles_max_version_2
D/EGL_emulation( 5577): eglMakeCurrent: 0xec832820: ver 2 0 (tinfo 0xecb7f9d0) (first time)
I/System.out( 5577): ### onAttachedToEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### new AudioHandlerInterface
I/System.out( 5577): ### connect
D/MediaBrowserCompat( 5577): Connecting to a MediaBrowserService.
I/System.out( 5577): ### connect returned
I/System.out( 5577): ### onAttachedToEngine completed
I/System.out( 5577): flutterEngine warmed up
I/System.out( 5577): ### onDestroy
I/System.out( 5577): ### FlutterEngine.destroy()
I/System.out( 5577): ### onDetachedFromEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### disconnect
I/System.out( 5577): ### disconnect returned
I/System.out( 5577): ### onDetachedFromEngine completed
I/System.out( 5577): ### releaseMediaSession
I/System.out( 5577): ### deactivateMediaSession
I/System.out( 5577): ### release mediaSession
I/System.out( 5577): ### onCreate
I/System.out( 5577): ### AudioService will resume on click
I/System.out( 5577): ### Creating new FlutterEngine
D/EGL_emulation( 5577): eglCreateContext: 0xec8255b0: maj 2 min 0 rcv 2
D/EGL_emulation( 5577): eglCreateContext: 0xec829980: maj 2 min 0 rcv 2
D/HostConnection( 5577): HostConnection::get() New Host Connection established 0xeca18e50, tid 5636
D/HostConnection( 5577): 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_gles_max_version_2
D/EGL_emulation( 5577): eglMakeCurrent: 0xec829980: ver 2 0 (tinfo 0xecb79c30) (first time)
I/System.out( 5577): ### onAttachedToEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### new AudioHandlerInterface
I/System.out( 5577): ### connect
D/MediaBrowserCompat( 5577): Connecting to a MediaBrowserService.
I/System.out( 5577): ### connect returned
I/System.out( 5577): ### onAttachedToEngine completed
I/System.out( 5577): flutterEngine warmed up
I/System.out( 5577): ### onDestroy
I/System.out( 5577): ### FlutterEngine.destroy()
I/System.out( 5577): ### onDetachedFromEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### disconnect
I/System.out( 5577): ### disconnect returned
I/System.out( 5577): ### onDetachedFromEngine completed
I/System.out( 5577): ### releaseMediaSession
I/System.out( 5577): ### deactivateMediaSession
I/System.out( 5577): ### release mediaSession
I/System.out( 5577): ### onCreate
I/System.out( 5577): ### AudioService will resume on click
I/System.out( 5577): ### Creating new FlutterEngine
D/EGL_emulation( 5577): eglCreateContext: 0xec831940: maj 2 min 0 rcv 2
D/EGL_emulation( 5577): eglCreateContext: 0xec8319b0: maj 2 min 0 rcv 2
D/HostConnection( 5577): HostConnection::get() New Host Connection established 0xeca14a10, tid 5639
D/HostConnection( 5577): 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_gles_max_version_2
D/EGL_emulation( 5577): eglMakeCurrent: 0xec8319b0: ver 2 0 (tinfo 0xb56cd5b0) (first time)
I/System.out( 5577): ### onAttachedToEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### new AudioHandlerInterface
I/System.out( 5577): ### connect
D/MediaBrowserCompat( 5577): Connecting to a MediaBrowserService.
I/System.out( 5577): ### connect returned
I/System.out( 5577): ### onAttachedToEngine completed
I/System.out( 5577): flutterEngine warmed up
I/System.out( 5577): ### onDestroy
I/System.out( 5577): ### FlutterEngine.destroy()
I/System.out( 5577): ### onDetachedFromEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### disconnect
I/System.out( 5577): ### disconnect returned
I/System.out( 5577): ### onDetachedFromEngine completed
I/System.out( 5577): ### releaseMediaSession
I/System.out( 5577): ### deactivateMediaSession
I/System.out( 5577): ### release mediaSession
I/System.out( 5577): ### onCreate
I/System.out( 5577): ### AudioService will resume on click
I/System.out( 5577): ### Creating new FlutterEngine
D/EGL_emulation( 5577): eglCreateContext: 0xec832190: maj 2 min 0 rcv 2
D/EGL_emulation( 5577): eglCreateContext: 0xec8322e0: maj 2 min 0 rcv 2
D/HostConnection( 5577): HostConnection::get() New Host Connection established 0xeca156d0, tid 5642
D/HostConnection( 5577): 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_gles_max_version_2
D/EGL_emulation( 5577): eglMakeCurrent: 0xec8322e0: ver 2 0 (tinfo 0xb56cfab0) (first time)
I/System.out( 5577): ### onAttachedToEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### new AudioHandlerInterface
I/System.out( 5577): ### connect
D/MediaBrowserCompat( 5577): Connecting to a MediaBrowserService.
I/System.out( 5577): ### connect returned
I/System.out( 5577): ### onAttachedToEngine completed
I/System.out( 5577): flutterEngine warmed up
I/System.out( 5577): ### onDestroy
I/System.out( 5577): ### FlutterEngine.destroy()
I/System.out( 5577): ### onDetachedFromEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### disconnect
I/System.out( 5577): ### disconnect returned
I/System.out( 5577): ### onDetachedFromEngine completed
I/System.out( 5577): ### releaseMediaSession
I/System.out( 5577): ### deactivateMediaSession
I/System.out( 5577): ### release mediaSession
I/System.out( 5577): ### onCreate
I/System.out( 5577): ### AudioService will resume on click
I/System.out( 5577): ### Creating new FlutterEngine
D/EGL_emulation( 5577): eglCreateContext: 0xec82f790: maj 2 min 0 rcv 2
D/EGL_emulation( 5577): eglCreateContext: 0xec831940: maj 2 min 0 rcv 2
D/HostConnection( 5577): HostConnection::get() New Host Connection established 0xeca168d0, tid 5645
D/HostConnection( 5577): 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_gles_max_version_2
D/EGL_emulation( 5577): eglMakeCurrent: 0xec831940: ver 2 0 (tinfo 0xb56d1070) (first time)
I/System.out( 5577): ### onAttachedToEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### new AudioHandlerInterface
I/System.out( 5577): ### connect
D/MediaBrowserCompat( 5577): Connecting to a MediaBrowserService.
I/System.out( 5577): ### connect returned
I/System.out( 5577): ### onAttachedToEngine completed
I/System.out( 5577): flutterEngine warmed up
I/System.out( 5577): ### onDestroy
I/System.out( 5577): ### FlutterEngine.destroy()
I/System.out( 5577): ### onDetachedFromEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### disconnect
I/System.out( 5577): ### disconnect returned
I/System.out( 5577): ### onDetachedFromEngine completed
I/System.out( 5577): ### releaseMediaSession
I/System.out( 5577): ### deactivateMediaSession
I/System.out( 5577): ### release mediaSession
I/System.out( 5577): ### onCreate
I/System.out( 5577): ### AudioService will resume on click
I/System.out( 5577): ### Creating new FlutterEngine
D/EGL_emulation( 5577): eglCreateContext: 0xec831860: maj 2 min 0 rcv 2
D/EGL_emulation( 5577): eglCreateContext: 0xec831010: maj 2 min 0 rcv 2
D/HostConnection( 5577): HostConnection::get() New Host Connection established 0xeca17170, tid 5648
D/HostConnection( 5577): 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_gles_max_version_2
D/EGL_emulation( 5577): eglMakeCurrent: 0xec831010: ver 2 0 (tinfo 0xb56cfa10) (first time)
I/System.out( 5577): ### onAttachedToEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### new AudioHandlerInterface
I/System.out( 5577): ### connect
D/MediaBrowserCompat( 5577): Connecting to a MediaBrowserService.
I/System.out( 5577): ### connect returned
I/System.out( 5577): ### onAttachedToEngine completed
I/System.out( 5577): flutterEngine warmed up
I/System.out( 5577): ### onDestroy
I/System.out( 5577): ### FlutterEngine.destroy()
I/System.out( 5577): ### onDetachedFromEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### disconnect
I/System.out( 5577): ### disconnect returned
I/System.out( 5577): ### onDetachedFromEngine completed
I/System.out( 5577): ### releaseMediaSession
I/System.out( 5577): ### deactivateMediaSession
I/System.out( 5577): ### release mediaSession
I/System.out( 5577): ### onCreate
I/System.out( 5577): ### AudioService will resume on click
I/System.out( 5577): ### Creating new FlutterEngine
D/EGL_emulation( 5577): eglCreateContext: 0xec830590: maj 2 min 0 rcv 2
D/EGL_emulation( 5577): eglCreateContext: 0xec82f790: maj 2 min 0 rcv 2
D/HostConnection( 5577): HostConnection::get() New Host Connection established 0xeca16d50, tid 5651
D/HostConnection( 5577): 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_gles_max_version_2
D/EGL_emulation( 5577): eglMakeCurrent: 0xec82f790: ver 2 0 (tinfo 0xecb77210) (first time)
I/System.out( 5577): ### onAttachedToEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### new AudioHandlerInterface
I/System.out( 5577): ### connect
D/MediaBrowserCompat( 5577): Connecting to a MediaBrowserService.
I/System.out( 5577): ### connect returned
I/System.out( 5577): ### onAttachedToEngine completed
I/System.out( 5577): flutterEngine warmed up
I/System.out( 5577): ### onDestroy
I/System.out( 5577): ### FlutterEngine.destroy()
I/System.out( 5577): ### onDetachedFromEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### disconnect
I/System.out( 5577): ### disconnect returned
I/System.out( 5577): ### onDetachedFromEngine completed
I/System.out( 5577): ### releaseMediaSession
I/System.out( 5577): ### deactivateMediaSession
I/System.out( 5577): ### release mediaSession
I/System.out( 5577): ### onCreate
I/System.out( 5577): ### AudioService will resume on click
I/System.out( 5577): ### Creating new FlutterEngine
D/EGL_emulation( 5577): eglCreateContext: 0xec831fd0: maj 2 min 0 rcv 2
D/EGL_emulation( 5577): eglCreateContext: 0xec829980: maj 2 min 0 rcv 2
D/HostConnection( 5577): HostConnection::get() New Host Connection established 0xeca16810, tid 5655
D/HostConnection( 5577): 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_gles_max_version_2
D/EGL_emulation( 5577): eglMakeCurrent: 0xec829980: ver 2 0 (tinfo 0xb56d1ff0) (first time)
I/System.out( 5577): ### onAttachedToEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### new AudioHandlerInterface
I/System.out( 5577): ### connect
D/MediaBrowserCompat( 5577): Connecting to a MediaBrowserService.
I/System.out( 5577): ### connect returned
I/System.out( 5577): ### onAttachedToEngine completed
I/System.out( 5577): flutterEngine warmed up
I/System.out( 5577): ### onDestroy
I/System.out( 5577): ### FlutterEngine.destroy()
I/System.out( 5577): ### onDetachedFromEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### disconnect
I/System.out( 5577): ### disconnect returned
I/System.out( 5577): ### onDetachedFromEngine completed
I/System.out( 5577): ### releaseMediaSession
I/System.out( 5577): ### deactivateMediaSession
I/System.out( 5577): ### release mediaSession
I/System.out( 5577): ### onCreate
I/System.out( 5577): ### AudioService will resume on click
I/System.out( 5577): ### Creating new FlutterEngine
D/EGL_emulation( 5577): eglCreateContext: 0xec8311d0: maj 2 min 0 rcv 2
D/EGL_emulation( 5577): eglCreateContext: 0xec830590: maj 2 min 0 rcv 2
D/HostConnection( 5577): HostConnection::get() New Host Connection established 0xeca11e30, tid 5658
D/HostConnection( 5577): 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_gles_max_version_2
D/EGL_emulation( 5577): eglMakeCurrent: 0xec830590: ver 2 0 (tinfo 0xb56d0310) (first time)
I/System.out( 5577): ### onAttachedToEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### new AudioHandlerInterface
I/System.out( 5577): ### connect
D/MediaBrowserCompat( 5577): Connecting to a MediaBrowserService.
I/System.out( 5577): ### connect returned
I/System.out( 5577): ### onAttachedToEngine completed
I/System.out( 5577): flutterEngine warmed up
I/System.out( 5577): ### onDestroy
I/System.out( 5577): ### FlutterEngine.destroy()
I/System.out( 5577): ### onDetachedFromEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### disconnect
I/System.out( 5577): ### disconnect returned
I/System.out( 5577): ### onDetachedFromEngine completed
I/System.out( 5577): ### releaseMediaSession
I/System.out( 5577): ### deactivateMediaSession
I/System.out( 5577): ### release mediaSession
I/System.out( 5577): ### onCreate
I/System.out( 5577): ### AudioService will resume on click
I/System.out( 5577): ### Creating new FlutterEngine
D/EGL_emulation( 5577): eglCreateContext: 0xec8340a0: maj 2 min 0 rcv 2
D/EGL_emulation( 5577): eglCreateContext: 0xec8322e0: maj 2 min 0 rcv 2
D/HostConnection( 5577): HostConnection::get() New Host Connection established 0xeca133f0, tid 5661
D/HostConnection( 5577): 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_gles_max_version_2
D/EGL_emulation( 5577): eglMakeCurrent: 0xec8322e0: ver 2 0 (tinfo 0xb56d20f0) (first time)
I/System.out( 5577): ### onAttachedToEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### new AudioHandlerInterface
I/System.out( 5577): ### connect
D/MediaBrowserCompat( 5577): Connecting to a MediaBrowserService.
I/System.out( 5577): ### connect returned
I/System.out( 5577): ### onAttachedToEngine completed
I/System.out( 5577): flutterEngine warmed up
I/System.out( 5577): ### onDestroy
I/System.out( 5577): ### FlutterEngine.destroy()
I/System.out( 5577): ### onDetachedFromEngine
I/System.out( 5577): ### 1 client handlers
I/System.out( 5577): ### disconnect
I/System.out( 5577): ### disconnect returned
I/System.out( 5577): ### onDetachedFromEngine completed
I/System.out( 5577): ### releaseMediaSession
I/System.out( 5577): ### deactivateMediaSession
I/System.out( 5577): ### release mediaSession
(same but on Anrdoid 9 real device)
I/System.out(12432): ### AudioService will resume on click
I/System.out(12432): ### Reusing existing FlutterEngine
I/System.out(12432): flutterEngine warmed up
I/System.out(12432): ### onGetRoot. isRecentRequest=false
I/System.out(12432): ### onConnected
I/System.out(12432): ### registered mediaController callback
I/System.out(12432): ### onConnected returned
The Flutter DevTools debugger and profiler on Redmi Note 5 is available at:
http://127.0.0.1:9105?uri=http%3A%2F%2F127.0.0.1%3A51336%2FzczvfRajhEI%3D%2F
I/dio_service_67(12432): ProcessProfilingInfo new_methods=1000 is saved saved_to_disk=1 resolve_classes_delay=8000
I/System.out(12432): ### onDetachedFromActivity
I/System.out(12432): ### disconnect
I/System.out(12432): ### disconnect returned
W/ActivityThread(12432): handleWindowVisibility: no activity for token android.os.BinderProxy@1eb64a1
I/System.out(12432): ### Reusing existing FlutterEngine
I/System.out(12432): ### mainClientInterface set
I/System.out(12432): ### connect
D/MediaBrowserCompat(12432): Connecting to a MediaBrowserService.
I/System.out(12432): ### connect returned
I/System.out(12432): ### onDestroy
I/System.out(12432): ### FlutterEngine.destroy()
I/System.out(12432): ### onDetachedFromActivity
I/System.out(12432): ### disconnect
I/System.out(12432): ### disconnect returned
I/System.out(12432): ### onDetachedFromEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### disconnect
I/System.out(12432): ### disconnect returned
I/System.out(12432): ### onDetachedFromEngine completed
E/libEGL (12432): call to OpenGL ES API with no current context (logged once per thread)
I/System.out(12432): ### releaseMediaSession
I/System.out(12432): ### deactivateMediaSession
I/System.out(12432): ### release mediaSession
I/System.out(12432): ### onCreate
I/System.out(12432): ### AudioService will resume on click
I/System.out(12432): ### Creating new FlutterEngine
I/System.out(12432): ### onAttachedToEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### new AudioHandlerInterface
I/System.out(12432): ### connect
D/MediaBrowserCompat(12432): Connecting to a MediaBrowserService.
I/System.out(12432): ### connect returned
I/System.out(12432): ### onAttachedToEngine completed
I/System.out(12432): flutterEngine warmed up
I/System.out(12432): ### onDestroy
I/System.out(12432): ### FlutterEngine.destroy()
I/System.out(12432): ### onDetachedFromEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### disconnect
I/System.out(12432): ### disconnect returned
I/System.out(12432): ### onDetachedFromEngine completed
I/System.out(12432): ### releaseMediaSession
I/System.out(12432): ### deactivateMediaSession
I/System.out(12432): ### release mediaSession
I/System.out(12432): ### onCreate
I/System.out(12432): ### AudioService will resume on click
I/System.out(12432): ### Creating new FlutterEngine
I/System.out(12432): ### onAttachedToEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### new AudioHandlerInterface
I/System.out(12432): ### connect
D/MediaBrowserCompat(12432): Connecting to a MediaBrowserService.
I/System.out(12432): ### connect returned
I/System.out(12432): ### onAttachedToEngine completed
I/System.out(12432): flutterEngine warmed up
W/Looper (12432): Slow Looper main: doFrame is 437ms late because of 4 msg, msg 1 took 419ms (late=8ms h=android.app.ActivityThread$H w=116)
I/System.out(12432): ### onDestroy
I/System.out(12432): ### FlutterEngine.destroy()
I/System.out(12432): ### onDetachedFromEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### disconnect
I/System.out(12432): ### disconnect returned
I/System.out(12432): ### onDetachedFromEngine completed
I/System.out(12432): ### releaseMediaSession
I/System.out(12432): ### deactivateMediaSession
I/System.out(12432): ### release mediaSession
I/System.out(12432): ### onCreate
I/System.out(12432): ### AudioService will resume on click
I/System.out(12432): ### Creating new FlutterEngine
I/System.out(12432): ### onAttachedToEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### new AudioHandlerInterface
I/System.out(12432): ### connect
D/MediaBrowserCompat(12432): Connecting to a MediaBrowserService.
I/System.out(12432): ### connect returned
I/System.out(12432): ### onAttachedToEngine completed
I/System.out(12432): flutterEngine warmed up
W/Looper (12432): Slow Looper main: doFrame is 474ms late because of 4 msg, msg 1 took 446ms (late=8ms h=android.app.ActivityThread$H w=116)
I/System.out(12432): ### onDestroy
I/System.out(12432): ### FlutterEngine.destroy()
I/System.out(12432): ### onDetachedFromEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### disconnect
I/System.out(12432): ### disconnect returned
I/System.out(12432): ### onDetachedFromEngine completed
I/System.out(12432): ### releaseMediaSession
I/System.out(12432): ### deactivateMediaSession
I/System.out(12432): ### release mediaSession
I/Choreographer(12432): Skipped 34 frames! The application may be doing too much work on its main thread.
W/Looper (12432): Slow Looper main: doFrame is 582ms late because of 7 msg, msg 6 took 571ms (late=19ms h=android.app.ActivityThread$H w=116)
I/System.out(12432): ### onCreate
I/System.out(12432): ### AudioService will resume on click
I/System.out(12432): ### Creating new FlutterEngine
I/System.out(12432): ### onAttachedToEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### new AudioHandlerInterface
I/System.out(12432): ### connect
D/MediaBrowserCompat(12432): Connecting to a MediaBrowserService.
I/System.out(12432): ### connect returned
I/System.out(12432): ### onAttachedToEngine completed
I/System.out(12432): flutterEngine warmed up
I/System.out(12432): ### onDestroy
I/System.out(12432): ### FlutterEngine.destroy()
I/System.out(12432): ### onDetachedFromEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### disconnect
I/System.out(12432): ### disconnect returned
I/System.out(12432): ### onDetachedFromEngine completed
I/System.out(12432): ### releaseMediaSession
I/System.out(12432): ### deactivateMediaSession
I/System.out(12432): ### release mediaSession
I/System.out(12432): ### onCreate
I/System.out(12432): ### AudioService will resume on click
I/System.out(12432): ### Creating new FlutterEngine
I/System.out(12432): ### onAttachedToEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### new AudioHandlerInterface
I/System.out(12432): ### connect
D/MediaBrowserCompat(12432): Connecting to a MediaBrowserService.
I/System.out(12432): ### connect returned
I/System.out(12432): ### onAttachedToEngine completed
I/System.out(12432): flutterEngine warmed up
I/System.out(12432): ### onDestroy
I/System.out(12432): ### FlutterEngine.destroy()
I/System.out(12432): ### onDetachedFromEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### disconnect
I/System.out(12432): ### disconnect returned
I/System.out(12432): ### onDetachedFromEngine completed
I/System.out(12432): ### releaseMediaSession
I/System.out(12432): ### deactivateMediaSession
I/System.out(12432): ### release mediaSession
I/System.out(12432): ### onCreate
I/System.out(12432): ### AudioService will resume on click
I/System.out(12432): ### Creating new FlutterEngine
I/System.out(12432): ### onAttachedToEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### new AudioHandlerInterface
I/System.out(12432): ### connect
D/MediaBrowserCompat(12432): Connecting to a MediaBrowserService.
I/System.out(12432): ### connect returned
I/System.out(12432): ### onAttachedToEngine completed
I/System.out(12432): flutterEngine warmed up
I/System.out(12432): ### onDestroy
I/System.out(12432): ### FlutterEngine.destroy()
I/System.out(12432): ### onDetachedFromEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### disconnect
I/System.out(12432): ### disconnect returned
I/System.out(12432): ### onDetachedFromEngine completed
I/System.out(12432): ### releaseMediaSession
I/System.out(12432): ### deactivateMediaSession
I/System.out(12432): ### release mediaSession
I/System.out(12432): ### onCreate
I/System.out(12432): ### AudioService will resume on click
I/System.out(12432): ### Creating new FlutterEngine
I/System.out(12432): ### onAttachedToEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### new AudioHandlerInterface
I/System.out(12432): ### connect
D/MediaBrowserCompat(12432): Connecting to a MediaBrowserService.
I/System.out(12432): ### connect returned
I/System.out(12432): ### onAttachedToEngine completed
I/System.out(12432): flutterEngine warmed up
I/System.out(12432): ### onDestroy
I/System.out(12432): ### FlutterEngine.destroy()
I/System.out(12432): ### onDetachedFromEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### disconnect
I/System.out(12432): ### disconnect returned
I/System.out(12432): ### onDetachedFromEngine completed
I/System.out(12432): ### releaseMediaSession
I/System.out(12432): ### deactivateMediaSession
I/System.out(12432): ### release mediaSession
I/System.out(12432): ### onCreate
I/System.out(12432): ### AudioService will resume on click
I/System.out(12432): ### Creating new FlutterEngine
I/System.out(12432): ### onAttachedToEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### new AudioHandlerInterface
I/System.out(12432): ### connect
D/MediaBrowserCompat(12432): Connecting to a MediaBrowserService.
I/System.out(12432): ### connect returned
I/System.out(12432): ### onAttachedToEngine completed
I/System.out(12432): flutterEngine warmed up
I/System.out(12432): ### onDestroy
I/System.out(12432): ### FlutterEngine.destroy()
I/System.out(12432): ### onDetachedFromEngine
I/System.out(12432): ### 1 client handlers
I/System.out(12432): ### disconnect
I/System.out(12432): ### disconnect returned
I/System.out(12432): ### onDetachedFromEngine completed
I/System.out(12432): ### releaseMediaSession
I/System.out(12432): ### deactivateMediaSession
I/System.out(12432): ### release mediaSession
Then when I collapse it (same as in №1)
logs
E/FlutterEngineCxnRegstry( 5577): Attempted to notify ActivityAware plugins of onUserLeaveHint, but no Activity was attached.
W/FlutterJNI( 5577): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter/lifecycle. Response ID: 0
E/SurfaceView( 5577): Exception configuring surface
E/SurfaceView( 5577): java.lang.RuntimeException: Cannot execute operation because FlutterJNI is not attached to native.
E/SurfaceView( 5577): at io.flutter.embedding.engine.FlutterJNI.ensureAttachedToNative(FlutterJNI.java:386)
E/SurfaceView( 5577): at io.flutter.embedding.engine.FlutterJNI.onSurfaceDestroyed(FlutterJNI.java:496)
E/SurfaceView( 5577): at io.flutter.embedding.engine.renderer.FlutterRenderer.stopRenderingToSurface(FlutterRenderer.java:224)
E/SurfaceView( 5577): at io.flutter.embedding.android.FlutterSurfaceView.disconnectSurfaceFromRenderer(FlutterSurfaceView.java:283)
E/SurfaceView( 5577): at io.flutter.embedding.android.FlutterSurfaceView.access$400(FlutterSurfaceView.java:35)
E/SurfaceView( 5577): at io.flutter.embedding.android.FlutterSurfaceView$1.surfaceDestroyed(FlutterSurfaceView.java:73)
E/SurfaceView( 5577): at android.view.SurfaceView.notifySurfaceDestroyed(SurfaceView.java:1830)
E/SurfaceView( 5577): at android.view.SurfaceView.updateSurface(SurfaceView.java:1126)
E/SurfaceView( 5577): at android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:306)
E/SurfaceView( 5577): at android.view.View.dispatchWindowVisibilityChanged(View.java:14691)
E/SurfaceView( 5577): at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1614)
E/SurfaceView( 5577): at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1614)
E/SurfaceView( 5577): at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1614)
E/SurfaceView( 5577): at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1614)
E/SurfaceView( 5577): at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1614)
E/SurfaceView( 5577): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2433)
E/SurfaceView( 5577): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1952)
E/SurfaceView( 5577): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8171)
E/SurfaceView( 5577): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
E/SurfaceView( 5577): at android.view.Choreographer.doCallbacks(Choreographer.java:796)
E/SurfaceView( 5577): at android.view.Choreographer.doFrame(Choreographer.java:731)
E/SurfaceView( 5577): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
E/SurfaceView( 5577): at android.os.Handler.handleCallback(Handler.java:938)
E/SurfaceView( 5577): at android.os.Handler.dispatchMessage(Handler.java:99)
E/SurfaceView( 5577): at android.os.Looper.loop(Looper.java:223)
E/SurfaceView( 5577): at android.app.ActivityThread.main(ActivityThread.java:7656)
E/SurfaceView( 5577): at java.lang.reflect.Method.invoke(Native Method)
E/SurfaceView( 5577): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/SurfaceView( 5577): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
W/FlutterJNI( 5577): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter/lifecycle. Response ID: 0
E/FlutterEngineCxnRegstry( 5577): Attempted to notify ActivityAware plugins of onSaveInstanceState, but no Activity was attached.
Then on second run with actions (same as in №1)
logs
D/AndroidRuntime( 5577): Shutting down VM
E/AndroidRuntime( 5577): FATAL EXCEPTION: main
E/AndroidRuntime( 5577): Process: com.example.audio_service_671, PID: 5577
E/AndroidRuntime( 5577): java.lang.RuntimeException: Unable to destroy activity {com.example.audio_service_671/com.ryanheise.audioservice.AudioServiceActivity}: java.lang.RuntimeException: Cannot execute operation because FlutterJNI is not attached to native.
E/AndroidRuntime( 5577): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5111)
E/AndroidRuntime( 5577): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5140)
E/AndroidRuntime( 5577): at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:44)
E/AndroidRuntime( 5577): at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
E/AndroidRuntime( 5577): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
E/AndroidRuntime( 5577): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
E/AndroidRuntime( 5577): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime( 5577): at android.os.Looper.loop(Looper.java:223)
E/AndroidRuntime( 5577): at android.app.ActivityThread.main(ActivityThread.java:7656)
E/AndroidRuntime( 5577): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 5577): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/AndroidRuntime( 5577): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
E/AndroidRuntime( 5577): Caused by: java.lang.RuntimeException: Cannot execute operation because FlutterJNI is not attached to native.
E/AndroidRuntime( 5577): at io.flutter.embedding.engine.FlutterJNI.ensureAttachedToNative(FlutterJNI.java:386)
E/AndroidRuntime( 5577): at io.flutter.embedding.engine.FlutterJNI.onSurfaceDestroyed(FlutterJNI.java:496)
E/AndroidRuntime( 5577): at io.flutter.embedding.engine.renderer.FlutterRenderer.stopRenderingToSurface(FlutterRenderer.java:224)
E/AndroidRuntime( 5577): at io.flutter.embedding.android.FlutterView.detachFromFlutterEngine(FlutterView.java:993)
E/AndroidRuntime( 5577): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onDestroyView(FlutterActivityAndFragmentDelegate.java:492)
E/AndroidRuntime( 5577): at io.flutter.embedding.android.FlutterActivity.release(FlutterActivity.java:594)
E/AndroidRuntime( 5577): at io.flutter.embedding.android.FlutterActivity.onDestroy(FlutterActivity.java:616)
E/AndroidRuntime( 5577): at android.app.Activity.performDestroy(Activity.java:8245)
E/AndroidRuntime( 5577): at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1344)
E/AndroidRuntime( 5577): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5096)
E/AndroidRuntime( 5577): ... 11 more
I/Process ( 5577): Sending signal. PID: 5577 SIG: 9
Lost connection to device.
The crash can be fixed, submitted a PR. Though I discovered there's another problem with the quick_actions itself https://github.com/flutter/flutter/issues/89615