0

I'm trying to use websockets in a web page with javascript, ('ws://localhost:9090') but get the following error from firefox:

"Caught exception while dispatching event:
The operation is insecure."

If I change the url of the websocket to 'wss://localhost:9090' I get another error:

Firefox can't establish a connection to the server at wss://localhost:9090/.

The javascript I'm working on is meant to communicate with the ros operating system on a robot that has it installed. How can I enable websockets in this special situation? I was using google chrome because of the limitations on firefox, but after a recent update of chrome, it seems impossible there too. On chrome I get another error.

D Liebman
  • 337
  • 1
  • 8
  • 17
  • i don't think localhost can be secure, try ws: instead – dandavis Jan 16 '14 at 22:37
  • I would like to use firefox, but in the mean time I've found that websockets (with localhost as the ip address) do work on google-chrome. The error I was getting in chrome was related to something else. – D Liebman Jan 17 '14 at 14:24
  • I had the same problem and I posted it as well. I read some articles about this issue and they say that it is an self-created certificate issue, i am not sure about that. Waiting for response. You can follow the post in case of it may help Can not established WEbsocket secure connection on Firefox – fth May 21 '14 at 06:12

0 Answers0