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
[Feedback] Amplify subscriptions stop when app goes to sleep. Don't resubscribe #8513
Comments
Hi @spmatthews03! This looks like a JS library-related issue. I'm going to transfer this issue there. |
@spmatthews03 are you using |
@chrisbonifacio API. I semi fixed it buy a listener on AppState and if subscriptions are null then I reload ALL subscriptions. just 8 of them soits not terrible and only if their componentn is mounted |
@spmatthews03 I'm currently running into the same issue. Can you share your implementation for listening to AppState, checking if subscriptions are null and reloading all subscriptions? |
@spmatthews03 Nice workaround! I'm going to find out if this issue is expected behavior so I know if it's either a bug or a feature request that can be built in. |
@spmatthews03 Thank you, this would be super-helpful if you could find out. |
Hey @spmatthews03 and @dave-vazquez, so I did talk to the team about this. At the moment re-establishing connections to subscriptions is only handled by Amplify in the DataStore category. Unfortunately, this functionality is not yet available out of the box from the API category as explained here #7057 (comment) That being said, until we do implement automatic resubscribing in |
Thanks @chrisbonifacio ! Very much apprrciated |
Is this still being worked on? |
Hello. I need to solve this issue. It happens to frequently in ios. @spmatthews03 Can you also share your workaround to me? |
Good news. Automated Reconnection is now available on the latest Please review our breaking change guidance before upgrading your application. To upgrade Amplify to version 5, run the following in your project folder:
Check With this behavior released, I am closing this issue as resolved. |
Page:
/guides/q/platform/js
Feedback:
I'm trying to have a simple subscription and it works until the phone goes to sleep, or if the app is in the background for too long. I would like a way to resubscribe to the data so my UI and my server are not out of sync.
The text was updated successfully, but these errors were encountered: