-
Notifications
You must be signed in to change notification settings - Fork 675
Closed
Labels
bugM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedpkg:socket-modeapplies to `@slack/socket-mode`applies to `@slack/socket-mode`
Milestone
Description
As reported at slackapi/bolt-js#1428 (comment), there is still a pattern that SocketModeClient's auto-reconnection does not work. See the repro steps below for details.
Packages:
Select all that apply:
-
@slack/web-api -
@slack/rtm-api -
@slack/webhooks -
@slack/oauth -
@slack/socket-mode - I don't know
Reproducible in:
The Slack SDK version
any version including 1.3.0
Node.js runtime version
any version
OS info
any
Steps to reproduce:
Copied from slackapi/bolt-js#1428 (comment)
[INFO] A pong wasn't received from the server before the timeout of 5000ms!
[INFO] Reconnecting to Slack ...
[INFO] Going to establish a new connection to Slack ...
[ERROR] Failed to send a message as the client is not ready
[ERROR] An unhandled error occurred while Bolt processed (type: event_callback, error: Error: Failed to send a WebSocket message as the client is not ready)
[ERROR] Failed to send a message as the client is not ready
[ERROR] An unhandled error occurred while Bolt processed (type: event_callback, error: Error: Failed to send a WebSocket message as the client is not ready)
[ERROR] Faled to retrieve a new WSS URL for reconnection (error: Error: An API error occurred: internal_error)
[WARNING] Failed to start a Socket Mode connection (error: An API error occurred: internal_error)
And then endless loop of:
[ERROR] Failed to send a message as the client is not ready
[ERROR] An unhandled error occurred while Bolt processed (type: event_callback, error: Error: Failed to send a WebSocket message as the client is not ready)
Looking into similar occurrences, it is usually able to reconnect, so I think what caused the problem is:
Faled to retrieve a new WSS URL for reconnection
Failed to start a Socket Mode connection
Expected result:
The SocketModeClient automatically reconnects when the server-side started working again.
Actual result:
The reconnection does not happen.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedpkg:socket-modeapplies to `@slack/socket-mode`applies to `@slack/socket-mode`