You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.
hi, just close this if it's already been asked....
Was just setting up mosca on HTTPS, and using the demo html with:
var client = mqtt.connect();
it tries to connect via ws: (as indicated by the chrome console, with denied because unsecure content).
with:
var client = mqtt.connect('wss://{ip:port}');
it works fine.
Maybe the mqtt client lib could detect if on an https page, and if so default to wss: rather than ws:?
not urgent, as easy workaround...
The text was updated successfully, but these errors were encountered:
looking at the package.json of the installed mqtt.js, it seems mosca's dependency on ^1.6.3 results in a maximum version of mqtt of <2.0.0. mqtt.js is on 2.2.1, and we get 1.14.1 from npm. (my mosca is 2.2.0).
is this expected behavior?
the part of the (npm installed) package.json i'm looking at is:
"_requested": {
"raw": "mqtt@^1.6.3",
"scope": null,
"escapedName": "mqtt",
"name": "mqtt",
"rawSpec": "^1.6.3",
"spec": ">=1.6.3 <2.0.0",
"type": "range"
},
If i change the dependency in mosca's package.json to ^2.0.0, the npm update happily updates mqtt.js to 2.2.1
Note to anyone who does upgrade mqtt.js -
before it will be served by mosca, you must run:
npm run-script bundle
to get the served mqtt.js in the right place. @mcollina - I still get the same error though.
Anything I'm missing?
hi, just close this if it's already been asked....
Was just setting up mosca on HTTPS, and using the demo html with:
var client = mqtt.connect();
it tries to connect via ws: (as indicated by the chrome console, with denied because unsecure content).
with:
var client = mqtt.connect('wss://{ip:port}');
it works fine.
Maybe the mqtt client lib could detect if on an https page, and if so default to wss: rather than ws:?
not urgent, as easy workaround...
The text was updated successfully, but these errors were encountered: