Skip to content

[Bug] Messaging Subscribe stays pending on Android #1361

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

Closed
Neitah opened this issue Jun 26, 2023 · 6 comments
Closed

[Bug] Messaging Subscribe stays pending on Android #1361

Neitah opened this issue Jun 26, 2023 · 6 comments
Labels
api: messaging closed-by-bot needs-info Need information for the developer stale Don't have recent activity type: question

Comments

@Neitah
Copy link

Neitah commented Jun 26, 2023

[REQUIRED] Please fill in the following fields:

  • Pre-built SDK from the website or open-source from this repo: Pre-built SDK
  • Firebase C++ SDK version: 11.2.0
  • Problematic Firebase Component: Messaging
  • Other Firebase Components in use: Core
  • Platform you are using the C++ SDK on: Windows
  • Platform you are targeting: Android

[REQUIRED] Please describe the issue here:

Created a Qt 6.3.1 project with Firebase Messaging.

Received the Firebase Authentication Token

Tried to subscribe to a topic, and it stays pending.

The same code works on iOS.

Steps to reproduce:

Have you been able to reproduce this issue with just the Firebase C++ quickstarts ?
What's the issue repro rate? (eg 100%, 1/5 etc)
100%

What happened? How can we make the problem occur?
This could be a description, log/console output, etc.
The status of the Future gotten from Subscribe stays as kFutureStatusPending

If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.

Relevant Code:

Token received like described here :
https://medium.com/@shigmas/push-notifications-in-qt-for-ios-and-android-50c2f9a38444

Then, I just did this :

::firebase::messaging::Subscribe("TopicToSubscribeObstructed");

@a-maurice
Copy link
Contributor

I'm not clear what the problems you are seeing might be, but there is a handful of additional steps that are needed for Android, such as updating the AndroidManifest to use the ListenerService and MessageForwardingService. For more instructions you can see: https://firebase.google.com/docs/cloud-messaging/cpp/client

For more examples, you can also see https://github.com/firebase/quickstart-cpp/tree/main/messaging/testapp which includes more set up instructions as well.

@a-maurice a-maurice added needs-info Need information for the developer and removed new New issue. labels Aug 1, 2023
@Neitah
Copy link
Author

Neitah commented Aug 2, 2023

Well, the thing is, I receive notifications just fine when using the device token to send, so I don't think that's the problem ? Unless there's additional things to put in the manifest for topic messaging (which I didn't see), then that might be where it comes from ^^'

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Aug 2, 2023
@a-maurice
Copy link
Contributor

Hmm, I can't find anything that would be necessary for subscribing to topics that you wouldn't need for other steps as well. Do you see anything useful in the logs? You can also adjust the log level via:

#include "firebase/log.h"

firebase::SetLogLevel(firebase::kLogLevelVerbose);

which might indicate what the problem is.

@a-maurice a-maurice added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels Aug 8, 2023
@google-oss-bot google-oss-bot added the stale Don't have recent activity label Aug 11, 2023
@google-oss-bot
Copy link

Hey @Neitah. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link

Since there haven't been any recent updates here, I am going to close this issue.

@Neitah if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@ChristophePretty
Copy link

Hi,

I have the same issue on my side, and it is not solved by release 11.4.0:

  • I am trying to subscribe to a topic, on IOS it is working great and my completion callback is called, on Android, the completion callback is never called.
    (FYI, until the bug is fixed, I am using the Java SDK just for the subscribe and it is working)

Thanks

@firebase firebase locked and limited conversation to collaborators Sep 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: messaging closed-by-bot needs-info Need information for the developer stale Don't have recent activity type: question
Projects
None yet
Development

No branches or pull requests

4 participants