Not reciving messages after a while
See original GitHub issueHello, I’m experiencing some issue with this library
I have a node.js app running on a Raspberry Pi. The connection is done successfully and I can send / receive messages, but after a while (sometimes 20 minutes, sometimes 4 hours), I stop receiving messages.
I’m running this application in several machines and not all of them experience the same issue. Also, when I stop receiving messages, after a restart, the app communicates successfully again (which indicates that it’s not a network related issue)
Can you point me on how can I debug this? Thanks in advance
"aws-iot-device-sdk": "2.2.0"
node --version: 8.10.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
How to Fix It When You're Not Receiving Texts on Android
How to Fix Androids Not Receiving Texts · Check for blocked numbers. · Check the network connection. · Disable Airplane mode. · Reboot...
Read more >Not receiving text on your phone: Here's how to fix - India Today
Steps to follow when Android is not receiving text messages: · Reboot your phone · Check the reception · Clear the cache from...
Read more >Fix problems sending, receiving or connecting to Messages
Fix problems sending or receiving messages from specific contacts. Delete the contact and add it again. Check if you blocked them. Verify that...
Read more >How to Fix Phone Not Receiving Text Messages - Alphr
Reboot your phone. · Check service provider reception. · Check old messaging threads. · Clear the cache from your text app. · Remove...
Read more >If you can't send or receive messages on your iPhone or iPad
If you're in a group message and stop receiving messages, check to see if you left the conversation. Open Messages and tap the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Ok finally found the issue & solution for this
The issue that I was having was: the messages not been posted on AWS IoT due to a faulty network. Since the messages didn’t have a timeout set, I was realizing after a long time that the messages were failing. To solve this, I just set
keepalive: 10. After 10 seconds if the messages didn’t have thePUBACK, an error is trigged, and the reconnection is attempted(I’m also using
qos: 1)After doing this, the library works as a charm. Thanks for the help @fengsongAWS
I am already using the
qos:1, yes.Regarding the lost connection, I can see locally that after the app starts & connect, if I turn off the wifi, the
iotdoesn’t realize that the messages are not being sent. Is there any way to detect this sooner? After I turn off the connection, all the publish messages stop reaching the callback