Firefox: Loss of connectivity across all open tabs until rocketchat is closed
WHAT: Loss of connectivity when browsing RocketChat with Firefox. (Opera and Qupzilla are unaffected) WHEN: I'm not positive, but it seems to occur most often when the chat history has several media objects in it, such as images, webm video, youtubes, etc. HOW:
- Rocketchat v0.8.0 (full api/info query results at the bottom of this post)
- Firefox 42 (Linux)
- NoScript: installed, disabled
- AdBlock Plus: installed, disabled
- Hubot: not running
- Arch 64bit, Kernel Linux 4.2.5-1-ARCH x86_64
- Server: Ubuntu 14.04 / Nginx 1.9.9, SSL Caching enabled, HTTP/2
CAN REPRODUCE: Yes.
NARRATIVE: When browsing my chat deployment, or a similar RC server belonging to a friend, something is causing the following symptoms:
- The connection to the Rocketchat server goes down (see the "Connecting..." notice in the UI.)
- Any other tabs that are open in firefox also lose connection, every time.
- No connectivity is possible from new tabs spawned to test the problem.
- Nothing resolves / restores connectivity until the tab with Rocketchat is closed, or the entire browser is restarted. NOTE: If I initiate "Play" on any / all video objects in the chat window, I've been able to get connectivity back, however, I've only tried that twice.
Console:

{
"version": "0.8.0",
"compile": {
"date": "2015-12-08T17:48:10.474Z",
"nodeVersion": "v0.10.40",
"arch": "x64",
"platform": "linux",
"osRelease": "3.13.0-63-generic",
"totalMemmory": 7844462592,
"freeMemmory": 5141872640,
"cpus": 2
},
"travis": {
"buildNumber": "2547",
"branch": "master",
"tag": ""
},
"commit": {
"hash": "7b4c048d6143f561ffa034e95bcddf39ddaa3248",
"date": "Tue Dec 8 15:42:36 2015 -0200",
"author": "Gabriel Engel",
"subject": "Merge pull request #1597 from Nberton/develop"
},
"tag": "v0.8.0",
"branch": "HEAD"
}
Test account on my lab server where it can be reproduced:
[sanitized]
Join channel "testing" and type in a test message, and send it. Wait & watch your console.
I've been studying this some more and have found the following which may help:
If there is even one uploaded video object that is in the chat, all the user must do is join the channel. 30 seconds later the loss of connectivity happens. It seems like the websocket falls over at 30 seconds. Once the disconnect occurs, if the user clicks the play button on the video, the connectivity is restored.
I just disabled HTTP/2 and can no longer reproduce the issue. As this is apparently an issue with Mozilla Firefox HTTP/2, and not rocketchat, I'm closing this ticket.
That's bizarre.. thanks for reporting anyway. So it doesn't happen on Chrome?
@engelgabriel Unknown. I didn't get that far. I suppose it's possible that I may have something mis-configured for HTTP/2 support between nginx and node. From a cursory scan of this article, it seems that my configuration is proper. My SSL/TLS installation is sound, and checks out with a perfect score via qualys SSL tester, and since the issue only happens when a video file is in recent visible chat history, I'm stumped.