{"type":"WebSocketError","error":{"type":"PusherError","data":{"code":4200,"message":"Please reconnect immediately"}}}
Closed this issue · 5 comments
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Getting this error message reported.

If the current behavior is a bug, please provide the steps to reproduce and
if possible a minimal demo of the problem via https://jsfiddle.net or similar.
Unstable connection, not easy to reproduce.
What is the expected behavior?
Pusher would reconnect by itself instead of reporting an error.
Which versions of Pusher, and which browsers / OS are affected by this issue?
Did this work in previous versions of Pusher? If so, which?
Pusher 8.0.2
I'm not able to replicate this, when a 4200 error is encountered my app does reconnect. Are you able to share the code in use?
I can't reproduce it at all but I can see it being reported to my error tracking platform for users with unstable connections.
It might be reconnecting, though, since the connection is unstable I can be losing track that they reconnect.
Wasn't this error supposed to be swallowed by Pusher since as Pusher SDK user there's nothing I can do or should I simple ignore it?
I'm guessing by 4200
this is being returned by Pusher API itself, and not the browser or anything like that.
Yes, you are correct that 4200 us being returned by our service. You can read about our error codes at https://pusher.com/docs/channels/library_auth_reference/pusher-websockets-protocol/#4200-4299.
The 4200 code is issued when the client needs to reconnect, often to force the client to connect to a healthy pod as their current host is being terminated, either due to a failure or automatic scaling activity.
The library handles this automatically and no intervention should be required.
In my testing I am not able to see that the library crashes when the 4200 code is emitted. If you are not seeing crashes then it should be the case the clients are reconnecting as expected.
Closing this as it isn't reproducible