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

It became impossible to connect to slack around 2022/9/27 #307

Closed
KanaIshikawa opened this issue Oct 6, 2022 · 4 comments
Closed

It became impossible to connect to slack around 2022/9/27 #307

KanaIshikawa opened this issue Oct 6, 2022 · 4 comments

Comments

@KanaIshikawa
Copy link

It became impossible to connect to slack around 2022/9/27or28

I was able to send messages until the day before with the following source code, but I can no longer connect.

var client = new SlackSocketClient(BotToken); ManualResetEventSlim clientReady = new ManualResetEventSlim(false); client.Connect((connected) => { client.PostMessage((responce) => { }, ChannelId, options.Text, BotName, null, false, null, null, null, null, MessageIconEmoji); clientReady.Set(); }); if(clientReady.Wait(60 * 1000) == false) { Console.Error.WriteLine("// ERROR : Send Slack is fault."); }
However, since the message can be sent using curl, the token by bots should not be wrong.
curl -d "token=(tokenID)" -d "text=hoge." -d "channel=(channelID)" -X POST https://(myWorkspace)/api/chat.postMessage

please help me please.

@Inumedia
Copy link
Owner

Inumedia commented Oct 6, 2022

See #304

There's nothing I can do to help you at the moment.

@Inumedia Inumedia closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2022
@Inumedia Inumedia reopened this Oct 6, 2022
@Inumedia Inumedia closed this as completed Oct 6, 2022
@KanaIshikawa
Copy link
Author

i understand.
When I stopped asynchronous processing and replaced it with synchronous processing, it worked, so this problem is okay.

@Inumedia
Copy link
Owner

Inumedia commented Oct 6, 2022

Could you clarify? Are you saying when not using the async methods, the real time messaging works?

@KanaIshikawa
Copy link
Author

KanaIshikawa commented Oct 7, 2022

`
var slackClient = new SlackSocketClient(BotToken);
using (var sync = new InSync())
{
slackClient.PostMessage(response =>
{
postMessageResponse = response;
sync.Proceed();
}, ChannelId, message, BotName, null, false, null, null, null, null, MessageIconEmoji);
}

`

After rewriting as above, the message was able to be sent.

var fileUploadResponse = new FileUploadResponse(); var slackClient = new SlackSocketClient(BotToken); using (var sync = new InSync()) { slackClient.UploadFile( response => { fileUploadResponse = response; sync.Proceed(); }, byteData, fileName, channelIds, title); }

fileupload is similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants