1
votes

I am writing a browser plugin for a webpage which runs over HTTPS. My backend is in Java, so creating a websocket between javascript and java. But the websocket is giving following error.

WebSocket connection to 'wss://127.0.0.1:8080/' failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR

Can someone tell how to remove this error?

1

1 Answers

0
votes

In order to use SSL in development machine create auto-signed SSL key a certificate for '127.0.0.1' and put a web server locally with HTTPS support, like Nginx, in front of your Java app, or if you are using a Java based web server look for HTTPS configuration (and WebSockets support as well). This way you'll be able to tests secure transport.