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

If a page has contacts plugin, security Exception is coming and crashing the app in Android Marshmallow.

    XMLWordPrintableJSON

Details

    Description

      Our Android App is crashing in Marshmallow with the following exception.
      This exception comes until the user allow the app to access Contacts.

      Test Device: Samsung galaxy duos with Android Marshmallow

      04-14 16:05:02.594 18029-18602/? E/AndroidRuntime﹕ FATAL EXCEPTION: pool-2-thread-5
      Process: com.contacts_test, PID: 18029
      java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord

      {41a69ed 18029:com.contacts_test/u0a150}

      (pid=18029, uid=10150) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
      at android.os.Parcel.readException(Parcel.java:1620)
      at android.os.Parcel.readException(Parcel.java:1573)
      at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:4291)
      at android.app.ActivityThread.acquireProvider(ActivityThread.java:6493)
      at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2407)
      at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1521)
      at android.content.ContentResolver.query(ContentResolver.java:486)
      at android.content.ContentResolver.query(ContentResolver.java:445)
      at org.apache.cordova.contacts.ContactAccessorSdk5.search(ContactAccessorSdk5.java:188)
      at org.apache.cordova.contacts.ContactManager$3.run(ContactManager.java:209)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
      at java.lang.Thread.run(Thread.java:818)

      Attachments

        Activity

          People

            Unassigned Unassigned
            sboyina Srinivasa Rao Boyina
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: