I'm having troubles to use LiveCollections, more concretely to subscribe to a community

Each time I’m trying to subscribe to a community I get

Failed to subscribe to topic 61d573bf0e712d7b4ea2ce71/social/community/61d5741bfd40a2681c6d5cf9/post/+ O
error Error: Amity SDK (800000): Unexpected error
 at construct (native)
    at _createSuperInternal (
    at call (native)
    at ASCUnknownError (
    at callbackWrapper (
    at cb (
    at anonymous (
    at anonymous (
    at work (
    at anonymous (
    at doWrite (
    at writeOrBuffer (
    at anonymous (
    at ondata (
    at call (native)
    at emitOne (
    at emit (
    at addChunk (
    at readableAddChunk (
    at anonymous (
    at anonymous (
    at onreadable (
    at call (native)
    at emitNone (
    at emit (
    at emitReadable_ (
    at apply (native)
    at anonymous (
    at drainQueue (
    at apply (native)
    at anonymous (
    at _callTimer (
    at callTimers (
    at apply (native)
    at __callFunction (
    at anonymous (
    at __guard (
    at callFunctionReturnFlushedQueue (

My test code is pretty much what is in the guide

const subscribePostTopic = (targetType: string, targetId: string) => {
		if (isSubscribed.current) return;

		// Community is currently the only target we are fetching posts now
		if (targetType === 'community' && community?.data) {
			const communityTopic = getCommunityTopic(
			console.log('here', community.data);
				subscribeTopic(communityTopic, e => {
					console.log('error', e.stack); // use callback to handle errors with event subscription
			isSubscribed.current = true;

Was anyone else able to get live updates from the community posts?

Hi @dlartor ,

May we please confirm the platform and version?

Thank you,
Amity Support

Yes, im on the latest 6.1 version and using it on React Native IOS.
I also tested the same code on Android and it works.

You can only subscribe to communities that you are a member of.
Could you verify if the logged in user is a member of that community?

Thanks cijin,
I just added a little update. I was able to see it working on Android, and I’m also already member of the community. Any other ideas? I think it may be something related to the platform.


Yes it might be. I’ll create a ticket and get back to you. I’m guessing you are using getPosts?

Update on this, I checked and I’m unable to reproduce the issue. Could you verify if the Mqtt connection was successful?

Failed to subscribe to topic 61d573bf0e712d7b4ea2ce71/social/community/61d5741bfd40a2681c6d5cf9/post/+ O

Also, is the 0 at the end part of the topic string? Or can be ignored?

The 0 is not part of the path, sorry it must have escaped me.
How can I check this more specifically. I’m getting logs about the subscription being successfully established to other subscription channels which I think are default when the user logs in.

Subscribed to topic 61d573bf0e712d7b4ea2ce71
Subscribed to topic 61d573bf0e712d7b4ea2ce71/smartfeed/63ebb619ec8f6fcd85941faa/channels
Subscribed to topic 61d573bf0e712d7b4ea2ce71/smartfeed/63ebb619ec8f6fcd85941faa/messagefeeds
Subscribed to topic 61d573bf0e712d7b4ea2ce71/smartfeed/63ebb619ec8f6fcd85941faa/messages
Subscribed to topic 61d573bf0e712d7b4ea2ce71/user/63ebb619ec8f6fcd85941faa

Also do you know if it’s necessary to establish additional permissions in order to IOS to use the MQTT protocol? Anyways, to me that doesn’t seem to be the case here?


@cijin Update: I deleted all the cached stuff from my IOS app and rebuild and this did the trick! Perhaps since we’re upgrading something cached was causing the issue.


Thank you for letting me know. I’m glad it’s working now.
Let me know if there’s anything else.

Kind Regards,