python-slack-sdk icon indicating copy to clipboard operation
python-slack-sdk copied to clipboard

event notification stopped after socket mode reconnection

Open echoidcf opened this issue 8 months ago • 1 comments

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:

  1. use the sample from offical site https://tools.slack.dev/python-slack-sdk/socket-mode/
  2. kill the tcp session(websocket) between bot and slack sever by tcpkill or iptables or something else
  3. wait for auto reconnection
  4. after that the bot will receive event notification no more
  5. 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

echoidcf avatar Jun 13 '25 00:06 echoidcf

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?

WilliamBergamin avatar Jun 13 '25 16:06 WilliamBergamin

👋 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.

github-actions[bot] avatar Jul 14 '25 00:07 github-actions[bot]

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.

github-actions[bot] avatar Jul 28 '25 00:07 github-actions[bot]