pusher / pusher-http-ruby

Ruby library for Pusher Channels HTTP API
https://pusher.com/channels
MIT License
664 stars 124 forks source link

Pusher : Error : {"type":"WebSocketError","error":{"type":"PusherError","data":{"code":1006,"message":"Connection interrupted (200)"}}} #147

Closed LinuxSysAdmin closed 4 years ago

LinuxSysAdmin commented 4 years ago

I am using Rails app with Pusher. I get this message to my browser console:

Pusher : Error : {"type":"WebSocketError","error":{"type":"PusherError","data":{"code":1006,"message":"Connection interrupted (200)"}}}

Please help.

Screenshot from 2019-09-20 18-29-23

annzenkina commented 4 years ago

Hey there! I'm sorry that you've experienced troubles.

When a WebSocket connection is closed without a "close frame", the pusher-js library emits an error with code 1006. Usually this is caused by WebSocket-incompatible proxies, which can't close the connection in the correct way. Please take a look at this article for more information: https://support.pusher.com/hc/en-us/articles/360019096474-What-is-meant-by-Channels-error-1006-

After receiving two "Websocket connection failed" messages pusher-js will switch to the fallback, for instance, sockjs. That means that the user will still receive all the messages but using the other protocol, not Websocket. This is less real-time but should work.

Hopefully this helps.

annzenkina commented 4 years ago

I will close the issue for now as it's not the issue with the library. But let us know at support@pusher.com if you have further questions.