Skip to content
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

[firebase_firestore]: <FirebaseFirestoreException: UNAVAILABLE occurs when app was in the background for a while > #16896

Open
1 task done
begovsky opened this issue Dec 18, 2024 · 0 comments
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

Comments

@begovsky
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

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

  1. Put app in the background for a couple of hours
  2. Open the app
  3. Fetch something from firestore

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 snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.

Additional context and comments

No response

@begovsky begovsky added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Dec 18, 2024
@SelaseKay SelaseKay added plugin: cloud_firestore platform: android Issues / PRs which are specifically for Android. labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants