Skip to content

[Bug]: Unable to connect to broker via mqtt protocol #1950

Open
@yellsri-bh

Description

@yellsri-bh

MQTTjs Version

^5.10.1

Broker

test.mosquitto.org

Environment

NodeJS

Description

I have broker with mqtt and ws protocol, tyring to connect from React vite App.

  1. Tried to connect to broker via mqtt protocol, its not getting connected but working with ws protocol
  2. If mqtt:// is specified in the brokerUrl, internally replacing to ws://.

Does this package support to connect to broker via mqtt protocol ?

Minimal Reproduction

Connect to mqtt://test.mosquitto.org:1883 using mqtt.connect(...) function

It is sometimes taking long time to connect or else it shows failed to connect to url : ws://test.mosquitto.org:1883
It is replacing the protocol, even If I mention the defaultProtocol and protocol as mqtt

Unable to get the logs (using vite so it didn't load the application correctly).

Debug logs

<UNABLE_TO_GET_LOGS>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions