Skip to content
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

client.on :message stops listening to new messages #484

Open
MarioRuiz opened this issue Jun 23, 2023 · 2 comments
Open

client.on :message stops listening to new messages #484

MarioRuiz opened this issue Jun 23, 2023 · 2 comments
Labels

Comments

@MarioRuiz
Copy link

randomly client.on :message stops listening to RTM
No logs even stored after that on the supplied logger but the app shows as connected.
No clue what exactly happens, same code has been working for years without issues.
any idea how can we identify the reason?

@dblock
Copy link
Collaborator

dblock commented Jun 24, 2023

I would start from isolating whether this is a problem where Slack stops sending messages, whether the websocket gets closed, a blocking thread in the app, or something else. Enable debug logging and look for

logger.debug("#{self}##{__method__}") { "#{event.class}, #{event.data}" }
or any other messages being hit.

Next, it's probably time to move to events, https://github.com/dblock/slack-ruby-bot-server-events. Slack is likely slowly making it more and more difficult to run realtime clients.

@dblock dblock added the bug? label Jun 24, 2023
@dblock
Copy link
Collaborator

dblock commented Aug 9, 2023

@MarioRuiz Did you ever find the root cause of this? Could be code that hangs (and potentially solved with #486)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants