aws-amplify / amplify-flutter

A declarative library with an easy-to-use interface for building Flutter applications on AWS.
https://docs.amplify.aws
Apache License 2.0
1.31k stars 241 forks source link

DataStoreException #529

Closed sandeepmr29 closed 3 years ago

sandeepmr29 commented 3 years ago

I am inserting data to Dynamo DB using graphQL and aws amplify from flutter app. The app is getting crashed and getting the below error message

"Initial cloud sync failed. W/amplify:aws-datastore( 3108): DataStoreException {message=Error in saving the model: Player[id=f4e13a14-afe3-4dd8-9e9e-3391fe003db5], cause=java.lang.ClassCastException: java.lang.Double cannot be cast to com.amplifyframework.core.model.temporal.Temporal$Timestamp"

this is schema.graphql type Player @model @auth(rules: [{allow: private, operations: [read, create, update, delete]}]) { id: ID! game_id: Int status: String time: AWSTimestamp avatar: String name: String user_id: Int }

I think data to be saved without exception

This issue is reproducible in Android Device Lenovo X3a40 Android version 6.0.1 awsamplify-error

HuiSF commented 3 years ago

Hi @sandeepmr29 thanks for reporting this issue. I will need some more information to understand the cause.

offlineprogrammer commented 3 years ago

Hi @sandeepmr29

I am closing this issue for now as we didn't hear from you We can reopen it if you are still facing the issue and when you provide more details

Regards Mo

b-cancel commented 3 years ago

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 https://github.com/aws-amplify/amplify-flutter/issues/822