Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Cannot send message when client is not ready #1464

Closed
4 of 10 tasks
kyman2001 opened this issue Apr 13, 2022 · 5 comments
Closed
4 of 10 tasks

ERROR: Cannot send message when client is not ready #1464

kyman2001 opened this issue Apr 13, 2022 · 5 comments
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented pkg:socket-mode applies to `@slack/socket-mode`

Comments

@kyman2001
Copy link

kyman2001 commented Apr 13, 2022

Description

Describe your issue here.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • example code related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Received the following error while using the BOLT API. Process then terminates. This is happening intermittently (approximately once a week). The process will have been running for some days prior to the error, and operating normally without any errors of any description.

[ERROR]  socket-mode:SocketModeClient:0 cannot send message when client is not ready
/usr/local/www/apache24/data/slack/node_modules/@slack/socket-mode/dist/errors.js:63
    return errorWithCode(new Error('Cannot send message when client is not ready'), ErrorCode.NoReplyReceivedError);
                         ^

Error: Cannot send message when client is not ready
    at sendWhileNotReadyError (/usr/local/www/apache24/data/slack/node_modules/@slack/socket-mode/dist/errors.js:63:26)
    at /usr/local/www/apache24/data/slack/node_modules/@slack/socket-mode/dist/SocketModeClient.js:343:60
    at new Promise (<anonymous>)
    at SocketModeClient.send (/usr/local/www/apache24/data/slack/node_modules/@slack/socket-mode/dist/SocketModeClient.js:334:16)
    at ack (/usr/local/www/apache24/data/slack/node_modules/@slack/socket-mode/dist/SocketModeClient.js:473:24)
    at App.processEvent (/usr/local/www/apache24/data/slack/node_modules/@slack/bolt/dist/App.js:536:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async SocketModeClient.<anonymous> (/usr/local/www/apache24/data/slack/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.js:146:13) {
  code: 'slack_socket_mode_no_reply_received_error'
}

Reproducible in:

package version: 0.24.10

node version: 16.13.0

OS version(s): FreeBSD 13.0-RELEASE-p6 (GENERIC) #0: Mon Jan 10 06:28:50 UTC 2022

Steps to reproduce:

  1. Unable to reproduce on demand. This error is intermittent.

Expected result:

failure has a documented response and/or allows the program to continue.

Actual result:

Error is output then the process stops.

Attachments:

No further information.

@seratch
Copy link
Member

seratch commented Apr 13, 2022

Hi @kyman2001, thanks for taking the time to report this issue. This needs to be improved in future versions of @slack/socket-mode library, which is the underlying low-level module that @slack/bolt relies on. Let me transfer this issue to node-slack-sdk project.

@seratch seratch transferred this issue from slackapi/bolt-js Apr 13, 2022
@seratch seratch added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented pkg:socket-mode applies to `@slack/socket-mode` labels Apr 13, 2022
@seratch seratch added this to the socket-mode@1.3.0 milestone Apr 13, 2022
@seratch
Copy link
Member

seratch commented Apr 15, 2022

#1465 will resolve this issue. We are going to release an RC version soon. Please try the RC version out and let us know if you find something wrong with it.

@seratch seratch closed this as completed Apr 15, 2022
@seratch
Copy link
Member

seratch commented Apr 15, 2022

👋 Hi, all the developers watching this thread!

We've improved the SocketModeClient internals a lot to be more robust. You can try the updated one by installing the RC version by running the following command:

npm i @slack/socket-mode@next
# or npm i @slack/socket-mode@1.3.0-rc.0

If you are interested in all the changes included in the release, refer to https://github.com/slackapi/node-slack-sdk/releases/tag/%40slack%2Fsocket-mode%401.3.0-rc.0 for the details.

If everything goes well, we will release v1.3.0 next week!

@kyman2001
Copy link
Author

Thank you folks for attending to this issue. I will install the rc after the holiday weekend.

@seratch
Copy link
Member

seratch commented May 4, 2022

version 1.3.0 is now available. Please upgrade to the latest version 👋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented pkg:socket-mode applies to `@slack/socket-mode`
Projects
None yet
Development

No branches or pull requests

2 participants