emqx / MQTTX

A Powerful and All-in-One MQTT 5.0 client toolbox for Desktop, CLI and WebSocket.

Home Page:https://mqttx.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MQTTX web fails to connect when disabling SSL security with wss, but the desktop version of MQTTX works.

ZKUTF-8 opened this issue · comments

What I did:

I tried connecting using the web version of MQTTX with wss while ignoring SSL security
image
image

but it failed to connect. However, it works with the desktop version.
image
image

Environment:

OS: Windows 11
MQTTX version: e.g. v1.9.5
EMQX: Running on Docker 5.1.6

Detailed Information:

I need to use wss under HTTPS. Following the official guide, I used mqtt.js. Since certificates are required, I set the rejectUnauthorized: false to ignore verification. The result was a connection failure. So, I tested using MQTTX's web and found it also failed. However, it worked with the desktop version of MQTTX. I'm very puzzled, and this issue has troubled me for a long time. Thank you very much.

After installing EMQX, I didn't make any configurations. Did I do something wrong? Or can't SSL verification be ignored in a web environment? However, mqtt.js said it's possible. Thank you very much.

Hello @ZKUTF-8,

I apologize for the delayed response. After conducting some tests, I've found that using MQTT.js in a Node.js environment works fine, but not in a browser setting. This could be attributed to the differences between the two environments. It's worth noting that MQTTX desktop operates in a Node.js context.

I've tried configuring the WSS for emqx without success. You should correctly set up the SSL/TLS certificates for emqx to establish a successful WSS connection. For further assistance, I'd recommend posting on the EMQX forum to inquire about the right way to configure WSS.

I deeply regret the inconvenience this has caused, and I appreciate your understanding.