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

Server is not accepting WebSocket connections. Reconnecting in 10 seconds #39

Closed
macharborguy opened this issue Aug 21, 2015 · 16 comments
Closed

Comments

@macharborguy
Copy link

Not sure what happened, but about a day or so ago, our bot started reporting "Server is not accepting WebSocket connections. Reconnecting in 10 seconds" and is no longer able to connect to Twitch IRC.

Has anything happened with the Twitch IRC systems that is just not playing nice with TMI.js?

I have checked the oauth keys that I use for our Bot account and Primary account, as well as regenerated them, and they are still unable to connect.

@AlcaDesign
Copy link
Member

I think they're changing servers or something. Have a look at TwitchStatus.com

@Schmoopiie
Copy link
Member

https://discuss.dev.twitch.tv/t/notice-of-upcoming-changes-websockets-and-secure-connections/2269/24

I'm trying to keep them up to date on our API but as far as I know, the group chat servers don't have any websocket servers listed on the Twitch API at this time.

@celluj34
Copy link
Contributor

celluj34 commented Aug 21, 2015

If there were only an API for available chat, event, and group servers...

@AlcaDesign
Copy link
Member

There's the chat_properties endpoint, but not quite what we need .. Also, looking at that, anyone know what "..._pct" is?

@Schmoopiie
Copy link
Member

They are but for the group chat servers you need an oauth_token, this is why I prefer to have a custom API 😄

http://chatdepot.twitch.tv/room_memberships?oauth_token=YOUR_TOKEN

@Schmoopiie
Copy link
Member

There is http://tmi.twitch.tv/servers?cluster=group but I don't know if it's reliable.. some servers are listed there and aren't on the other endpoint..

@AlcaDesign
Copy link
Member

How do you know of these endpoints? ResidentSleeper

@Schmoopiie
Copy link
Member

I have no life sorry :(

@AlcaDesign
Copy link
Member

Are they in some discussions some places or do you just guess around?

@Schmoopiie
Copy link
Member

I use the Network tool (CTRL+SHIFT+J and click Network) from Chrome and check what API endpoint is being used when browsing Twitch

@AlcaDesign
Copy link
Member

They need to unify their APIs and crap .. How does anyone keep track? Also, you should tell me everything you know.SoonerLater

@macharborguy
Copy link
Author

thanks for the info, i restarted our bot and it was able to get back into the server. ill keep an eye on our log file just in case things go down again. and thanks as well for the twitch stats website link!

and yeah, their API all over has holes in it. still cannot believe they wont let you get more than the most recent 1600 follower names. now i have to check each and every chat user who logs into our channel and see if they are following or not so i can give their name in our chat widget a special follower icon.

@Schmoopiie
Copy link
Member

No idea, but as far as I know, tmi.twitch.tv is always subject to change so we cannot rely on these endpoints.. that is why I'm working on my own API for tmi.js, anyways, I have to go to work now, see you guys tomorrow 😄

@AlcaDesign
Copy link
Member

Have fun on the night-shift DendiFace

@xhip
Copy link

xhip commented Aug 21, 2015

I backup "servers.js" and removed all the "off" servers, looks like a temporary fix for now... the only "ws_irc" online is "192.16.64.205 (Port 80)" but thing may change...

@Schmoopiie
Copy link
Member

I will close this issue because it is fixed, I will keep an eye on their websocket servers this weekend just in case they are doing some IP rotations.

@xhip You shouldn't have to do this actually, the library queries http://www.tmijs.org/api/servers/ to update the hardcoded servers and if for some reasons our API doesn't work, then it's going to use the default hardcoded servers. It wasn't working before because the API wasn't updated with the new servers, but now everything should be okay 😄

If you guys see some changes before I do, reply in this issue and I will reopen it.

Thanks!

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

5 participants