-
-
Notifications
You must be signed in to change notification settings - Fork 43
Getting websocket error code 1006 in iOS. #25
Comments
Does your server by any chance have compression on. Someone reported compression was broken on iOS a while ago; and I haven't had a chance to verify or do anything about it if it is... Disabling compression would fix the issue. |
+1 having same issue |
@viniciodeltoro Please share server code. Have you compared between request that is recevied from iOS and request that is recevied from android builds |
Sorry I don't have the code anymore I ended up switching to socket.io and using a Node server dedicated for websocket communications only. |
I have provided 2 possible solutions here http://stackoverflow.com/a/43952323/319297 My setup is Rails 5 and
This solution had worked for me. |
Had the same issues recently, In my case it was a problem in WebSocket rfc6455 - different implementation on client and server More details here So I simply added
in websockets.ios.js file |
This fix Igor provided has been present in v1.4 or later. If anyone has any more issues with iOS please open a new issue. |
I'm using an Actioncable js file to connect to an Actioncable rails server. This actioncable js file uses this nativescript-websockets plugin.
I have been doing connection testing on Android and it works properly, the connection works properly on the web browser as well but when I run it on iOS I get an error like this:
Socket was closed because: code: 1006
This link explains that the connection gets closed abnormally because some incompatibility between the server and the client. I don't really know can can be the issue.
I did post in Stackoverflow since I thought the issue was happening because of the protocols used (actioncable-v1-json, actioncable-unsupported), but even if I don't provide these protocols on the browser test, the connection still works.
Any ideas on what is causing this issue?
Thanks
The text was updated successfully, but these errors were encountered: