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

After a few minutes with EventSubWebSocket, sometimes getting "Failed Ping Pong" disconnect #48

Open
WrithemTwine opened this issue Nov 15, 2024 · 2 comments

Comments

@WrithemTwine
Copy link

Using 'auth code' access tokens w/access scopes; get access token.
Start EventSub 'startasync' and subsequent Helix "create ChatMessageReceived subscription" after 'OnConnected'.

I'm using the EventSubWebSocket(ILoggerFactory) constructor,

public EventSubWebsocketClient(ILoggerFactory loggerFactory = null)

Tried several times (validating with "!command" type calls to channel and getting 'sendchatmessage' responses), sometimes can last 20+ minutes connected to channel, or within 2-3 minutes receive:
image

The authcode access tokens have checks and refresh as needed. In this case, the access tokens are already refreshed and would/should be ok for hours.

image

(still working on reliable logging for more information, have captured "failed ping pong" though)

@Syzuna
Copy link
Member

Syzuna commented Nov 15, 2024

Interesting.
What you experienced, the low level ping/pong failing (Code 4002) would be handled outside of TwitchLib inside the .NET Websocket implementation tho so I dont know if this is sth we can help with but rather an intermittend connection issue on your end to AWS.

@WrithemTwine
Copy link
Author

I missed this part of the documentation about subscription access:
https://dev.twitch.tv/docs/eventsub/manage-subscriptions/
"The Subscription Types topic lists the scope requirement for each event. If the event doesn’t specify a scope requirement, you must create a user access token with no scope."

Found out, I mixed scope/no scope subscriptions together and Twitch doesn't like that. so I'll be separating subscriptions into another eventsub instance.

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