Basically, when you use wss , you just use WebWocket on top of SSL/TLS .
Meanwhile, using plain ws does not require specific configuration, wss does. Indeed, when opening a connection, you must create a secure connection using a valid SSL certificate .
If you have a missing or invalid certificate, the connection cannot be updated, so an error will occur when trying to start a connection.
Therefore, you cannot just switch from ws to wss , but you must also make the correct implementation.
You can find more details here , hope this helps!
source share