Skip to content

[Bug] Subscribe/Unsubscribe does not work after first session - Firebase 12.8.0 - Android #1245

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
AliA74 opened this issue May 5, 2025 · 1 comment

Comments

@AliA74
Copy link

AliA74 commented May 5, 2025

Description

Using this simple code to subscribe/unsubscribe from Firebase Messaging Topics:

Debug.Log($"[FirebaseTopic] HERE");

Debug.Log($"[FirebaseTopic] XXX Trying To Subscribe to {FINISHED_LEVELS_TOPIC}"); 
await FirebaseMessaging.SubscribeAsync(FINISHED_LEVELS_TOPIC);
Debug.Log($"[FirebaseTopic] Subscribed to {FINISHED_LEVELS_TOPIC}");

It only works on first launch of the application. after closing and launching again it does not work! No Errors, Just the Async method does not finish.
NOTE: I am using Firebase version 12.8.0. OnTokenReceieved is also called on every launch of the app so no problem there and not a duplicate of issue #1088

Reproducing the issue

Call subscribe method inside handler of OnTokenReceived. build and run the app, subscribe happens successfuly for first launch, close the app and launch again,

Firebase Unity SDK Version

12.8.0

Unity editor version

2021.3.43f1

Installation Method

.unitypackage

Problematic Firebase Component(s)

Messaging

Other Firebase Component(s) in use

Analytics, Crashlytics

Additional SDKs you are using

No response

Targeted Platform(s)

Android

Unity editor platform

Windows

Scripting Runtime

IL2CPP

Release Distribution Type

Pre-built SDK from https://firebase.google.com/download/unity

Relevant Log Output

If using CocoaPods for Apple platforms, the project's Podfile.lock

Expand Podfile.lock snippet
👀 Replace this line with the contents of your Podfile.lock!
@AliA74 AliA74 added new New issue. type: bug labels May 5, 2025
@google-oss-bot
Copy link

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

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

No branches or pull requests

3 participants