-
Notifications
You must be signed in to change notification settings - Fork 662
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
RTM Disconnect in State Disconnected Throws Error #842
RTM Disconnect in State Disconnected Throws Error #842
Comments
Hi @awcchungster, thanks for reporting and sorry for the delay in our response. I tried reproducing this problem but I wasn't able to. Can you provide any more information, or perhaps some sample code, to help us get to the bottom of this? Here is what I tried: const { RTMClient} = require('@slack/rtm-api');
const rtm = new RTMClient('xoxb-my-token');
// Start a connection and send a message
rtm.start();
rtm.sendMessage('hello', 'C123456');
// Attach a handler for when I press Ctrl+C in the terminal
process.on('SIGINT', () => {
console.log('SIGINT received');
rtm.disconnect().then(() => {
console.log('disconnected');
})
.catch(console.error);
}); I run the program (with my bot token and a channel ID from my workspace substituted) and wait to see the message was sent (so that I know I'm connected). Then I press |
Hello, I am experiencing the same issue. When trying
Not even a try....catch around the |
I figured out the issue, it appears to happen when you call
|
…transition back to disconnected. also add basic integration tests.
Hello after like, four years 👋 I have a fix for this teed up for the next major release, getting reviewed over here: #1764 |
This was fixed in v7 of rtm-api. Better (four years) late than never I guess! |
Description
Describe your issue here.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Packages:
Select all that apply:
@slack/web-api
@slack/events-api
@slack/interactive-messages
@slack/rtm-api
@slack/webhooks
Reproducible in:
package version:
node version:
OS version(s):
Steps to reproduce:
Expected result:
RTM socket should close.
Actual result:
Error
Attachments:
Logs, screenshots, screencast, sample project, funny gif, etc.
The text was updated successfully, but these errors were encountered: