icanos / ng2-mqtt

Angular2 port of the mqttws31 library
17 stars 24 forks source link

Error: Unknown property, mqttVersionExplicit. #19

Open zacsonskaria opened 7 years ago

zacsonskaria commented 7 years ago

I am getting error during mqtt reconnect.

Error: Uncaught (in promise): Error: Unknown property, mqttVersionExplicit. Valid properties are: timeout userName password willMessage keepAliveInterval cleanSession useSSL invocationContext onSuccess onFailure hosts ports mqttVersion

Refer - https://www.eclipse.org/forums/index.php/t/1069724/

KarlZeilhofer commented 5 years ago

I encounter the same problem here.

This bug exists since Aug. 2015.

Is there any fix planed?

icanos commented 5 years ago

I’ll have a look at this in a few days, when I have more time, thanks!

AbCthings commented 5 years ago

To solve this issue I had to override the connectOptions variable, it seems a wrong/old parameter (mqttVersionExplicit) is automatically inserted during connection, so that when you attempt to reconnect the options are in a wrong format. Just override the variable and connect again, it will work.