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.33k stars 248 forks source link

Freeze on offline WiFi with Selective Sync: Query and Save calls get stuck in await #5662

Open giulitu95 opened 2 days ago

giulitu95 commented 2 days ago

Description

This problem occurs on Android platforms when the device is connected to a wify network without internet connection. If a selective sync is configured and data are cyclically saved on the datastore, eventually, the execution gets stuck in the save method. My configuration includes Datastore, Api and Auth plugins.

Categories

Steps to Reproduce

  1. Start the app with internet connection
  2. Initialize amplify
  3. Sign-up and Sign-in with Cognito authentication
  4. Switch the device to a wify without internet connection
  5. Cyclically call the method await Amplify.Datastore.save(model)
  6. Eventually, the execution gets stuck in an await

Screenshots

No response

Platforms

Flutter Version

3.24.4

Amplify Flutter Version

2.5.0

Deployment Method

Amplify CLI (Gen 1)

Schema

No response

Equartey commented 1 day ago

Hi @giulitu95, thanks for taking the time to open this issue. We will investigate this issue and provide an update when we can.