Open
Description
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!