Closed kohenkatz closed 1 year ago
This is expected behaviour:
https://github.com/pusher/pusher-js#enabledtransports-array
Note: if you intend to use secure websockets, or wss, you can not simply specify wss in enabledTransports, you must specify ws in enabledTransports as well as set the forceTLS option to true.
It's missing from the official documentation.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
If the only enabled transport is
wss
andforceTLS
istrue
, no connection to the server is attempted.Fiddle: https://jsfiddle.net/kohenkatz/mpaerk67/
Observe that the console logs say the connection state is
failed
but the DevTools show that no WebSocket connection was attempted.What is the expected behavior?
The client should connect via secure WebSocket.
Note that this configuration works:
Which versions of Pusher, and which browsers / OS are affected by this issue? Did this work in previous versions of Pusher? If so, which?
I tested this with Pusher 7.6.0 and 8.0.0.