You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am trying to save items using Datastore.save() method but it's not letting me do it. But it seems like the data is being saved in local storage (sqlite), I tried to log events using Amplify hub and it's only logging "outboxStatus" and "outboxMutationEnqueued" events whenever the save() method is called.
Expected behavior
It should save the items in the cloud data store.
Screenshots
This is the data model of project
And this is the screenshot of content page which states "2 posts failed to sync"
Platform
Amplify Flutter currently supports iOS and Android. This issue is reproducible in (check all that apply):
[√] Android
[x] iOS
[√] Flutter (Channel stable, 2.0.4, on Microsoft Windows [Version 10.0.19042.868], locale en-US)
• Flutter version 2.0.4 at C:\flutter\flutter
• Framework revision b1395592de (10 days ago), 2021-04-01 14:25:01 -0700
• Engine revision 2dce47073a
• Dart version 2.12.2
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\Asus\AppData\Local\Android\Sdk
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = C:\Users\Asus\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code (version 1.55.1)
• VS Code at C:\Users\Asus\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.21.0
[√] Connected device (3 available)
• sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.114
• Edge (web) • edge • web-javascript • Microsoft Edge 89.0.774.75
• No issues found!
Smartphone (please complete the following information):
Device: Android emulator (Pixel 3a)
OS: Android 11
Additional context Graphql Schema
enum PostStatus {
ACTIVE
INACTIVE
}
type Post @model {
id: ID!
title: String!
rating: Int!
status: PostStatus!
# New field with @connection
comments: [Comment] @connection(keyName: "byPost", fields: ["id"])
}
# New model
type Comment @model @key(name: "byPost", fields: ["postID", "content"]) {
id: ID!
postID: ID!
post: Post! @connection(fields: ["postID"])
content: String!
}
Code to save the items
Post post = Post(
title: 'My Post with comments',
rating: 10,
comments: [],
status: PostStatus.ACTIVE);
Comment comment = Comment(
post: post, // Directly pass in the post instance
content: 'Loving Amplify DataStore!');
await Amplify.DataStore.save(post);
print('Post saved');
await Amplify.DataStore.save(comment);
print('Comment saved');
Console logs (only two events i.e., "outboxStatus" and "outboxMutationEnqueued" are logged by Amplify Hub)
This is a bug report I just filed that includes a couple of bugs I found and the workarounds to each
after reading your bug report I think it could help others that might land on this page #822
Describe the bug
I am trying to save items using Datastore.save() method but it's not letting me do it. But it seems like the data is being saved in local storage (sqlite), I tried to log events using Amplify hub and it's only logging "outboxStatus" and "outboxMutationEnqueued" events whenever the save() method is called.
To Reproduce
Steps to reproduce the behavior:
Following the documentation (https://docs.amplify.aws/lib/datastore/relational/q/platform/flutter#updated-schema)
Expected behavior
It should save the items in the cloud data store.
Screenshots
This is the data model of project
And this is the screenshot of content page which states "2 posts failed to sync"
Platform
Amplify Flutter currently supports iOS and Android. This issue is reproducible in (check all that apply):
[√] Android
[x] iOS
Smartphone (please complete the following information):
Additional context
Graphql Schema
Code to save the items
Console logs (only two events i.e., "outboxStatus" and "outboxMutationEnqueued" are logged by Amplify Hub)
The text was updated successfully, but these errors were encountered: