raycast / extensions

Everything you need to extend Raycast.
https://developers.raycast.com
MIT License
5.3k stars 2.99k forks source link

[Slack] A rate-limit has been reached #14113

Open obaidch24 opened 1 month ago

obaidch24 commented 1 month ago

Extension

https://raycast.com/mommertf/slack

Raycast Version

1.81.2

macOS Version

14.6.1

Description

Error:

Error: A rate-limit has been reached, you may retry this request in 30 seconds
    at n5 (/Users/obaid.samadian/.config/raycast/extensions/d5d27df2-9818-41ea-b683-0e4af3f4be3d/search.js:43:25526)
    at e.<anonymous> (/Users/obaid.samadian/.config/raycast/extensions/d5d27df2-9818-41ea-b683-0e4af3f4be3d/search.js:45:10270)
    at Generator.next (<anonymous>)
    at p (/Users/obaid.samadian/.config/raycast/extensions/d5d27df2-9818-41ea-b683-0e4af3f4be3d/search.js:45:2332)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Steps To Reproduce

  1. Open Channel

Current Behaviour

No response

Expected Behaviour

No response

raycastbot commented 1 month ago

Thank you for opening this issue!

🔔 @momme-rtf @Elliot67 @jfkisafk @thomaslombart @RobErskine you might want to have a look.

💡 Author and Contributors commands The author and contributors of `mommertf/slack` can trigger bot actions by commenting: - `@raycastbot close this issue` Closes the issue. - `@raycastbot close as not planned` Closes the issue as not planned. - `@raycastbot rename this issue to "Awesome new title"` Renames the issue. - `@raycastbot reopen this issue` Reopens the issue. - `@raycastbot assign me` Assigns yourself to the issue. - `@raycastbot good first issue` Adds the "Good first issue" label to the issue. - `@raycastbot keep this issue open` Make sure the issue won't go stale and will be kept open by the bot.
thomaslombart commented 1 month ago

Are you getting this consistently, or does the error go away after a few seconds or minutes? If the latter happens, it's normal behavior.

obaidch24 commented 1 month ago

Are you getting this consistently, or does the error go away after a few seconds or minutes? If the latter happens, it's normal behavior.

Always

thomaslombart commented 1 month ago

Could you share a recording? It'll make it easier to see what's happening.

obaidch24 commented 1 month ago

Could you share a recording? It'll make it easier to see what's happening.

Sure.

https://github.com/user-attachments/assets/ac70752c-7442-4ec8-86c2-309b117ce16e

obaidch24 commented 1 month ago

@thomaslombart When I try to select Unread messages or Open Channel for the first time, it shows loading for more than 1 minute and then throws a rate-limit error. After that, it immediately throws the rate-limit error.

Elliot67 commented 1 month ago

@obaidch24 Are you in a very large Slack workspace ? How many users and public channels are in it ?


Rate limiting might be the alternative ending to #13067 . users.list and conversations.list are both rate limited "Tier 2" (20 requests per minute).

We can retrieve 1_000 users per requests and 1_000 conversations which means rate limiting could start to appear on workspace with more than ~15k users.

Simplest solution is to fetch and cache all the data bit by bit, preferably in the background if raycast allows it.

obaidch24 commented 1 month ago

@obaidch24 Are you in a very large Slack workspace ? How many users and public channels are in it ?

Rate limiting might be the alternative ending to #13067 . users.list and conversations.list are both rate limited "Tier 2" (20 requests per minute).

We can retrieve 1_000 users per requests and 1_000 conversations which means rate limiting could start to appear on workspace with more than ~15k users.

Simplest solution is to fetch and cache all the data bit by bit, preferably in the background if raycast allows it.

Yes, the workspace is quite large. I'm not sure how many users and public channels it has. I guess it should have more than 4K active users.

thomaslombart commented 1 month ago

It could indeed be due to the large workspace. @obaidch24, if you have other Slack workspaces, could you test the extension in a smaller one and let me know if it works?

obaidch24 commented 1 month ago

It could indeed be due to the large workspace. @obaidch24, if you have other Slack workspaces, could you test the extension in a smaller one and let me know if it works?

Unfortunately, I don't have another one.