Twitch.tv Chat Messages Delayed/Reloads/Missed
Categories
(Core :: Networking: WebSockets, defect, P2)
Tracking
()
People
(Reporter: jimbo2150, Unassigned)
Details
(Whiteboard: [necko-triaged])
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0
Steps to reproduce:
Opened a live video in Twitch.tv
Actual results:
Periodically (not all the time) the Twitch chat will become delayed or get "disconnected" repeatedly. For live streams that show the chat in the video I will see new chat messages appearing even though they do not appear in the chat box on the screen. This will last typically between 2-10 minutes before the chat will "reconnect." In most cases the previous chat messages will suddenly pop into the box (though with incorrect timestamps since they were sent earlier but only now being shown). In other cases a "Reconnecting to chat..." message will appear for a few seconds then new messages will appear but older messages that were sent will not appear in the box. Refreshing the tab will fix the issue for a period of time but will eventually happen again after a random period of time.
In some cases I can send my own chat message and after a few seconds it will cause the chat server to reconnect but in other cases the message will remain in the input box and will only allow me to send it once the chat server is reconnected.
This issue only started in the past few versions of Firefox up to the current 71. The issue does not happen in Chrome (unless the chat server is experiencing issues which is rare) while the issue occurs in Firefox rather regularly.
I have seen a few live streamers that also use Firefox for their chat and have experienced similar issues where the chat gets regularly disconnected and must reload the Firefox tab.
Expected results:
The chat messages should continually update as they are sent and received from the server.
Comment 1•6 years ago
|
||
Setting Product and component.
Audio/Video: Playback team if this is not the right component please feel free to route this ticket to the corresponding team, thanks!
Comment 2•6 years ago
|
||
I guess it relates to WebRTC more.
Byron, is this something relating to data channel?
Comment 3•6 years ago
|
||
Hi Jim,
Would you mind checking if this happen in Firefox Nightly?
Comment 4•6 years ago
|
||
I am not sure how chat is implemented in twitch, but datachannel seems plausible.
Updated•6 years ago
|
Haven't used it long but I have not seen it happen on nightly yet.
Comment 6•6 years ago
|
||
Hi Nico, could you please take a look at confirming this and determining whether or not twitch uses data channels for this?
Comment 7•6 years ago
|
||
It doesn't look like Twitch uses DataChannels. I am moving this over to WebSockets for now.
Comment 8•6 years ago
•
|
||
(In reply to Nico Grunbaum [:ng] from comment #7)
It doesn't look like Twitch uses DataChannels. I am moving this over to WebSockets for now.
Yeah it seems it uses WebSocket, at least in its javascript chat-sample.
Comment 9•6 years ago
|
||
I guess it's a websocket connection to irc-ws.chat.twitch.tv. When you see the problem, is there an active websocket connection visible at about:networking#websockets? Does developer tools show any messages for that websocket channel?
| Reporter | ||
Comment 10•6 years ago
|
||
Yes, I see websocket connections happening in the about:networking and in web developers. I have not seen it happen on nightly or stable for a while now so I was not able to capture it. It is possible it was some script bug that Twitch has now fixed.
Comment 11•6 years ago
|
||
I'm closing it as WFM for now. Feel free to reopen it if you see it again.
| Reporter | ||
Comment 12•6 years ago
|
||
This issue is happening again since upgrading to Firefox 73.
Updated•6 years ago
|
Comment 13•6 years ago
|
||
Please can you test again with Firefox Nightly?
| Reporter | ||
Comment 14•6 years ago
|
||
Andy,
I will try it in nightly in the next couple days.
Not sure if it helps but I watched the WebRTC connections in dev tools when it happened and it seems like it just got disconnected. Maybe it hit some sort of timeout? There was no error message, the connections just stopped. Sometimes sending a new chat message will "kick" it back on and I will see a "Connected to chat" message, but other times I will not. For the most part, sending a chat message will still send it even though I see no inbound chat messages (outbound only). It doesn't seem to happen for chat that is very active (at least not seen it happen in 73 yet). It seems to be when there is a lack of messages for a bit.
| Reporter | ||
Comment 15•6 years ago
|
||
I got screen captures of an error message and the chat WebRTC messages after it happened on 73.0.1. I will try with Nightly later today.
| Reporter | ||
Comment 16•6 years ago
|
||
When I try it on Nightly it does disconnect, though not as much as in 73, but every time it did it created a second connection and was reconnected about 10 seconds after a disconnect.
Comment 17•6 years ago
|
||
Michal, can you take a look?
Comment 18•6 years ago
|
||
Jim, can you please try to reproduce the failure with logging enabled? See https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging. The log modules should be "timestamp,sync,nsHttp:5,nsSocketTransport:5,nsWebSocket:5".
| Reporter | ||
Comment 19•6 years ago
|
||
Michal,
Here is a log. The disconnect happened near the end followed by a false re-connect. False reconnect is when the chat says it reconnected but I still don't get any further messages unless I reload the page.
https://send.firefox.com/download/4799bcd97f2b0b05/#EzfvzsRyC1KzSZNwporYJw
Comment 20•4 years ago
|
||
Hi Jim,
Are you still able to reproduce this?
If yes, could you kindly provide the log again?
Thanks!
| Reporter | ||
Comment 21•4 years ago
|
||
No, it no longer happens in the newer versions of Firefox.
Updated•4 years ago
|
Description
•