Open JeremyLabelIO opened 3 months ago
Hello @JeremyLabelIO thank you for submitting this issue. We will look into this and get back to you!
Hi @JeremyLabelIO,
Are you pausing the app during a sync? Or do you lose sync functionality when pausing the app?
DataStore changed in 2.1.0 to use our Dart first API category instead of using Amplify Swift under the hood. I suspect subscriptions management differs, specifically when the app isn't in the foreground.
In the meantime, give one of these two workarounds a try.
These are just my initial thoughts. We'll provide a more concrete solution once we've looked into it more.
Hi @Equartey
I already try to stop and start DataStore when the app is being pause/resumed but without success.
I confirm it is working with Amplify Flutter 2.0.0 but I have other issue with this version (mostly in Android) and it is complicated for us to maintain different version for iOS and Android.
Do you think it will be fix soon ?
Best Regards,
Jeremy
Hi @JeremyLabelIO
I was able to reproduce the syncing issue following the steps you provided. We will track this as a bug and will let you know if there are any updates.
Hi @tyllark
Thanks a lot.
No problem, we will let you know when we have an update.
Hello @tyllark
We are encountering the same issue with API (GraphQL) subscriptions, where the sync stops when the app is in the background or the screen is off (only in Release mode). Could you please provide any updates on when this issue might be resolved?
Thank you!
Hi @gauravwagh1, we are still working to determine the root cause and will get back to you with any updates.
Description
Hi,
After updating amplify_flutter and amplify_datastore from 1.8.0 to 2.1.0 if I put my iOS app in background, turn off the screen, the sync is completely stopped. The only way to start sync again is to kill the app and relaunch it.
Everything works fine in debug but not in release.
I already try this :
As of next steps, please enable optimizations in your debug build and see if the issue is occurring when enabling the optimization. In addition, by using this way you will be able to obtain logs regarding the issue: https://github.com/apple/swift/blob/main/docs/OptimizationTips.rst#enabling-optimizations
But I have still no logs and no changes.
flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.22.2, on macOS 14.1 23B74 darwin-arm64, locale fr-FR) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.4) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.3)
Pubspec :
environment: sdk: '>=3.3.0 <4.0.0'
dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter flutter_launcher_icons: intl: ^0.19.0 amplify_flutter: 2.1.0 amplify_datastore: 2.1.0 amplify_api: 2.1.0 amplify_auth_cognito: 2.1.0 amplify_storage_s3: 2.1.0
Categories
Steps to Reproduce
Screenshots
No response
Platforms
Flutter Version
3.22.2
Amplify Flutter Version
2.1.0
Deployment Method
Amplify CLI
Schema
No response