-
Notifications
You must be signed in to change notification settings - Fork 248
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
Error handling Maps as nested Serialized Custom Types in Android #5457
Comments
Hi @kryptx, thank you for taking the time to open this issue. We'll need to take some time to reproduce the error to verify if your change is valid. We will provide updates here when we have them. |
To follow up, I made the following changes in my project:
Since those changes, I don't have this problem anymore, on version 2.4.1, flutter 3.24.3. I'm comfortable if you want to close this, in the absence of somebody else having the same problem. |
@kryptx do you know which of those changes in your project fixed the issue for you or did you make all those changes around the same time and it seemed to fix on its own? |
Hi @khatruong2009, thanks for your reply. Unfortunately I had set this issue aside and proceeded with development using my forked plugin, and also mostly testing on iOS. I have however tested downgrading to flutter 3.22.0 and confirmed that I'm still unable to reproduce the issue. My app does also still have a |
Hi @kryptx, since you're not having the issue anymore, I'll close it for now. If you, or anyone else, has this issue or another one, please feel free to reopen this issue or create a new one, thanks. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Description
During synchronization on Android, my app produces the following error:
After this, the DataStore sync process must be restarted or records will not be synchronized.
On iOS, this issue does not occur, however I'm not 100% certain that this issue has no impact on iOS. I can confirm only that I'm unable to reproduce the error log output and sync stopping except on Android.
Categories
Steps to Reproduce
In my app, the error occurs when a
FlightSearch
is deleted in the app, or when aFlightSearchResult
is received from the platform (they are created with IAM, and the app receives them via synchronization).I've dug into this stack trace and found that we seem to be receiving a
Map
when we use a certain data structure in our schema. I believe it is when we define a property as containing an array of objects, and those objects are not themselves "models" (annotated with@model
). In the schema, this property istripLegs
.Additionally, I've created a draft PR in my own space that resolves this issue for me locally. I have little confidence that this is how you would want the problem solved, but hopefully this will make clear what part of the logic is failing for me: https://github.com/kryptx/amplify-flutter/pull/1/files
I'm willing to take this PR further if you confirm you would accept it (once tests are included along with any other contributing guidelines), but my goal with it was just to prove and clearly illustrate the problem I'm having.
Screenshots
No response
Platforms
Flutter Version
3.22.0
Amplify Flutter Version
3.4.1
Deployment Method
Amplify Gen 2
Schema
The text was updated successfully, but these errors were encountered: