brucejo75 commented on issue #851: excludeFromRecents="true" causes app to be killed on Android 9 URL: https://github.com/apache/cordova-android/issues/851#issuecomment-558244588 @breautek, @8bhsolutions, I also started seeing this throw on Android 9 with Cordova 7.1.4. I am wondering if chromium issue [#511243](https://bugs.chromium.org/p/chromium/issues/detail?id=511243&q=WebView.destroy&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified) provides a clue to what is happening. Here is my log snippet: ``` === MyApp receives an onDestroy() 11-25 07:16:39.127 4294 4294 D MyApp : H:C:SE:E in onDestroy() 11-25 07:16:39.128 4294 4294 D CordovaWebViewImpl: >>> loadUrl(about:blank) === Warning message is output 11-25 07:16:39.132 4294 4294 W cr_AwContents: WebView.destroy() called while WebView is still attached to window. === Chrome receives the onUnload event and MyApp makes a plugin call that simply logs the event 11-25 07:16:39.136 4294 4542 D MyApp : H:C:SE:E in jv.execute:test [MyApp1057410358] 11-25 07:16:39.137 4294 4542 D MyApp : H:C:SE:E myapp.test received: In onUnload 11-25 07:16:39.141 4294 4294 D ViewRootImpl@27672fa[MainActivity]: dispatchDetachedFromWindow 11-25 07:16:39.148 4294 4294 D InputTransport: Input channel destroyed: fd=155 === After I log it with my plugin I output it in the chrome console 11-25 07:16:39.149 4294 4294 I chromium: [INFO:CONSOLE(4456)] "[07:16:39:134] WARN: MyApp: In onUnload unload$ (http://localhost:12848/__cordova/app.js?hash=ad91e9f827dd8287d263256b1de4d4e03de05f73:6547:27) ", source: http://localhost:12848/__cordova/packages/myapp_base.js?hash=deae68068b750d5d115ea91e0aa2a6c6b8e3eaa6 (4456) === Receive throw 11-25 07:16:39.151 4294 4294 W cr_AwContents: Application attempted to call on a destroyed WebView 11-25 07:16:39.151 4294 4294 W cr_AwContents: java.lang.Throwable 11-25 07:16:39.151 4294 4294 W cr_AwContents: at org.chromium.android_webview.AwContents.a(PG:132) 11-25 07:16:39.151 4294 4294 W cr_AwContents: at tD0.loadingStateChanged(PG:2) 11-25 07:16:39.151 4294 4294 W cr_AwContents: at android.os.MessageQueue.nativePollOnce(Native Method) 11-25 07:16:39.151 4294 4294 W cr_AwContents: at android.os.MessageQueue.next(MessageQueue.java:326) 11-25 07:16:39.151 4294 4294 W cr_AwContents: at android.os.Looper.loop(Looper.java:183) 11-25 07:16:39.151 4294 4294 W cr_AwContents: at android.app.ActivityThread.main(ActivityThread.java:7266) 11-25 07:16:39.151 4294 4294 W cr_AwContents: at java.lang.reflect.Method.invoke(Native Method) 11-25 07:16:39.151 4294 4294 W cr_AwContents: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) 11-25 07:16:39.151 4294 4294 W cr_AwContents: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975) ``` This makes me think that cordova may be destroying the WebView before chromium has fully handled the destroy? I think it is a benign error for me because chrome gets tossed from memory at that point and any leaking does not cause a problem for my usage. I would test this with Cordova 9, but the tool I am using (meteor) is only at `7.1.4`.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
