event notification stopped after socket mode reconnection
Reproducible in:
pip freeze | grep slack
Python 3.12.10
The Slack SDK version
pip freeze | grep slack
Python runtime version
Python 3.12.10
OS info
#225-Ubuntu SMP Fri Jan 10 22:23:35 UTC 2025
Steps to reproduce:
- use the sample from offical site https://tools.slack.dev/python-slack-sdk/socket-mode/
- kill the tcp session(websocket) between bot and slack sever by tcpkill or iptables or something else
- wait for auto reconnection
- after that the bot will receive event notification no more
- a workaround i figure out myself: after this happens, use client.web_client to do something, query a channel history or post a message to a channel, then the event notication works again.
Expected result:
everything goes well after auto re-connection
Actual result:
no more events notification after that
Hi @echoidcf thanks for bringing this up 💯
I tried to reproduce this from my mac, I can't seem to find a proper tool that behaves the same way as tcpkill, if you are aware of a tool I could use please share it with me!
Regardless I was somewhat able to reproduce this by briefly disabling my machines network connections, and the default SocketModeClient was able to successfully reconnect and handle new events triggered from Slack
Would you be able to reproduce this with log level set to DEBUG and share those logs with me?
👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.
As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.