Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13259

Crash on Samsung devices with android 6+

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • cordova@7.0.0
    • None
    • None
    • InAppBrowser 1.7.1
      OS: Android 6 and 7
      Samsung and Huawei devices

    • Patch

    Description

      Using latest version of cordova and InAppBrowser a crash occurs on Samsung and Huawei devices that run Android 6 or 7.
      Below is a google crash report from such device:
      java.lang.IllegalArgumentException:
      at android.view.WindowManagerGlobal.findViewLocked (WindowManagerGlobal.java:473)
      at android.view.WindowManagerGlobal.removeView (WindowManagerGlobal.java:382)
      at android.view.WindowManagerImpl.removeViewImmediate (WindowManagerImpl.java:128)
      at android.app.Dialog.dismissDialog (Dialog.java:610)
      at android.app.Dialog.dismiss (Dialog.java:593)
      at org.apache.cordova.inappbrowser.InAppBrowser$5$1.onPageFinished (InAppBrowser.java:434)
      at com.android.webview.chromium.WebViewContentsClientAdapter.onPageFinished (WebViewContentsClientAdapter.java:196)
      at org.chromium.android_webview.AwContentsClientCallbackHelper$MyHandler.handleMessage (AwContentsClientCallbackHelper.java:65)
      at android.os.Handler.dispatchMessage (Handler.java:102)
      at android.os.Looper.loop (Looper.java:154)
      at android.app.ActivityThread.main (ActivityThread.java:6682)
      at java.lang.reflect.Method.invoke (Native Method)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1520)
      at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1410)

      I already searched such crash and I couldn't find any report of this for cordova or inappbrowser. The problem seems to be occuring here that's because on samsung device it's needed to verify if dialog.isShowing() as stated from a StackOverflow answer. That being said I think the bug can be easily solved by changing one line. I also want to mention that app only crashes if user has enabled "Don't keep activities" on Settings->Developer Options.

      Attachments

        Activity

          People

            Unassigned Unassigned
            veniamin Veniamin Craciun
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: