apache / cordova-plugin-inappbrowser

Apache Cordova InAppBrowser Plugin
https://cordova.apache.org/
Apache License 2.0
1.12k stars 2.15k forks source link

IllegalArgumentException on Android #348

Open Asterodeia opened 5 years ago

Asterodeia commented 5 years ago

Hello all,

We have found this error on Google Play Store console that seams to be an InAppBrowser problem (not happening in another application that is almost exactly the same apart from using InAppBrowser)

java.lang.IllegalArgumentException:
  at android.view.WindowManagerGlobal.findViewLocked (WindowManagerGlobal.java:508)
  at android.view.WindowManagerGlobal.removeView (WindowManagerGlobal.java:417)
  at android.view.WindowManagerImpl.removeViewImmediate (WindowManagerImpl.java:128)
  at android.app.Dialog.dismissDialog (Dialog.java:446)
  at android.app.Dialog.dismiss (Dialog.java:429)
  at org.apache.cordova.inappbrowser.InAppBrowser$5$1.onPageFinished (InAppBrowser.java:461)

We don't have the ios stacktraces, so I don't know if it's an android-only problem.

We are using version 2.0.2 on an ionic3/cordova-android 6.4.0 stack.

This is the code we use that uses inappBrowser : (typescript).

constructor(private inAppBrowser: InAppBrowser, ...

...

this.ref = this.inAppBrowser.create(https://url.com, "_blank", "location=no,toolbar=no,hidden=yes");
this.ref.insertCSS({code: "body{background-color: #3F2D28;}"});

...
this.ref.on("loadstart").subscribe()...
this.ref.on("loadstop").subscribe()...
this.ref.on("loaderror").subscribe()...
this.ref.on("exit").subscribe()...

...

this.ref.show();

...
this.ref.close();

Is there someone who could tell what is wrong? Thanks

janpio commented 5 years ago

Can you reproduce any crashes? What OS version are those occuring?

Asterodeia commented 5 years ago

We could not reproduce the crash for the moment, we are trying to figure it out. OS version seem to be mostly Android 7.0, but it occurs also on 7.1, 8 and 9

mread1208 commented 5 years ago

We're also seeing this issue over 200+ times in the last 30 days. Mostly happening on Galaxy S9, S9+, and Galaxy Note phones using Android. We're using InAppBrowser version 3.0.0

uqbMtran commented 5 years ago

https://issues.apache.org/jira/browse/CB-13259