TwilioDevEd / twiliochat-csharp

C# implementation of Twilio Chat using ASP.NET MVC
https://www.twilio.com/docs/tutorials/walkthrough/ip-chat/csharp/mvc
23 stars 12 forks source link

TwilChat cannot connect #12

Open crono009 opened 4 years ago

crono009 commented 4 years ago

I followed the instructions on how to get the demo app running on visual studio 2019. I can run the program and I successfully find and join the general channel. However, nothing works other than that. I cannot chat nor see the chat. In fact I can't even type anything into the input field. The error I receive in the console is a WebSocket Error.

"Web WebSocket connection to 'wss://tsock.twilio.com/v2/wsconnect?' failed: Error during WebSocket handshake: Unexpected response code: 503.

Any suggestions?

urosrw commented 4 years ago

Hi, I have the same problem - I'm getting 503. I followed the instructions and tried it in VS 2019 and VS 2017. I also tried switching from Chrome to Firefox. I'm able to connect/disconnect user, but I don't see any channels and I'm not able to create new channel.

My exact error messege in Chrome is: twilio-chat.js:22494 WebSocket connection to 'wss://tsock.twilio.com/v2/wsconnect?token=eyJj...' failed: Error during WebSocket handshake: Unexpected response code: 503

Ramizkhan313 commented 4 years ago

Hi, I am also getting the same problem - I'm getting 503. I also followed the instructions i am using VS 2019. It seems issue in the demo application it self, i think we need to ask to support i am not sure they will acknowledge here because i see this tickets is open since long time.

ZedoTech commented 4 years ago

Hi, I got same problem, that's because c# sample's twilio-chat.js too old, you need to update it to link new version. Step 1 in _Layout.cshtml: update twilio-chat.js url to

update twilio-common.js to

Step 2 in Scripts/lib/ DELETE twiliochat.js in Scripts/lib/ and you may need to find new twiliochat.js in nodejs sample, I found it in https://github.com/TwilioDevEd/twiliochat-node/tree/master/public/js

and then clean your cache and restart the project, your issue should be resolved.

IbrahimChhaya commented 3 years ago

I have the same issue. I tried @ZedoTech's solution but even that didn't work. I get this error:

twilio-chat.js:26280 Uncaught (in promise) Error: Can't connect to twilsock
    at TransportUnavailableError.ExtendableBuiltin (twilio-chat.js:26280)
    at TransportUnavailableError.TwilsockError (twilio-chat.js:26310)
    at new TransportUnavailableError (twilio-chat.js:26233)
    at Upstream.send (twilio-chat.js:27760)
    at TwilsockClient.post (twilio-chat.js:26033)
    at twilio-chat.js:20525
    at Retrier.<anonymous> (twilio-chat.js:20466)
    at emitOne (twilio-chat.js:10848)
    at Retrier.emit (twilio-chat.js:10926)
    at Retrier.attempt (twilio-chat.js:13033)