SlackAPI icon indicating copy to clipboard operation
SlackAPI copied to clipboard

client can't connect

Open koenvzeijl opened this issue 8 years ago • 10 comments

I got a auth token from slack which i used with this library. the problem is that the client won't connect, does someone know what i do wrong?

i included a picture of my code with the token blurred capture

koenvzeijl avatar May 25 '16 09:05 koenvzeijl

client.Connect((connected) => {
    //This is called once the client has emitted the RTM start command
}, () => {
    //This is called once the RTM client has connected to the end point
});

aperlstein avatar May 25 '16 14:05 aperlstein

There's no native WebSocket implementation in Windows 7. You must use the windows 8 or above.

pjc0247 avatar May 30 '16 02:05 pjc0247

@pjc0247 There is a WebSocket implementation available in the .NET framework from version 4.5 and up.

Inumedia avatar May 30 '16 02:05 Inumedia

@koenvzeijl Is this still a problem after @aperlstein 's comment?

Inumedia avatar May 30 '16 02:05 Inumedia

@Inumedia http://stackoverflow.com/questions/11039438/using-websocket-on-windows7

Yes, there is. but it does not working with windows 7.

pjc0247 avatar May 30 '16 04:05 pjc0247

Oh. Well, that's not good.

Inumedia avatar May 30 '16 05:05 Inumedia

no this doesn't fix it for me unfortunatly it still says not connected and btw i am on windows 10

koenvzeijl avatar May 30 '16 06:05 koenvzeijl

@koenvzeijl Did you call client.Connect method? SlackSocketClient.ctor() does not perform a connection.

https://github.com/Inumedia/SlackAPI/blob/master/SlackSocketClient.cs#L29-L33

pjc0247 avatar May 30 '16 07:05 pjc0247

@koenvzeijl is your controller being left running? After some struggles myself recently, I discovered that if my application exits right away, then the connect doesn't have time to complete before the application stops.

kenrachynski avatar Jul 07 '16 15:07 kenrachynski

Give this a whirl: Install Newtonsoft.Json. I was seeing warnings about different versions running and installed it through NuGet. Worked immediately. Might need an updated version in the source?

bmp02050 avatar Jan 30 '19 13:01 bmp02050