-
Notifications
You must be signed in to change notification settings - Fork 549
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
[Question&Help] Why receive DefaultDataset: Synchronize failed because it exceeded the maximum retries #3515
Comments
Can you let me know if you still have the same issue on the latest version of the AWS Android SDK. The version you are using is over 4 years old (Released Nov 2019). |
After further research, these classes aren't in the latest version as it was deprecated in favor of AppSync SDK. Line 376 in 318f759
The error comes from here. Synchronize will internally attempt to do so 3 times before giving up. If you turn on the logger for |
hi, |
I would assume it is network related, or possibly auth. Feel free to post additional logs once DefaultDataset logging is set to debug or verbose logging. |
@tylerjroach 03-11 14:54:02.311 3295 3956 D AWS4Signer: AWS4 Canonical Request: '"POST this line in log, is in onFailure() callback and exception is DataStorageException 03-11 14:54:02.852 3295 3956 E APP:AWS: sync count: 5285 full callback code as below:
sdk version:
|
State your question
Some times after call dataSet?.synchronize(callback) will print in log
DefaultDataset: Synchronize failed because it exceeded the maximum retries
and receive Dataset.SyncCallback.onFailure(dse: DataStorageException?)
com.amazonaws.mobileconnectors.cognito.exceptions.DataStorageException: Synchronize failed because it exceeded the maximum retries
Not receive any other callback such as "onConflict,onDatasetDeleted,onDatasetsMerged,onSuccess"
Which AWS Services are you utilizing?
implementation 'com.amazonaws:aws-android-sdk-cognito:2.16.3'
implementation 'com.amazonaws:aws-android-sdk-kinesis:2.16.3' // keep this version will keep core version
implementation 'com.amazonaws:aws-android-sdk-s3:2.16.3'
implementation 'com.amazonaws:aws-android-sdk-core:2.16.3'
Provide code snippets (if applicable)
lastSyncDataTime = System.currentTimeMillis()
var cost = System.currentTimeMillis()
GlobalScope.launch(Dispatchers.IO ) {
val callback = object : Dataset.SyncCallback {
val datasetDebug: Any? = "Sync"
override fun onSuccess(
dataset: Dataset?,
updatedRecords: MutableList?,
): Unit {
datasetDebug?.let {
Timber.tag("AWS").e("syncDataSet.onSuccess, update.size=${updatedRecords?.size}")
Timber.tag("synchronize-cost").d("cost.callback :${System.currentTimeMillis() - cost}")
}
Environment(please complete the following information):
2.16.3
Device Information (please complete the following information):
If you need help with understanding how to implement something in particular then we suggest that you first look into our developer guide. You can also simplify your process of creating an application, as well as the associated backend setup by using the Amplify CLI.
The text was updated successfully, but these errors were encountered: