Can't subscribe to topic
I'm trying to subscribe to a topic using the following code (from device):
func connectToFcm() {
FIRMessaging.messaging().connectWithCompletion { (error) in
if (error != nil) {
print("Unable to connect with FCM. \(error)")
} else {
print("Connected to FCM.")
FIRMessaging.messaging().subscribeToTopic("/topics/default-notifications-channel")
}
}
}
The debugger shows the following message:
<FIRMessaging/WARNING> Failed to subscribe to topic Error Domain=com.google.fcm Code=5 "(null)"
I can receive device targeted notifications so APNS configuration is working correctly.
Using Firebase (3.8.0)
Using FirebaseAnalytics (3.5.1)
Using FirebaseCore (3.4.4)
Using FirebaseInstanceID (1.0.8)
Using FirebaseMessaging (1.2.1)
Any ideas? Thank you!
Same here. Registering multiple tropics at once.
I have the same issue with registering multiple topics. Always:
2016-11-09 11:22:52.106: <FIRMessaging/WARNING> Failed to subscribe to topic Error Domain=com.google.fcm Code=5 "(null)"
Yes, same here. Looping through the topics results in errors. As in https://github.com/firebase/quickstart-ios/issues/8 - which is not fixed even though it is closed. I have tried putting 1 second delay between the calls (far from optimal), but even then some of the subscribe calls fail. It would be also great to have callbacks from the subscribeToTopic and unsubscribeFromTopic methods..
Hi All, we are looking into the issues when subscribing to many topics.
Also when subscribing to topics from the iOS SDK you should not prepend the topic name with /topics/ just use the topic name.
Hi @kroikie, thanks for your insight.
The problem occurs even when subscribing to a unique topic. On the other hand, if I subscribe to topics from iOS without prepending the topic name with /topics/ I get the following runtime warning (for a topic called default-notifications-channel):
2016-11-10 09:18:44.562: <FIRMessaging/WARNING> WARNING. Topic name default-notifications-channel should be prefixed with /topics/ as /topics/default-notifications-channel
Thank you!
@sendoa you are correct, sorry, currently the iOS SDK does currently require the /topics/ prefix.
As for the topic subscriptions failing, they should be retried automatically. Have you tried adding a delay between subscriptions as suggested by @olegdynamo?
@kroikie the problem occurs even when subscribing to a single topic.
Thank you!
I have the same issue. Anyone have solution?
We're having the exact same issue, and multi-topic subscriptions is very important to us.
Any news?
Multi-topic subscriptions is very important to anyone!
@sendoa If you are seeing the same error when subscribing to a single topic I would suggest you file a support ticket at firebase.google.com/support since I'm not able to reporduce that. Maybe with more information we can get to the bottom of it. Please identify me in the request so that it can be directed to me.
@all: The issue of subscribing to multiple topics is known and we are implementing a fix. Implementing a delay between subscriptions should help in the mean time.
Hi @kroikie , when are you going to release the fix? Do you have estimation time?
A delay workaround is ok only in theory, in real world it can't be done because you can't know how long the delay should be. Looking forward for the fix.
same problem here
Why is Google ignoring us??
@All I apologize for the delay in resolving this issue.
As an update: We have identified the issue and a fix is in the works and will be released soon.
@kroikie do you have news about this issue?
My workaround was a delay between subscriptions.
@kroikie Have the fixed version already released? I can not found it on here https://firebase.google.com/support/release-notes/ios
@kroikie Is there any progress?