Skip to content

Subscribing/Unsubscribing to topics doesn't work on Android[Bug]  #409

Closed as not planned
@AOEGame

Description

@AOEGame

[REQUIRED] Please fill in the following fields:
Unity editor version: _2020.3.17f
Firebase Unity SDK version: 9.1.0, 9.2.0
Source you installed the SDK: __unitypackage
Problematic Firebase Component: Messaging
Other Firebase Components in use: Analytics
Additional SDKs you are using: Analytics,Crashlytics
Platform you are using the Unity editor on: Windows
Platform you are targeting:Android
Scripting Runtime: IL2CPP
[REQUIRED] Please describe the issue here:
Firebase.Messaging.FirebaseMessaging.UnsubscribeAsync(topic).ContinueWith(task =>
{
Debug.Log("FirebaseMessaging.UnsubscribeAsync:" + topic + " status:" + task.Status);

    });

I can not get the debug.log.
also test: awit Firebase.Messaging.FirebaseMessaging.UnsubscribeAsync

android version: 9

Relevant Code:
Firebase.FirebaseApp.LogLevel = Firebase.LogLevel.Verbose;
Firebase.Messaging.FirebaseMessaging.TokenRegistrationOnInitEnabled = true;
Firebase.Analytics.FirebaseAnalytics.SetAnalyticsCollectionEnabled(true);

        Firebase.Messaging.FirebaseMessaging.TokenReceived += OnTokenReceived;
        Firebase.Messaging.FirebaseMessaging.MessageReceived += OnMessageReceived;
        string topic = "Lan_en";

    Firebase.Messaging.FirebaseMessaging.UnsubscribeAsync(topic).ContinueWith(task =>
    {
        Debug.Log("FirebaseMessaging.UnsubscribeAsync:" + topic + " status:" + task.Status);
       
    });

=============
After a lot of testing, I found out that the first launch then subscribe topic is successful. After restart our game then subscribe topic, the subscribeAsync task can not finish.

no error message.

the subscribeAsync task does not have any completion information.

Had set LogLevel:
Firebase.FirebaseApp.LogLevel = Firebase.LogLevel.Debug;

but no error message in android studio logcat!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions