Slack Integration Rate Limiting - Channel Dropdown Empty and Test Rule Fails #431

Open
opened 2026-04-05 16:19:44 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @bourchi-ali on 6/26/2025

Slack Rate Limiting Issue Persists After Fix

Bug Description

The Slack integration rate limiting issue reported in #1948 and addressed in commit [8765bc0](8765bc07ed) is still occurring, though the error location has shifted from line 213 to line 262.

Current Status

Problem Details

Symptoms

  1. Channel Dropdown Empty: Slack channel dropdown remains empty when creating notification rules
  2. Test Rule Failures: Test Rule functionality fails with rate limiting errors
  3. Integration Broken: Two-way Slack integration features (slash commands, interactive features) not working

Error Details

BadDataException [Error]: Cannot post message to channel. ratelimited
at Service.testRule (/usr/src/Common/Server/Services/WorkspaceNotificationRuleService.ts:262:17)

Full API Response

HTTPErrorResponse {
  "_statusCode": 429,
  "_headers": {
    "retry-after": "30",
    "x-oauth-scopes": "commands,channels:history,channels:join,channels:manage,channels:read,channels:write.invites,channels:write.topic,chat:write,users:read,groups:read,groups:write,im:read,im:write,mpim:read,mpim:write"
  },
  "_data": { 
    "ok": false, 
    "error": "ratelimited" 
  }
}

Root Cause Analysis

The previous fix appears to have been incomplete. While it may have addressed rate limiting in specific scenarios, it didn't implement comprehensive rate limiting protection across all Slack API operations. The core issue of excessive API calls without proper throttling remains unresolved.

Steps to Reproduce

  1. Navigate to notification rules creation
  2. Attempt to select Slack channel from dropdown
  3. Observe empty dropdown
  4. Try to test the rule
  5. Receive rate limiting error

Expected Behavior

  • Channel dropdown should populate with available Slack channels
  • Test Rule should successfully send test notifications
  • Two-way Slack integration should function properly
  • API calls should be properly throttled to respect Slack's rate limits

Proposed Solution

Implement comprehensive rate limiting across all Slack API endpoints, not just specific scenarios:

  1. Global Rate Limiting: Implement rate limiting wrapper for all Slack API calls
  2. Retry Logic: Add exponential backoff with jitter for 429 responses
  3. Request Queuing: Queue requests when approaching rate limits
  4. Caching: Cache channel lists and other frequently accessed data

Environment

  • Deployment: Docker Compose
  • Slack App: Properly configured with all required permissions

Request for Information

Can other users confirm if they're experiencing similar issues with the latest release? This will help determine if it's a widespread problem or environment-specific.

*Originally created by @bourchi-ali on 6/26/2025* # Slack Rate Limiting Issue Persists After Fix ## Bug Description The Slack integration rate limiting issue reported in #1948 and addressed in commit [[8765bc0](https://github.com/OneUptime/oneuptime/commit/8765bc07ed6aa10dd562cd4f8f5fd6dd0aaa3a63)](https://github.com/OneUptime/oneuptime/commit/8765bc07ed6aa10dd562cd4f8f5fd6dd0aaa3a63) is still occurring, though the error location has shifted from line 213 to line 262. ## Current Status - **Previous Issue**: #1948 - **Previous Fix**: 8765bc0 - **Current Version**: Latest release (post-upgrade) - **Status**: Issue persists with different error location ## Problem Details ### Symptoms 1. **Channel Dropdown Empty**: Slack channel dropdown remains empty when creating notification rules 2. **Test Rule Failures**: Test Rule functionality fails with rate limiting errors 3. **Integration Broken**: Two-way Slack integration features (slash commands, interactive features) not working ### Error Details ``` BadDataException [Error]: Cannot post message to channel. ratelimited at Service.testRule (/usr/src/Common/Server/Services/WorkspaceNotificationRuleService.ts:262:17) ``` ### Full API Response ```json HTTPErrorResponse { "_statusCode": 429, "_headers": { "retry-after": "30", "x-oauth-scopes": "commands,channels:history,channels:join,channels:manage,channels:read,channels:write.invites,channels:write.topic,chat:write,users:read,groups:read,groups:write,im:read,im:write,mpim:read,mpim:write" }, "_data": { "ok": false, "error": "ratelimited" } } ``` ## Root Cause Analysis The previous fix appears to have been **incomplete**. While it may have addressed rate limiting in specific scenarios, it didn't implement comprehensive rate limiting protection across all Slack API operations. The core issue of excessive API calls without proper throttling remains unresolved. ## Steps to Reproduce 1. Navigate to notification rules creation 2. Attempt to select Slack channel from dropdown 3. Observe empty dropdown 4. Try to test the rule 5. Receive rate limiting error ## Expected Behavior - Channel dropdown should populate with available Slack channels - Test Rule should successfully send test notifications - Two-way Slack integration should function properly - API calls should be properly throttled to respect Slack's rate limits ## Proposed Solution Implement comprehensive rate limiting across **all** Slack API endpoints, not just specific scenarios: 1. **Global Rate Limiting**: Implement rate limiting wrapper for all Slack API calls 2. **Retry Logic**: Add exponential backoff with jitter for 429 responses 3. **Request Queuing**: Queue requests when approaching rate limits 4. **Caching**: Cache channel lists and other frequently accessed data ## Environment - Deployment: Docker Compose - Slack App: Properly configured with all required permissions ## Request for Information Can other users confirm if they're experiencing similar issues with the latest release? This will help determine if it's a widespread problem or environment-specific.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#431