I had a working socket connection using sails v0.11.0 and sails.io.js v0.11.5 until approximately one week ago. I’ve tried reconfiguring my setup to look something like the solution provided here, but still no connection.
I just discovered that if I do ‘ionic serve’, to build to my local chrome browser, from the command line instead of
ionic run android, to build to my android device, my sails socket connects. I had been successfully connecting from my android device previously.
ionic index.html scripts loading
Loading the scripts in this order had been working for me for about 6 months. I’m not sure why it stopped.
The error I get in chrome console is;
Failed to load resource: the server responded with a status of 404 (Not Found) http://my_sails_api_ip:1337/__getcookie
I’ve tried setting ‘useCORSRouteToGetCookie = false’ as has been suggested on other posts. This results in repeated unsuccessful attempts to make the socket connection as opposed to the single error above.
additional info: My sails api is being ran on an Amazon EC2 instance that “my_sails_api_ip:1337” points to