Mandeep Singh
Mandeep Singh

Reputation: 2855

What can be the reason of “Unable to find subscription with identifier” in Rails ActionCable?

We have the iOS Application in which we are using the action cable to give me fast response as user like something or comment on any post. Few days back everything is working fine. But from last few days action cable is not working. And my iOS application is live on the App Store. When ever my back end developer broadcast from her side. I will not get the response. When I hit the action cable multiple times. Then I get the single response out of 4 of them.

Now if any body help me what can I do right now.

What can be the reason of “Unable to find subscription with identifier” in Rails ActionCable?

[![> Unable to find subscription with identifier:

{"channel":"CommonChannel","auth_token":"zoRGfSZhS3mH6UxENVcJ"}]]1]1

We have a single channel in which we have multiple actions because I cannot subscribe the channel every time and then hit any function it makes me irritate to do every time subscribe the channel and then call the function.

Does any body has the solution for this issue. We have tried the wait loop as well after subscribing any channel.

Please anybody help me.

Thanks in advance.

Upvotes: 0

Views: 649

Answers (1)

Solerman Kaplon
Solerman Kaplon

Reputation: 86

Might be a race condition, see other question: What can be the reason of "Unable to find subscription with identifier" in Rails ActionCable? In rails the issue (https://github.com/rails/rails/issues/25381) was supposed to be fixed, but maybe you found another way to trigger it.

Try to add some wait between the initial hello request and the subscription. If you are using graphql subscriptions, try to add a sleep between the actioncable subscription and the graphql subscription

Upvotes: 0

Related Questions