[firebase_firestore]: <FirebaseFirestoreException: UNAVAILABLE occurs when app was in the background for a while > #16896
Labels
Needs Attention
This issue needs maintainer attention.
platform: android
Issues / PRs which are specifically for Android.
plugin: cloud_firestore
type: bug
Something isn't working
Is there an existing issue for this?
Which plugins are affected?
Other
Which platforms are affected?
Android
Description
After having the app for a while in the background, when I open the app and try to fetch something from firestore I get the following exception from firebase firestore:
Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Exception: Fetching ads error. Message: PlatformException(firebase_firestore, com.google.firebase.firestore.FirebaseFirestoreException: UNAVAILABLE: Unable to resolve host firestore.googleapis.com, {code: unavailable, message: The service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff.}, null)
However, it works normally on the second try.
I saw similar error reported for native android in 2022:
https://github.com/firebase/firebase-android-sdk/issues/3302
Reproducing the issue
Expected behavior: Data is retrieved
Actual behavior: Exception above occurs:
Firebase Core version
3.8.0
Flutter Version
3.24.4
Relevant Log Output
Flutter dependencies
Expand
Flutter dependencies
snippetReplace this line with the contents of your `flutter pub deps -- --style=compact`.
Additional context and comments
No response
The text was updated successfully, but these errors were encountered: