node-slack-sdk: presence_change event detection stops after a few hours

I am using @slack/rtm-api to monitor status change of users on slack.

The code is designed to wait till there is a status change and report it. It works fine for fews hours after which it stops identifying the change.

What type of issue is this? (place an x in one of the [ ])

  • [x ] bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • [ x] I’ve read and understood the Contributing guidelines and have done my best effort to follow them.
  • [ x] I’ve read and agree to the Code of Conduct.
  • [x ] I’ve searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Packages:

Select all that apply:

  • @slack/web-api
  • @slack/events-api
  • @slack/interactive-messages
  • [ x] @slack/rtm-api
  • @slack/webhooks
  • @slack/oauth
  • @slack/socket-mode
  • I don’t know

Reproducible in:

package version: “^5.0.5”

node version:10.23.0

OS version(s): Mac OS Big Sur

Steps to reproduce:

Expected result:

It should report change in status like so :

2021-05-01T20:18:34.93+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:RTMClient:1 sending message on websocket: {"type":"ping","id":39}
   2021-05-01T20:18:34.93+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:KeepAlive:0 setting pong timer
   2021-05-01T20:18:34.93+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:RTMClient:1 received message on websocket: {"type":"pong","reply_to":39}
   2021-05-01T20:18:34.93+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:KeepAlive:0 received pong, clearing pong timer
   2021-05-01T20:18:37.15+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:RTMClient:1 received message on websocket: {"type":"presence_change","presence":"away","user":"WQ0AV59UG"}
   2021-05-01T20:18:37.16+0530 [APP/PROC/WEB/0] OUT { t**ype: 'presence_change', presence: 'away', user: 'WQ0AV59UG**' }
   2021-05-01T20:18:37.16+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:RTMClient:1 send() in state: connected,ready
   2021-05-01T20:18:37.16+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:KeepAlive:0 setting ping timer
   2021-05-01T20:18:37.16+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:RTMClient:1 sending message on websocket: {"text":"User:Pre Prod 1 Presence:away ","channel":"C01G74L6ZD4","type":"message","id":40}

Actual result:

As seen below logs the change is not detected

Attachments:

Logs, screenshots, screencast, sample project, funny gif, etc.

2021-05-03T16:04:37.89+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:KeepAlive:0 ping timer expired, sending ping
   2021-05-03T16:04:37.89+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:RTMClient:1 send() in state: connected,ready
   2021-05-03T16:04:37.89+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:KeepAlive:0 setting ping timer
   2021-05-03T16:04:37.89+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:RTMClient:1 sending message on websocket: {"type":"ping","id":11980}
   2021-05-03T16:04:37.89+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:KeepAlive:0 setting pong timer
   2021-05-03T16:04:37.97+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:RTMClient:1 received message on websocket: {"type":"pong","reply_to":11980}
   2021-05-03T16:04:37.97+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:KeepAlive:0 received pong, clearing pong timer
   2021-05-03T16:04:41.72+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:RTMClient:1 received message on websocket: {"type":"file_deleted","file_id":"F021DQJCVJL","channel_ids":[],"event_ts":"1620038081.188300"}
   2021-05-03T16:04:42.02+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:RTMClient:1 received message on websocket: {"type":"file_deleted","file_id":"F02097PU015","channel_ids":[],"event_ts":"1620038081.188600"}
   2021-05-03T16:04:43.24+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:RTMClient:1 received message on websocket: {"type":"file_deleted","file_id":"F021DQMDFUG","channel_ids":[],"event_ts":"1620038083.188900"}
   2021-05-03T16:04:43.89+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:KeepAlive:0 ping timer expired, sending ping
   2021-05-03T16:04:43.89+0530 [APP/PROC/WEB/0] OUT [DEBUG]  rtm-api:RTMClient:1 send() in state: connected,ready

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

@seratch No I dont have more questions. Thank you