eclipse-paho / eclipse-paho/paho.mqtt.javascript

connection trouble?

Open
#222 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.2k
Forks
466
PR merge metrics
No merged PRs in 30d

Description

using "https://www.eclipse.org/paho/clients/js/utility/"

when I try to connect to a local ip and enter port 9001 with tls turned off wireshark shows no activity. with tls turned on wireshark shows activity, but my broker isn't set up for that, so the connection fails.

In firefox I tried to "inspect element" and click the connect button. It paused on paho-mqtt.js line 1054 saying "new websocket" saying "SecurityError: The operation is insecure." I continued the script and noticed it gets stuck in jquery.min.js line 3 at "while(b--)c=e". bouncing between the b and c.

after a "tls on" connection failure, when tls is turned off, id="connectionstatus" is never updated to show any change in status and still says "Failed to connect: AMQJS0007E Socket error:undefined" from when tls was on. wireshark shows a response of 403 forbidden when tls is on so the port is probably technically accessible on the broker with a refused ish connection?

connecting to a known closed port with tls on changes the status to"Failed to connect: AMQJSC0001E Connect timed out." Afterwards connecting to a known closed port with tls off doesn't change status.

I tried this on a second device and it also fails.

my broker was later verified to be working with a different (older?) version of the code.

the code for that page claims this is the github for the project.

Contributor guide

Open the contributing guide

Research direction

Start with the utility page at https://www.eclipse.org/paho/clients/js/utility/ and reproduce connections to local IPs on port 9001 with TLS enabled and disabled. Inspect paho-mqtt.js around line 1054 and the connection-status handling; done means the failure is understood and status updates correctly after successive connection attempts.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.