cordova-plugin-inappbrowser: InAppBrowser: java.lang.IllegalArgumentException

Hello all,

We have found this error on Google Play Store console that seams to be an InAppBrowser problem

java.lang.IllegalArgumentException: 
  at android.view.WindowManagerGlobal.findViewLocked (WindowManagerGlobal.java:533)
  at android.view.WindowManagerGlobal.removeView (WindowManagerGlobal.java:433)
  at android.view.WindowManagerImpl.removeViewImmediate (WindowManagerImpl.java:124)
  at android.app.Dialog.dismissDialog (Dialog.java:518)
  at android.app.Dialog.dismiss (Dialog.java:501)
  at org.apache.cordova.inappbrowser.InAppBrowser$5$1.onPageFinished (InAppBrowser.java:462)
  at vu.d (PG:307)
  at aCg.handleMessage (PG:72)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:214)
  at android.app.ActivityThread.main (ActivityThread.java:7032)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:965)

Please help on this I am getting this crash issue frequently.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 5
  • Comments: 19 (4 by maintainers)

Commits related to this issue

Most upvoted comments

We are facing the same problem. In our app, the incidence rate is high in Samsung Galaxy S9, but it is also occurring in Sony Xperia XZ2 Compact.

@janpio I have a bit more details. The issue also happens in cordova-android 8.0.0. We have an app with the inappbrowser plugin version built from master branch around February and it was not fixed by then.

Judging from the statistics, the problem is prevalent in Samsung phones (~80% of cases) but also visible in Huawei and others. Regarding android version, we had single instances in android 6, and the newer the version the more frequent the problem. Currently 95% cases is android 9.

Hi, let me share our case… I’m using inappbrowser 3.0.0 with Cordova 7.1.0 / cordova-android 6.4.0.

Here are the results on our Firebase Console.

Fatal Exception: java.lang.IllegalArgumentException: View=DecorView@9fcd2f6[MainActivity] not attached to window manager at android.view.WindowManagerGlobal.findViewLocked + 485(WindowManagerGlobal.java:485) at android.view.WindowManagerGlobal.removeView + 394(WindowManagerGlobal.java:394) at android.view.WindowManagerImpl.removeViewImmediate + 126(WindowManagerImpl.java:126) at android.app.Dialog.dismissDialog + 375(Dialog.java:375) at android.app.Dialog.dismiss + 358(Dialog.java:358) at org.apache.cordova.inappbrowser.InAppBrowser$5$1.onPageFinished + 462(InAppBrowser.java:462) at uU.d + 307(PG:307) at aIV.handleMessage + 73(PG:73) at android.os.Handler.dispatchMessage + 106(Handler.java:106) at android.os.Looper.loop + 338(Looper.java:338) at android.app.ActivityThread.main + 6764(ActivityThread.java:6764) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run + 493(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main + 858(ZygoteInit.java:858)

Almost all are from Android 9.

image

And several devices caused this issue.

image image image

Also, it happens after the app becomes foreground from background status.

image

Hope it helps.

We’ve faced this issue on Android 8.1 and Android 9 devices. Our crash logs almost the same as the other ones.

java.lang.IllegalArgumentException: at android.view.WindowManagerGlobal.findViewLocked (WindowManagerGlobal.java:454) at android.view.WindowManagerGlobal.removeView (WindowManagerGlobal.java:380) at android.view.WindowManagerImpl.removeViewImmediate (WindowManagerImpl.java:140) at android.app.Dialog.dismissDialog (Dialog.java:687) at android.app.Dialog.dismiss (Dialog.java:670) at org.apache.cordova.inappbrowser.InAppBrowser$4$1.onPageFinished (Unknown Source) at ib.d (PG:323) at Ae.handleMessage (PG:72) at android.os.Handler.dispatchMessage (Handler.java:102) at android.os.Looper.loop (Looper.java:148) at android.app.ActivityThread.main (ActivityThread.java:7223) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)

Hello, we are also seeing this issue in our google play console (Cordova-android 8 / inappbrowser 3) Attached is the devices and versions repartition. I haven’t found any way to reproduce the issue… screen playstore

We are seeing the crash, too (only Samsung devices and Android 9). Unfortunately I have no reproducible example neither.

image