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

longer aws sync #1043

Closed
2 tasks done
nazarcybulskij opened this issue Sep 26, 2023 · 8 comments
Closed
2 tasks done

longer aws sync #1043

nazarcybulskij opened this issue Sep 26, 2023 · 8 comments
Labels
cms An issue identified as a cms bug/feature pending-response An issue is pending response from the issue requestor pending-triage An issue that is pending triage studio-ui An issue that needs to be tracked by Studio Console team transferred An issue was transferred from another Amplify Repository

Comments

@nazarcybulskij
Copy link

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

20.7.0

Amplify CLI Version

12.4.0

What operating system are you using?

Mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

my graphql.scheme

Project Identifier: df8859697cc34bfcc6c75d3b8ac77f70

Describe the bug

After updating the data in the 'Content' section, I encountered the following message: "Syncing data to the cloud. Please do not navigate away from this page." However, the data syncing process seems to be taking longer than expected or may not be completing successfully.

Data don't save in dynamoDB

Expected behavior

  1. new Blog object save in Datastore

Reproduction steps

  1. Go to the 'Content' section.
  2. Create new Blog object
    3)Observe the message "Syncing data to the cloud."

Project Identifier

No response

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@nazarcybulskij nazarcybulskij added the pending-triage An issue that is pending triage label Sep 26, 2023
@ykethan
Copy link
Member

ykethan commented Sep 26, 2023

Hey @nazarcybulskij, thank you for reaching out. In the browser debug console, do you observe any errors on the console or the network tab?
Additionally, is datastore/conflict-resolution currently enabled on the GraphQL API?

transferring to Amplify studio repository.

@ykethan ykethan transferred this issue from aws-amplify/amplify-cli Sep 26, 2023
@ykethan ykethan added cms An issue identified as a cms bug/feature pending-response An issue is pending response from the issue requestor studio-ui An issue that needs to be tracked by Studio Console team transferred An issue was transferred from another Amplify Repository labels Sep 26, 2023
@nazarcybulskij
Copy link
Author

Hey @nazarcybulskij, thank you for reaching out. In the browser debug console, do you observe any errors on the console or the network tab? Additionally, is datastore/conflict-resolution currently enabled on the GraphQL API?

transferring to Amplify studio repository.

Yes , datastore/conflict-resolution currently enabled on the GraphQL API. I use optimistic stategy

@github-actions github-actions bot removed the pending-response An issue is pending response from the issue requestor label Sep 26, 2023
@ykethan
Copy link
Member

ykethan commented Sep 26, 2023

Hey @nazarcybulskij, I was able to reproduce the issue. The error being thrown is

One or more parameter values were invalid: Type mismatch for Index Key commentBlogsId Expected: S Actual: NULL IndexName: gsi-Comment.blogs

From the error message and the provided schema, the issue appears to be occurring when not passing the commentID on the Blog data model. From the schema provided the models have a bidirectional relationship, the Blog belongs to one Comment, and the Comment can be associated to many Blogs where the relationship requires commentID.

To mitigate the issue, marking the comment as required on the blog model should ensure a commentID is provided on a mutation.

@ykethan ykethan added the pending-response An issue is pending response from the issue requestor label Sep 26, 2023
@knelyoo
Copy link

knelyoo commented Sep 30, 2023

I am seeing the same issue with my Amplify setup.

error message "Syncing data to cloud. Please do not navigate away from this page"

The update never get synced into the dynamodb. The mobile app that uses the dynamodb also get read/write errors.

However when i user AppSync to query and run mutation it get synced to the dynamodb.

Not sure what changed.

I may have entered wrong data because am populating dynamodb manually via Amplify.

Are there any checks i can run against dynamodb to verify consistent data.

Am new to amplify just 3 months playing with it.

@ykethan
Copy link
Member

ykethan commented Oct 2, 2023

@knelyoo ensure the the records dont have any type mismatch.
For example, if you have a field with say Phone number. In DynamoDB if you create the record with say () between the numbers. The sync on Studio may fail due to type mismatch.
Also ensure if you do have any fields with index say

ABC: ID @index(name: "byUser", sortKeyFields: ["time"])
time: AWSDateTime

ensure the time field is also filled in as the ABC field depends on the time field value.
The error message on the browser debug console should also provide the reason for failure if any.

@ykethan
Copy link
Member

ykethan commented Oct 24, 2023

Closing the issue due to inactivity, please feel free in reaching out to us again.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@jlolofie
Copy link

jlolofie commented Jan 5, 2024

This still happens with no sign of why or how to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cms An issue identified as a cms bug/feature pending-response An issue is pending response from the issue requestor pending-triage An issue that is pending triage studio-ui An issue that needs to be tracked by Studio Console team transferred An issue was transferred from another Amplify Repository
Projects
None yet
Development

No branches or pull requests

4 participants