-
Notifications
You must be signed in to change notification settings - Fork 26
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
How to deal with error "attempted to subscribe while channel is in Failed state" #650
Comments
@liuzhen2008 Thanks for opening an issue. That's an old lib behaviour that shouldn't with v1.0. If the channel is in the Failed state, the attach should remove the error and proceed with the attach operation. Right @tcard? I'm looking at |
@ricardopereira That's about attach, not subscribe. On subscribe, we have this, which we shouldn't have since there's no spec item requiring it. I think the spec should be updated, since RTL7 is not really exhaustive. I think RTL7c should say "if the channel is not ATTACHING or ATTACHED". @mattheworiordan ? |
So.. is there something I could do in the mean time so that it doesn't go to a "failed" state? Or am i waiting for an update.. Or are you guys saying this will not happen with v1.0.9? |
@tcard why does it need to do anything? The spec clearly states an implicit attach ONLY happens when in the Initialized state. So is the iOS lib trying to attach when already attaching? If so, why is that a problem. It's valid to call attach when attaching without expecting a failure. @ricardopereira can you shed any light on this? |
Initially I thought it was something that we missed when we updated the lib to v1.0 but it's not.
BTW, this error only happens when an So, I agree with @mattheworiordan. The spec is ok and clear. |
OK, never mind then. @ricardopereira I guess we should do what the spec says and only that, ie. check that the current state is INITIALIZED and only attach if it is. And of course do nothing special if FAILED, add the subscription and that's it. |
@liuzhen2008 Sorry, we didn't really answer you. The FAILED state means that there's a bug somewhere, and it's irrecoverable; the only thing you can do is to connect again. From our docs:
You should get insight into why it's happening by listening to |
We sometimes get this error when trying to attach to a channel.
"attempted to subscribe while channel is in Failed state"
In what kind of situation does this problem occur? It shows up in our crashlytics reports however we weren't able to reproduce the problem.
The text was updated successfully, but these errors were encountered: