WebSocket connection to 'ws://./' failed: Error in connection establishment: net::ERR_NAME_NOT_RESOLVED

Sizzling Code picture Sizzling Code · Oct 24, 2014 · Viewed 54.1k times · Source

I dont have any knowledge in websockets, i am using a admin template from here

https://github.com/onokumus/Bootstrap-Admin-Template

i don't know did i do something wrong or how it is giving this problem but i am getting this error in the google chrome Console.

WebSocket connection to 'ws://./' failed: Error in connection establishment: net::ERR_NAME_NOT_RESOLVED

it is reffering this file modernizr-build.min.js:2 for error.

Note: Error is only Showing in Google Chrome, but in Firebug this error is not showing up?

Anyone Knows why i am getting this error and how to get rid of this error without compromising anything else in theme? enter image description here

enter image description here

Answer

Aviator picture Aviator · Oct 24, 2014

It is because you have to use the FQDN for the WS URL. There is a good small sample code here: How to construct a WebSocket URI relative to the page URI?