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
I am using the MQTT.js version from https://unpkg.com in the browser and experience the following issue.
In old versions (<=4.1.0), MQTT.js used to connect to the host that served the website and also used the same port if connect() was called without an URL. I do not know if it also selected wss over ws if the page was served via HTTPS, as I never used TLS.
Starting with 4.2.1 (4.2.0 does not work in the browser) and also in the current 5.1.4 release, calling connect() without an URL always connects to ws://localhost/.
This change in behavior was probably introduced in #1108.
I worked around this issue by using the following command:
@BrandonSmith would you like to submit a pr to fix this issue? you could use the is-browser const to detect the environment and based on that use localhost or the other default url
I am using the MQTT.js version from https://unpkg.com in the browser and experience the following issue.
In old versions (<=4.1.0), MQTT.js used to connect to the host that served the website and also used the same port if
connect()
was called without an URL. I do not know if it also selected wss over ws if the page was served via HTTPS, as I never used TLS.Starting with 4.2.1 (4.2.0 does not work in the browser) and also in the current 5.1.4 release, calling
connect()
without an URL always connects tows://localhost/
.This change in behavior was probably introduced in #1108.
I worked around this issue by using the following command:
The text was updated successfully, but these errors were encountered: