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

Trying to update 20 contacts i got this error #1

Closed
angebagui opened this issue Jan 17, 2021 · 2 comments
Closed

Trying to update 20 contacts i got this error #1

angebagui opened this issue Jan 17, 2021 · 2 comments

Comments

@angebagui
Copy link

I/flutter (31118): Iteration >>>> 1
I/flutter (31118): Iteration >>>> 2
I/flutter (31118): Iteration >>>> 3
I/flutter (31118): Iteration >>>> 4
I/flutter (31118): Iteration >>>> 5
I/flutter (31118): Iteration >>>> 6
I/flutter (31118): Iteration >>>> 7
I/flutter (31118): Iteration >>>> 8
I/flutter (31118): Iteration >>>> 9
I/flutter (31118): Iteration >>>> 10
I/flutter (31118): Iteration >>>> 11
I/flutter (31118): Iteration >>>> 12
I/flutter (31118): Iteration >>>> 13
I/flutter (31118): Iteration >>>> 14
I/flutter (31118): Iteration >>>> 15
I/flutter (31118): Iteration >>>> 16
I/flutter (31118): Iteration >>>> 17
I/flutter (31118): Iteration >>>> 18
I/flutter (31118): Iteration >>>> 19
E/AndroidRuntime(31118): FATAL EXCEPTION: DefaultDispatcher-worker-12
E/AndroidRuntime(31118): Process: ci.dixapp, PID: 31118
E/AndroidRuntime(31118): android.content.OperationApplicationException: Too many content provider operations between yield points. The maximum number of operations per yield point is 500
E/AndroidRuntime(31118): at android.database.DatabaseUtils.readExceptionWithOperationApplicationExceptionFromParcel(DatabaseUtils.java:161)
E/AndroidRuntime(31118): at android.content.ContentProviderProxy.applyBatch(ContentProviderNative.java:528)
E/AndroidRuntime(31118): at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:532)
E/AndroidRuntime(31118): at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:520)
E/AndroidRuntime(31118): at android.content.ContentResolver.applyBatch(ContentResolver.java:1875)
E/AndroidRuntime(31118): at co.quis.flutter_contacts.FlutterContacts$Companion.update(FlutterContacts.kt:469)
E/AndroidRuntime(31118): at co.quis.flutter_contacts.FlutterContactsPlugin$onMethodCall$3.invokeSuspend(FlutterContactsPlugin.kt:92)
E/AndroidRuntime(31118): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
E/AndroidRuntime(31118): at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
E/AndroidRuntime(31118): at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
E/AndroidRuntime(31118): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
E/AndroidRuntime(31118): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
E/AndroidRuntime(31118): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

@joachimvalente
Copy link
Contributor

Hi @angebagui thanks for reporting this! Could you post your code? With the logs alone it's hard to tell what's wrong.

@joachimvalente
Copy link
Contributor

Can't reproduce, closing.

A few ideas to try in such cases:

  • are you trying to update a contact with more than 500 properties? (see SO question)
  • did you forget await when calling FlutterContacts.update()?
  • if it fails for the 19th contact, can you retry the same code with just that one contact, and does it still fail?
  • can you try adding android.util.Log.w("XXX", "${ops.size}") before this line
  • etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants