Vorlon.js is asking for Socket.io but it is already configured to enable socket.io
I can see the server, but when I load the app, I get a red div on the front that says:
Vorlon.js: Load socket.io before linking to vorlon.js or use includeSocketIO = true in catalog.json file.
my terminal gives me the following output every time the server page is loaded:
{
"useSSL": false,
"SSLkey": "cert/server.key",
"SSLcert": "cert/server.crt",
"includeSocketIO": true,
"plugins": [
{ "id": "CONSOLE", "name": "Interactive Console", "panel": "bottom", "foldername": "interactiveConsole", "enabled": true },
{ "id": "DOM", "name": "Dom Explorer", "panel": "top", "foldername": "domExplorer", "enabled": true },
{ "id": "MODERNIZR", "name": "Modernizr", "panel": "bottom", "foldername": "modernizrReport", "enabled": true },
{ "id": "OBJEXPLORER", "name": "Obj. Explorer", "panel": "top", "foldername": "objectExplorer", "enabled": true },
{ "id": "XHRPANEL", "name": "XHR", "panel": "top", "foldername": "xhrPanel", "enabled": true },
{ "id": "NGINSPECTOR", "name": "Ng. Inspector", "panel": "top", "foldername": "ngInspector", "enabled": false },
{ "id": "NETWORK", "name": "Network Monitor", "panel": "top", "foldername": "networkMonitor", "enabled": true },
{ "id": "RESOURCES", "name": "Resources Explorer", "panel": "top", "foldername": "resourcesExplorer", "enabled": true }
]
}
(fourth line down, includeSocketIO is set to true).
Has anyone else had a similar problem (and hopefully was able to fix it)?
+3
source to share
1 answer
It looks like the problem is coming from CORS errors. Socket.io is not allowed to write across domains. To fix the problem so that I can open the app on my iPad, I did the following:
- Make sure the URL of the host you are loading the page from and the URL of the Vorlon script match. for example, for me, I click
http://mymachine.local/...
on my iPad and I set the Vorlon script url tohttp://mymachine.local:1337/vorlon.js
in my page. Instead,mymachine.local
it could be your local network IP (192.168.x.x
). - I also had to load Vorlon as the first script on my page, before any other libraries.
If it still doesn't work, open the app in a second browser (I tested in FF with Vorlon server open in Chrome) and check the console for CORS errors.
Hope it helps.
+2
source to share