f-miyu / Plugin.CloudFirestore

MIT License
121 stars 44 forks source link

Offline Mode Queries Hang for Minutes #44

Closed barrysohl closed 4 years ago

barrysohl commented 4 years ago

We use Plugin.CloudFirestore extensively throughout our large XF app on both iOS and Android. Overall, we have had great success with the plugin. However, offline mode seems to be badly broken.

Any ideas? Please help! This is an absolute showstopper for us.

barrysohl commented 4 years ago

Turns out forcing 'source' to Cache when offline fixes the issue entirely! After scouring online, it looks like Firestore always tries the network first, waits for a timeout (10sec?), then tries cache. If you have a number of queries to perform, this can means minutes of hang time. Google should really document this better somewhere.