java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{71740b2 14910:org.xwalk.usecase_cordova_android_tests/u0a363} (pid=14910, uid=10363) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS

JIRA | jingqiaX | 5 months ago
  1. 0

    Impacted Cases ============== usecase-cordova/CordovaContacts Reproduce Test Steps ==================== 1. Install usecase-cordova-android-tests.apk(Please find the link in comment) 2. Launch usecase-cordova-android-tests app and enter Cordova/CordovaContacts 3. Tap "Get phone's contacts" or "Add a new contact 'Dooney Evans'" Expected Outcome ================ After 3. Phone's contacts could show and no crash occur. Actual Outcome ============== After 3. Crash occur when try to get or add Contacts for cordova Test Case Source Code ===================== ||Type||URL|| |Souce code in github| https://github.com/crosswalk-project/crosswalk-test-suite/tree/master/usecase/usecase-cordova-android-tests/| |Souce code in github| https://github.com/crosswalk-project/demo-express/tree/master/samples-cordova/CordovaContacts/ | Test Builds =========== ||Version||Test Date ||Test Device||Android Version||Result|| |crosswalk 20.50.533.6|2016.07.15|Google Nexus 9|5.1.1|{color:green}Pass{color}| |crosswalk 20.50.533.6|2016.07.15|Google Nexus 9|6.0.0|{color:red}Fail{color}| |crosswalk 20.50.533.11|2016.07.15|Google Nexus 9|5.1.1|{color:green}Pass{color}| |crosswalk 20.50.533.11|2016.07.15|Google Nexus 9|6.0.0|{color:red}Fail{color}| |crosswalk 21.51.546.2|2016.07.15|Google Nexus 9|6.0.0|{color:red}Fail{color}| |crosswalk 21.51.542.0|2016.07.15|Google Nexus 9|6.0.0|{color:red}Fail{color}| |crosswalk 21.51.542.0|2016.07.15|Google Nexus 9|5.1.1|{color:green}Pass{color}| Issue Analysis ============== {code} 07-15 03:50:19.389 14910 16759 E AndroidRuntime: FATAL EXCEPTION: pool-1-thread-4 07-15 03:50:19.389 14910 16759 E AndroidRuntime: Process: org.xwalk.usecase_cordova_android_tests, PID: 14910 07-15 03:50:19.389 14910 16759 E AndroidRuntime: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{71740b2 14910:org.xwalk.usecase_cordova_android_tests/u0a363} (pid=14910, uid=10363) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS 07-15 03:50:19.389 14910 16759 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:1620) 07-15 03:50:19.389 14910 16759 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:1573) 07-15 03:50:19.389 14910 16759 E AndroidRuntime: at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3550) 07-15 03:50:19.389 14910 16759 E AndroidRuntime: at android.app.ActivityThread.acquireProvider(ActivityThread.java:4778) 07-15 03:50:19.389 14910 16759 E AndroidRuntime: at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2018) 07-15 03:50:19.389 14910 16759 E AndroidRuntime: at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1468) 07-15 03:50:19.389 14910 16759 E AndroidRuntime: at android.content.ContentResolver.query(ContentResolver.java:475) 07-15 03:50:19.389 14910 16759 E AndroidRuntime: at android.content.ContentResolver.query(ContentResolver.java:434) 07-15 03:50:19.389 14910 16759 E AndroidRuntime: at org.apache.cordova.contacts.ContactAccessorSdk5.search(ContactAccessorSdk5.java:177) 07-15 03:50:19.389 14910 16759 E AndroidRuntime: at org.apache.cordova.contacts.ContactManager$1.run(ContactManager.java:93) 07-15 03:50:19.389 14910 16759 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 07-15 03:50:19.389 14910 16759 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 07-15 03:50:19.389 14910 16759 E AndroidRuntime: at java.lang.Thread.run(Thread.java:818) 07-15 03:50:19.391 584 1068 W ActivityManager: Force finishing activity org.xwalk.usecase_cordova_android_tests/.usecase_cordova_android_tests {code}

    JIRA | 5 months ago | jingqiaX
    java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{71740b2 14910:org.xwalk.usecase_cordova_android_tests/u0a363} (pid=14910, uid=10363) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
  2. 0

    Fatal exception error

    Stack Overflow | 2 years ago | user2850116
    java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/audio/media from pid=1071, uid=10066 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
  3. 0

    java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media/40763 from pid=18326, uid=10114 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()

    GitHub | 2 years ago | agwells
    java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media/40763 from pid=18326, uid=10114 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Class not working, Error occured?

    Stack Overflow | 4 years ago | Hari
    java.lang.SecurityException: Permission Denial: reading com.android.providers.contacts.ContactsProvider2 uri content://com.android.contacts/contacts from pid=392, uid=10028 requires android.permission.READ_CONTACTS
  6. 0

    Attempt to invoke virtual method 'java.lang.Object java.util.HashMap.get(java.lang.Object)' on a null object reference

    Stack Overflow | 7 months ago | Naqib Shayea Qazizadah
    java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=20549, uid=10143 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()

  1. Alexandru Popa 2 times, last 2 weeks ago
  2. malhobayyeb 16 times, last 1 week ago
  3. Aria Pahlavan 162 times, last 1 week ago
  4. iridic 2 times, last 3 weeks ago
  5. VeryRedChris 1 times, last 3 weeks ago
38 more registered users
20 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.SecurityException

    Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{71740b2 14910:org.xwalk.usecase_cordova_android_tests/u0a363} (pid=14910, uid=10363) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS

    at android.os.Parcel.readException()
  2. Android Platform
    ContentResolver.query
    1. android.os.Parcel.readException(Parcel.java:1620)
    2. android.os.Parcel.readException(Parcel.java:1573)
    3. android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3550)
    4. android.app.ActivityThread.acquireProvider(ActivityThread.java:4778)
    5. android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2018)
    6. android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1468)
    7. android.content.ContentResolver.query(ContentResolver.java:475)
    8. android.content.ContentResolver.query(ContentResolver.java:434)
    8 frames
  3. org.apache.cordova
    ContactManager$1.run
    1. org.apache.cordova.contacts.ContactAccessorSdk5.search(ContactAccessorSdk5.java:177)
    2. org.apache.cordova.contacts.ContactManager$1.run(ContactManager.java:93)
    2 frames
  4. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
    3. java.lang.Thread.run(Thread.java:818)
    3 frames