aws / aws-iot-device-sdk-js

SDK for connecting to AWS IoT from a device using JavaScript/Node.js
Apache License 2.0
964 stars 384 forks source link

Unable to establish connection with MQTT #196

Closed RameshRM closed 6 years ago

RameshRM commented 6 years ago

TypeError: nextTick is not a function

Stack Trace :

mqtt/lib/client.js:37:2 mqtt/lib/client.js:286:3 mqtt/lib/client.js:227

FYI, This is used along with aws iot aws-iot-device-sdk/device/index.js:639

Suddenly hit with this issue right b4 launch preparation, can someone look @ this earliest

Thx

RameshRM commented 6 years ago

Hi, can anyof you take a look at this at the earliest ? i am totally blocked for next release preparations

RameshRM commented 6 years ago

@fengsongAWS Can u take a look at this Issue? Is this could be related to latest module 2.2.0 ?

fengsongAWS commented 6 years ago

This error is thrown from mqtt.js.

Did you run into this issue each time you start up your program? What environment are you using? Do you use SDK in browser or node ? Are you able to run the sample code with basic setup or configuration?

RameshRM commented 6 years ago

This started throwing up from yesterday and it is running on node mqtt folks think this may be aws sdk problem https://github.com/mqttjs/MQTT.js/issues/774

fengsongAWS commented 6 years ago

How often did you see this error? Are you able to running samples successfully?

RameshRM commented 6 years ago

I am not able to connect even once, this was successfully working and the messages were working fine until yday . I see this error as and when .i try to establish a connection

fengsongAWS commented 6 years ago

The sdk is passing options to mqtt client at the first place. Are you able to run the sample code? Or is this something related to the way to invoke the client? Can you provide sample code to duplicate this?

RameshRM commented 6 years ago
//confit.deviceConfig contains the Cert, & Other Config options for the construcgtor 
var Device = awsIot.device(confit.deviceConfig);
fengsongAWS commented 6 years ago

Sorry, I am not able to duplicate your problem. This would probably due to environment config. I would suggest you try using sample code and see if it works or not. And if necessary, start plainly with mqtt.js and see if you still encounter the issue. This will help you identify where the problem occurs.

fengsongAWS commented 6 years ago

Close this thread for now. Please open another thread if you have more questions.

oprince commented 6 years ago

The error occurred for me after I have upgrade few node modules which seems as MQTT dependencies. It was solved by re-installing MQTT module.