Comments (6)
@harrynguyen2510 thanks for taking the time to raise this issue. While we investigate could you please provide answers to the following questions:
- did you run
amplify codegen models
after schema update? - do you get any error message when calling Amplify.Datastore.save, if so can you please share the logs?
- dose Amplify.Datastore.save saves the data locally on the device?
from amplify-flutter.
- yes I did, even to make sure, I delete Models folder and run command
amplify codegen models
- yes it saves normally and the subscription catches new data locally, but it does not sync to cloud
from amplify-flutter.
@harrynguyen2510 thanks for providing these info. Is this issue exclusive to iOS, or does it also happen in Android? could you please provide both the original and updated schemas?
from amplify-flutter.
I didn't test on Android, but I tested on 3 iOS devices, and it happened the same bug.
Here is current Schema
type User @model @auth(rules: [{allow: public}]) {
id: ID!
authenticateID: String!
username: String!
fullname: String!
email: String!
phonenumber: String
password: String
profilepicKey: String
bio: String
resign: Boolean
isDeveloperPermit: Boolean
isActive: Boolean
updateUserType: String
oneSignalID: [String]
updateOneSignalIDType: String
platform: String
deviceToken: [String]
updateDeviceTokenType: String
userPermission: [String]
updateUserPermissionType: String
authority: [String]
updateAuthorityType: String
followingUserids: [String]
updateFollowingType: String
followedbyUserids: [String]
updateFollowedbyType: String
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type EmployeeCode @model @auth(rules: [{allow: public}]) {
id: ID!
ecode: String!
name: String!
dob: String!
title: String!
confirmemail: Boolean
email: String
department: String!
connectUser: String
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type Member @model @auth(rules: [{allow: public}]) {
id: ID!
admin: Boolean
userID: String!
onChatroomid: String
onGroupid: String
updatedAt: AWSDateTime
createdAt: AWSDateTime
}
type FollowRelation @model @auth(rules: [{allow: public}]) {
id: ID!
followerID: String!
followeeID: String!
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type Chatroom @model @auth(rules: [{allow: public}]) {
id: ID!
chatgrouppickey: String
chatgroupName: String
isGroup: Boolean
lastupdateTime: String!
lastupdateDate: String!
createdbyUserID: String!
isDeleted: Boolean
updateType: String
adminID: [String]
updateAdminType: String
members: [String]
updateMemberType: String
isPinnedByUserIDs: [String]
updatePinType: String
isNewMessageForUserIDs: [String]
updateHaveNewMessageType: String
userIDsTyping: [String]
updateTypingType: String
createdAt: AWSDateTime
updatedAt: AWSDateTime
currentSeenByUserids: [String]
allowChangeUI: Boolean
lastMessage: String
lastMessageid: String
}
type MessageItem @model @auth(rules: [{allow: public}]) {
id: ID!
content: String
filekey: [String]
hasFile: Boolean
contenttype: String!
replyFromMessageid: String
sentbyUserID: String!
onChatroomID: String!
isforward: Boolean
isDeleted: Boolean
withPollID: String
isLastMessageOnRoom: Boolean
updateMessageType: String
reactedBy: [String]
updateReactType: String
currentlySeenBy: [String]
updateSeenType: String
savedby: [String]
updateSaveType: String
createdTime: String
createdDate: String
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type ReactionItem @model @auth(rules: [{allow: public}]) {
id: ID!
reactionType: String!
reactedbyUserID: String!
onMessageitemID: String!
onChatroomID: String!
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type SaveMessage @model @auth(rules: [{allow: public}]) {
id: ID!
savedbyUserID: String!
atMessageitemID: String!
onChatroomID: String!
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type GroupPost @model @auth(rules: [{allow: public}]) {
id: ID!
groupname: String!
grouppic: String
createdby: String!
updateGroupPostType: String
adminID: [String]
updateAdminType: String
members: [String]
updateMemberType: String
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type Post @model @auth(rules: [{allow: public}]) {
id: ID!
content: String!
filekey: [String]
hasFile: Boolean
withPollID: String
postedbyUserID: String!
postedonGroupID: String
isEdited: Boolean
updatePostType: String
pinDueDate: String
isPinDepartment: Boolean
isPinGlobal: Boolean
pinGlobalForSpecific: [String]
updatePinGlobalForSpecificType: String
likeByUserids: [String]
updateLikeType: String
savedby: [String]
updateSaveType: String
createdTime: String
craatedDate: String
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type Comment @model @auth(rules: [{allow: public}]) {
id: ID!
content: String
onPostid: String
commentedbyUserID: String
filekey: [String]
hasFile: Boolean
isEdited: Boolean
updateCommentType: String
likeByUserids: [String]
updateLikeType: String
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type Reply @model @auth(rules: [{allow: public}]) {
id: ID!
content: String
onCommentid: String
onPostid: String
repliedbyUserID: String
filekey: [String]
hasFile: Boolean
isEdited: Boolean
updateReplyType: String
likeByUserids: [String]
updateLikeType: String
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type PollContent @model @auth(rules: [{allow: public}]) {
id: ID!
createdByUserid: String!
title: String!
filekey: [String]
hasFile: Boolean
pollDueDate: String
allowSelect: Boolean!
mutipleSelect: Boolean
updatePollType: String
optionOne: String!
optionOneVoteByUserids: [String]
updateOptionOneType: String
optionTwo: String!
optionTwoVoteByUserids: [String]
updateOptionTwoType: String
optionThree: String
optionThreeVoteByUserids: [String]
updateOptionThreeType: String
optionFour: String
optionFourVoteByUserids: [String]
updateOptionFourType: String
optionFive: String
optionFiveVoteByUserids: [String]
updateOptionFiveType: String
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type Like @model @auth(rules: [{allow: public}]) {
id: ID!
onPostid: String
onCommentid: String
onReplyid: String
likedbyUserID: String
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type SavePost @model @auth(rules: [{allow: public}]) {
id: ID!
savedby: String
atPostid: String
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type Bell @model @auth(rules: [{allow: public}]) {
id: ID!
sentbyUserID: [String!]!
updateSentByType: String
toUserID: String!
belltype: String!
didRead: Boolean!
postid: String
commentid: String
replyid: String
groupid: String
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type AnonymousQuery @model @auth(rules: [{allow: public}]) {
id: ID!
content: String!
didRead: Boolean!
adminResponse: String
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type UserPermission @model @auth(rules: [{allow: public}]) {
id: ID!
key: String!
value: String!
forUserid: String!
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type UserAuthority @model @auth(rules: [{allow: public}]) {
id: ID!
userID: String!
authority: String!
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type SpecialObject @model @auth(rules: [{allow: public}]) {
id: ID!
type: String!
key: String!
value1: String!
value2: String
value3: String
value4: String
value5: String
value6: String
value7: String
value8: String
value9: String
value10: String
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
type BugDetect @model @auth(rules: [{allow: public}]) {
id: ID!
userid: String!
bug: String!
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
This is a schema I removed currently (did remove others some before, but worked normally)
type MediaFileRatio @model @auth(rules: [{allow: public}]) {
id: ID!
filekey: String!
ratio: Float!
}
I deleted all data on this model, then delete on schema.graphql, amplify codegen models, amplify push, then deploy on studio
Another question that I see some amplify flutter plugins are 2.0.0. Are these for Gen 2 or just upgrade version for Gen 1?
Thanks
from amplify-flutter.
@harrynguyen2510 thank you for providing these details. we will look into this issue and get back to you with any updates.
re: Another question that I see some amplify flutter plugins are 2.0.0. Are these for Gen 2 or just upgrade version for Gen 1?
The latest version of the Amplify Flutter library is 2.0.0, which currently supports Gen1 configurations through amplifyconfiguration.dart
. you can use either Amplify Gen1 or Gen2 to setup your backend. With Amplify Gen2, you must use the --outputs-version 0
flag with ampx command. Development for supporting Gen2 with --outputs-version 1
is in progress, you can follow #4834 for update.
from amplify-flutter.
The cause of issue is that I mistakely change attribute name of schema model while the model on cloud, on that attribute, currently having values. So it was error for sync
Resolved by deleting these data of schema model in DynamoDB, then it works normally
from amplify-flutter.
Related Issues (20)
- Pinpoint Notifications always use APNs Sandbox channel HOT 11
- Login with email is slow HOT 18
- Amplify Fails to Configure - WorkerBeeExceptionImpl HOT 5
- AmplifyAPI modelProvider not working moving from v1 to v2 HOT 2
- NotAuthorizedServiceException when answering NEW_PASSWORD_REQUIRED challenge HOT 7
- correctClockSkew option HOT 1
- Amplify.API.mutate HOT 7
- Customize title of Authentication with Amplify flutter Authentication UI HOT 3
- Network error when trying to authenticate from a release apk HOT 3
- How to use SyncExpression with GroupPredicate HOT 3
- Gen2 - Quick Start guide does not work - ConfigurationError: The provided configuration is not a valid json HOT 3
- Build failed with an exception
- Error message is unclear when oauth is missing from config HOT 3
- [iOS] building with debug flag makes the app crash HOT 2
- aws_signature_v4 - flutter and aws lex bot integration HOT 3
- Data not updated by API GraphQL HOT 3
- Feature Request: GraphQL query with sorting by date with secondary index HOT 4
- DataStore initial sync slower after recreating auth and schema has owner-based permissions HOT 6
- amplify_auth_cognito:compileDebugJavaWithJavac HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amplify-flutter.