wee-slack: Cannot connect to Slack: "Error (code 0): ratelimited"

Today I cannot log into Slack through weechat/wee-slack. The following error is presented:

Failed requesting rtm.connect with token
xoxc-[redacted], retrying. If this persists, try
increasing slack_timeout. Error (code 0): ratelimited

Two attempts are made at 60-second intervals, after which the message becomes:

Failed requesting rtm.connect with token
xoxc-[redacted], will not retry after too many failed 
attempts. If this persists, try increasing slack_timeout. 
Error (code 0): ratelimited

and nothing else happens.

Things that I’ve tried but didn’t help:

  • Getting a new token
  • Updating to the latest update with commit c303a77 (“Include cookie when making the websocket connection”)
  • Changing slack_timeout to 90000
  • Switching my outbound IP address (my WiFi and wired connections use different ISPs)

I added the following change so I could see the value of retry_after:

$ git diff
diff --git a/wee_slack.py b/wee_slack.py
index 84c437f..b0e5e5d 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -680,7 +680,7 @@ class EventRouter(object):
                 if name.lower() == "retry-after":
                     retry_after = int(value.strip())
                     request_metadata.retry_time = time.time() + retry_after
-                    return "", "ratelimited"
+                    return "", "ratelimited, retry after "+str(retry_after)+"s"
 
         return body, ""

The new message indicated that retry_after is 60 seconds.

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 16 (12 by maintainers)

Most upvoted comments

It seems using the latest version from master fix the issue. This commit: https://github.com/wee-slack/wee-slack/commit/c303a77c5420f2f97306802953d57a9587ba5fd6

Thank you for your support.

Version 2.10.1 has now been released with the fix.

It looks like the issue here is solved with this, so I’ll close the issue.

@R-VdP: Yes! I’ll make a new release a bit later today.

Could we consider making a release including this fix so that we can more easily get this into distribution repositories?