I am using AWS Appsync, AWS datastore, Aws Cognito, Aws API. When I am trying to save data on AWS Datastore it gives me this error
DataStoreError: The operation couldn’t be completed. (SQLite.Result error 0.).
let msg = Message.init(....)
//where Message is genrated from amplify codegen models
print(msg) // Output Message()
Amplify.DataStore.save(msg) { result in
print(msg)// Output Message()
switch result {
case .success:
print("Post saved successfully!")
case .failure(let error):
print("Error saving post \(error)")
}
}
I also get this response in my console.
[SQLiteStorageEngineAdapter] insert into Message (.....) values (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
I have created another sample project using the same model and it works fine there.