apache / apache/cordova-plugin-inappbrowser
IllegalArgumentException on Android
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
Research direction
Start by tracing the reported stack from org.apache.cordova.inappbrowser.InAppBrowser$5$1.onPageFinished at InAppBrowser.java:461, focusing on the dialog lifecycle around the shown hidden/show/close usage. Reproduce it with the stated Ionic 3, cordova-android 6.4.0, and InAppBrowser 2.0.2 versions; done means isolating the dismissal failure and verifying a correction for the Android crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, typescript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100