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

FirebaseMessaging : Disable retry Topic operation upon connection without internet #5980

Open
haizadvnet opened this issue May 21, 2024 · 2 comments
Labels

Comments

@haizadvnet
Copy link

Our app users have reported an issue where the app is slow to start, sometimes taking around 1 minute to fully load. This problem occurs when their devices have no data left, even though mobile data is turned on. Interestingly, this issue does not happen when mobile data is turned off.

The app is built using Flutter. We suspect that this issue is caused by the Firebase Messaging SDK on Android, which assumes the connection will recover soon and thus runs a retry operation. This retry operation appears to occur after Firebase.initializeApp is called:

FirebaseApp firebaseApp = await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
);

The log message after opening the app is as follows:

Topic operation failed: SERVICE_NOT_AVAILABLE. Will retry Topic operation.

We want to disable the retry operation because we don't want the user to wait too long for the app to start. How can we achieve this?

@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@lehcar09
Copy link

Hi @haizadvnet, thank you for reaching out. For context, SERVICE_NOT_AVAILABLE means one of the following issues:

  1. The phone is offline.
  2. The phone is online but it cannot reach Google servers.
  3. The firebase messaging servers are temporarily unavailable.
  4. Google Play services are not installed on the phone.
  5. Google Play services are in an extremely bad state.

Currently, there is no way to disable the topic sync retry operation. Disabling topic synchronization means that your app will not receive updates to topics or topic subscriptions from the Firebase backend that might affect the apps that relies on topic-based messaging.

I'll mark this as a feature request to keep this under our radar. However, we can’t provide any timeline for this.

For folks who find this useful, adding an emoji thumbs up on the original post can help us prioritize adding this to the roadmap.

@lehcar09 lehcar09 added the type: feature request New feature or request label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants