New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freezing browser with Mosquitto 1.5 #169

Open
tim-bitreactive opened this Issue Jul 11, 2018 · 16 comments

Comments

Projects
None yet
8 participants
@tim-bitreactive

tim-bitreactive commented Jul 11, 2018

Code that ran fine with mosquitto 1.4.15 stopped working with mosquitto 1.5 and freezes the browser.
The issue can be replicated by running the sample code from the project main page.
In the development console thousands of executions of the 'onConnect' method can be seen. It seems some out-of-control loop is freezing up the browser.

@telemac

This comment has been minimized.

Show comment
Hide comment
@telemac

telemac Jul 17, 2018

I have the same behavior with mosquito 1.5

telemac commented Jul 17, 2018

I have the same behavior with mosquito 1.5

@lnowakowski

This comment has been minimized.

Show comment
Hide comment
@lnowakowski

lnowakowski Jul 19, 2018

Also same here after mosquitto upgrade

lnowakowski commented Jul 19, 2018

Also same here after mosquitto upgrade

@Stef-Hermans

This comment has been minimized.

Show comment
Hide comment
@Stef-Hermans

Stef-Hermans Jul 27, 2018

same here, mosquitto 1.5
All websockets implementations based on Paho javascript have this issue, onconnect keeps firing in an infinite loop, causing everything else to freeze up.

Stef-Hermans commented Jul 27, 2018

same here, mosquitto 1.5
All websockets implementations based on Paho javascript have this issue, onconnect keeps firing in an infinite loop, causing everything else to freeze up.

@icraggs

This comment has been minimized.

Show comment
Hide comment
@icraggs

icraggs Aug 2, 2018

Contributor

Are there any messages on the Mosquitto console which explain the inability to connect?

Contributor

icraggs commented Aug 2, 2018

Are there any messages on the Mosquitto console which explain the inability to connect?

@lnowakowski

This comment has been minimized.

Show comment
Hide comment
@lnowakowski

lnowakowski Aug 2, 2018

Haven't seen nothing unusual on Mosquitto side, only this infinite loop on client side

lnowakowski commented Aug 2, 2018

Haven't seen nothing unusual on Mosquitto side, only this infinite loop on client side

@tim-bitreactive

This comment has been minimized.

Show comment
Hide comment
@tim-bitreactive

tim-bitreactive Aug 8, 2018

tim-bitreactive commented Aug 8, 2018

@icraggs

This comment has been minimized.

Show comment
Hide comment
@icraggs

icraggs Aug 8, 2018

Contributor

I just tried this on Ubuntu with Mosquitto 1.5, and both the latest Paho JS client, and the utility at: http://www.eclipse.org/paho/clients/js/utility/, and both worked fine. This was without TLS.

Are you all using TLS? If so, can you see if it works without TLS? Any other factors at work here?

Contributor

icraggs commented Aug 8, 2018

I just tried this on Ubuntu with Mosquitto 1.5, and both the latest Paho JS client, and the utility at: http://www.eclipse.org/paho/clients/js/utility/, and both worked fine. This was without TLS.

Are you all using TLS? If so, can you see if it works without TLS? Any other factors at work here?

@tim-bitreactive

This comment has been minimized.

Show comment
Hide comment
@tim-bitreactive

tim-bitreactive Aug 9, 2018

No, we did not use TLS.
Which architecture did you run the test on? For us mosquitto was always on armhf, the client on both, armhf and amd64.
We are using the jessie versions, not stretch.

tim-bitreactive commented Aug 9, 2018

No, we did not use TLS.
Which architecture did you run the test on? For us mosquitto was always on armhf, the client on both, armhf and amd64.
We are using the jessie versions, not stretch.

@icraggs

This comment has been minimized.

Show comment
Hide comment
@icraggs

icraggs Aug 9, 2018

Contributor

Both client and server were on the same machine, amd64. I could try on an ARM architecture machine - Raspberry Pi. Can you start the JS console on the browser first and see if there are any useful messages?

Contributor

icraggs commented Aug 9, 2018

Both client and server were on the same machine, amd64. I could try on an ARM architecture machine - Raspberry Pi. Can you start the JS console on the browser first and see if there are any useful messages?

@bergie

This comment has been minimized.

Show comment
Hide comment
@bergie

bergie Aug 19, 2018

We're also seeing this with msgflo-browser (which uses this library underneath) when connecting to mosquitto 1.5 from Debian. No TLS, no auth. Mosquitto runs on x86, but same failure occurs on both x86 and ARM (RPi3) clients on Chrome and Firefox.

Nothing in Console or Network tabs, and the browser process becomes unresponsive.

msgflo/msgflo-browser#7

Code:
https://github.com/c-base/infoscreens/blob/master/infodisplay/infodisplay.js

bergie commented Aug 19, 2018

We're also seeing this with msgflo-browser (which uses this library underneath) when connecting to mosquitto 1.5 from Debian. No TLS, no auth. Mosquitto runs on x86, but same failure occurs on both x86 and ARM (RPi3) clients on Chrome and Firefox.

Nothing in Console or Network tabs, and the browser process becomes unresponsive.

msgflo/msgflo-browser#7

Code:
https://github.com/c-base/infoscreens/blob/master/infodisplay/infodisplay.js

@icraggs

This comment has been minimized.

Show comment
Hide comment
@icraggs

icraggs Aug 20, 2018

Contributor

@bergie where, on what platform, is Mosquitto 1.5 running?

Contributor

icraggs commented Aug 20, 2018

@bergie where, on what platform, is Mosquitto 1.5 running?

@mykolaspocius

This comment has been minimized.

Show comment
Hide comment
@mykolaspocius

mykolaspocius Aug 31, 2018

I have the same issue. Mosquitto 1.5 running on rpi. Client on windows. I get infinite onConnect event firing. I checked mosquito logs and looks like there all is fine. Connects once and when i close browser -disconnects.

mykolaspocius commented Aug 31, 2018

I have the same issue. Mosquitto 1.5 running on rpi. Client on windows. I get infinite onConnect event firing. I checked mosquito logs and looks like there all is fine. Connects once and when i close browser -disconnects.

@bergie

This comment has been minimized.

Show comment
Hide comment
@bergie

bergie Sep 3, 2018

@icraggs as stated in the ticket:

  • Mosquitto 1.5 running on Debian, x86
  • Javascript clients running on multiple browsers, multiple architectures

All of the clients (as well as multiple versions of this library) exhibited the same infinite loop and freezing when connecting to mosquitto 1.5. The only fix we've found was to downgrade the mosquitto broker.

bergie commented Sep 3, 2018

@icraggs as stated in the ticket:

  • Mosquitto 1.5 running on Debian, x86
  • Javascript clients running on multiple browsers, multiple architectures

All of the clients (as well as multiple versions of this library) exhibited the same infinite loop and freezing when connecting to mosquitto 1.5. The only fix we've found was to downgrade the mosquitto broker.

@jbaans

This comment has been minimized.

Show comment
Hide comment
@jbaans

jbaans Sep 11, 2018

Hi, I've had similar issues, explicitly setting mqtt protocol version helped.

jbaans commented Sep 11, 2018

Hi, I've had similar issues, explicitly setting mqtt protocol version helped.

@bergie

This comment has been minimized.

Show comment
Hide comment
@bergie

bergie Sep 13, 2018

@jbaans interesting. What value worked?

bergie commented Sep 13, 2018

@jbaans interesting. What value worked?

@jbaans

This comment has been minimized.

Show comment
Hide comment
@jbaans

jbaans Sep 13, 2018

for the JS client you can try:
with mqttVersionExplicit: true, set either
mqttVersion: 3 (mqttv3.1)
or
mqttVersion: 4 (mqttv3.1.1)

Actually I just double checked and noticed I installed mosquitto git version 4f838e5 explicitly (configured build WITH_WEBSOCKETS:=yes), this could also explain why I have no trouble.
Note protocols v3.1.1 and v3.1 work differently (see mosquitto.conf).

jbaans commented Sep 13, 2018

for the JS client you can try:
with mqttVersionExplicit: true, set either
mqttVersion: 3 (mqttv3.1)
or
mqttVersion: 4 (mqttv3.1.1)

Actually I just double checked and noticed I installed mosquitto git version 4f838e5 explicitly (configured build WITH_WEBSOCKETS:=yes), this could also explain why I have no trouble.
Note protocols v3.1.1 and v3.1 work differently (see mosquitto.conf).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment