Skip to content

Error getting firebase messaging token #2842

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

Open
LucaVs opened this issue Mar 27, 2025 · 2 comments
Open

Error getting firebase messaging token #2842

LucaVs opened this issue Mar 27, 2025 · 2 comments

Comments

@LucaVs
Copy link

LucaVs commented Mar 27, 2025

I have an Android App that get the firebase messaging token with this code:


FirebaseMessaging.getInstance().getToken().addOnCompleteListener(
                        task -> {
                            if (task.isSuccessful()) {
                                Toast.makeText(this, "token ok", Toast.LENGTH_SHORT).show();
                                String token = task.getResult();
                                Log.i("token ---->>", token);
                                sendFirebaseToken(token);
                            } else {
                                Toast.makeText(this, "token fail", Toast.LENGTH_SHORT).show();

                                Toast.makeText(this, task.getException().toString(), Toast.LENGTH_SHORT).show();


                            }
                        }
                );

On a Googled android device it woks fine but on a Sony Xperia XA2 with Sailfish + Microg I have the exception:

IOException:SERVICE_NOT_AVAILABLE

On MicroG settings I have Cloud Messaging enabled and Connected. The same for Google device registration.

What could I check anymore?

Thanks

@mid-kid
Copy link

mid-kid commented Apr 8, 2025

This sounds similar to my issue: #2832
If it is, can you help maybe make the simplest scenario that reproduces this bug? I feel it'd help a lot in debugging microg itself.

@LucaVs
Copy link
Author

LucaVs commented Apr 8, 2025

The only way I can suggest to reproduce the issue is the code I provided on my first post.
In my case I can't confirm it's related to microg itself or Sailfish OS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants