Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crash related to flutter_contacts #249

Closed
Chinmay-KB opened this issue Dec 23, 2021 · 0 comments · Fixed by #251
Closed

App crash related to flutter_contacts #249

Chinmay-KB opened this issue Dec 23, 2021 · 0 comments · Fixed by #251
Labels
easy fix Should not take much time to fix this issue. type: bug Something isn't working

Comments

@Chinmay-KB
Copy link
Member

App is crashed when using flutter_contacts, as reported in flirebase crashalytics.

Fatal Exception: java.lang.SecurityException: Permission Denial: opening provider
com.android.providers.contacts.ContactsProvider2 from ProcessRecord{58d4b6 3950:in.ac.nitrkl.scp.scp/u0a302} (pid=3950, uid=10302) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
       at android.os.Parcel.createExceptionOrNull(Parcel.java:2385)
       at android.os.Parcel.createException(Parcel.java:2369)
       at android.os.Parcel.readException(Parcel.java:2352)
       at android.os.Parcel.readException(Parcel.java:2294)
       at android.app.IActivityManager$Stub$Proxy.getContentProvider(IActivityManager.java:6680)
       at android.app.ActivityThread.acquireProvider(ActivityThread.java:7718)
       at android.app.ContextImpl$ApplicationContentResolver.acquireProvider(ContextImpl.java:3071)
       at android.content.ContentResolver.acquireProvider(ContentResolver.java:2475)
       at android.content.ContentResolver.acquireContentProviderClient(ContentResolver.java:2541)
       at android.content.ContentResolver.applyBatch(ContentResolver.java:2201)
       at co.quis.flutter_contacts.FlutterContacts$Companion.insert(FlutterContacts.java:124)
       at co.quis.flutter_contacts.FlutterContactsPlugin$onMethodCall$3.invokeSuspend(FlutterContactsPlugin.java:38)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:9)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:117)
       at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.java:14)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.java:28)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java)
  • Device: [e.g. Nokia 5.4]
  • OS: [e.g. Android 11]
  • Version [e.g. 4.3.0]
    Fix
    Add the permissions to the manifest file
     <uses-permission android:name="android.permission.READ_CONTACTS"/>
     <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
@Chinmay-KB Chinmay-KB added type: bug Something isn't working easy fix Should not take much time to fix this issue. labels Dec 23, 2021
@abhibhaw abhibhaw pinned this issue Dec 27, 2021
@abhibhaw abhibhaw linked a pull request Jan 7, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy fix Should not take much time to fix this issue. type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant