RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.02k stars 10.32k forks source link

Can't access online demo: `ReferenceError: mozRTCSessionDescription is not defined` #265

Closed guarilha closed 9 years ago

guarilha commented 9 years ago
The connection to wss://rocket.chat/sockjs/135/4lpkehk9/websocket was interrupted while the page was loading. 617d7a1245968cca434edf6ab8747414cbeeb840.js:36:0
GET https://rocket.chat/login [HTTP/1.1 200 OK 486ms]
GET XHR https://rocket.chat/sockjs/info [279ms]
GET https://dbde4sd21oahf.cloudfront.net/f970dc36599aca162f15433adafa67e14a764a0a.css [HTTP/1.1 200 OK 40ms]
GET https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js [HTTP/1.1 200 OK 271ms]
This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.[Learn More] 617d7a1245968cca434edf6ab8747414cbeeb840.js
This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.[Learn More] f970dc36599aca162f15433adafa67e14a764a0a.css
GET https://fonts.googleapis.com/css [HTTP/2.0 200 OK 242ms]
This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.[Learn More] css
"This appears to be Firefox" 617d7a1245968cca434edf6ab8747414cbeeb840.js:228:473
ReferenceError: mozRTCSessionDescription is not defined 617d7a1245968cca434edf6ab8747414cbeeb840.js:228:986
"Exception in defer callback: m.prototype._attachEvents@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:130:5108
m.prototype.events@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:130:4943
d@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:140:2019
h<.constructor@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:142:522
r.utils.extend/o@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:128:1574
c.prototype.createController@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:142:10852
c.prototype.dispatch@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:142:16092
r@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:142:16995
t.Computation.prototype._compute@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:9:2045
t.Computation@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:9:1275
t.autorun@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:9:3758
c.prototype.start@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:142:16892
c/</<@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:142:9127
.withValue@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:3:6453
n/<@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:3:2782
e.bindEnvironment/<@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:3:6709
e@https://dbde4sd21oahf.cloudfront.net/617d7a1245968cca434edf6ab8747414cbeeb840.js:3:2033
" 617d7a1245968cca434edf6ab8747414cbeeb840.js:3:5747
GET https://rocket.chat/favicon.ico [HTTP/1.1 200 OK 161ms]
GET XHR https://rocket.chat/sockjs/info [HTTP/1.1 200 OK 137ms]
ReferenceError: Spacebars is not defined 617d7a1245968cca434edf6ab8747414cbeeb840.js:132:1370
GET https://rocket.chat/sockjs/125/5sp5l6lc/websocket [HTTP/1.1 101 Switching Protocols 542ms]
GET XHR https://rocket.chat/_timesync [HTTP/1.1 200 OK 163ms]
OPTIONS https://enginex.kadira.io/errors [HTTP/1.1 200 OK 649ms]
OPTIONS https://enginex.kadira.io/errors [HTTP/1.1 200 OK 561ms]
This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.[Learn More] errors
POST XHR https://enginex.kadira.io/errors [HTTP/1.1 200 OK 248ms]
POST XHR https://enginex.kadira.io/errors [HTTP/1.1 200 OK 245ms]
GET XHR https://enginex.kadira.io/simplentp/sync [HTTP/1.1 200 OK 212ms]
This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.[Learn More] sync
GET XHR https://enginex.kadira.io/simplentp/sync [HTTP/1.1 200 OK 211ms]
POST https://www.google-analytics.com/collect [HTTP/2.0 200 OK 275ms]POST https://www.google-analytics.com/collect [HTTP/2.0 200 OK 127ms]OPTIONS 
https://enginex.kadira.io/errors [HTTP/1.1 200 OK 189ms]
POST XHR https://enginex.kadira.io/errors [HTTP/1.1 200 OK 245ms]
GET XHR https://enginex.kadira.io/simplentp/sync [HTTP/1.1 200 OK 240ms]
GET XHR https://enginex.kadira.io/simplentp/sync
rodrigok commented 9 years ago

Which browser and version are you using?

guarilha commented 9 years ago

Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0

engelgabriel commented 9 years ago

Seems to be related to https://github.com/RocketChat/Rocket.Chat/blob/master/packages/rocketchat-webrtc/adapter.js

https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection

Sing-Li commented 9 years ago

We may want to detect for webrtc support within our package code before executing any line that can fail. Then ensure the "Video Button" does not show when there is no support. It will avoid having to troubleshoot multiple variations of browser + OS combinations (similar to this issue) going forward.

In this field tested Apache Licensed code - see the isWebRtcCompatible() method for a possible implementation:

https://github.com/appearin/developer-pages/blob/master/files/scripts/appearin-sdk.0.0.4.js

engelgabriel commented 9 years ago

I thought that we could do this using just the adapter.js we copied from https://github.com/webrtc/adapter

There are other alternatives:

https://github.com/Temasys/AdapterJS https://github.com/willscott/webrtc-adapter

Maybe we need to spend more time to investigate the best solution. Thanks for the extra info @Sing-Li

Sing-Li commented 9 years ago

I think the 'webrtc compatibility charts' all over the web are misleading. Just because it says Firefox 38 supports webrtc - it does not mean ALL firefox-38 + OS combinations support webrtc. This is why run-time, browser capabilities-based detection of webrtc support remains very important in production systems.

rodrigok commented 9 years ago

I am working on it. I've tried to use AdapterJS, looks good, but do not worked for me easily, so I changed the old adapter to a much more simple code and now webrtc is working in FF in OS X.

The next step is create this verifications if the browser support webrtc and then work with some solution to make webrtc work in IE and Safari.

rodrigok commented 9 years ago

@guarilha Can you test again?

guarilha commented 9 years ago

it's working now @rodrigok :+1:

rodrigok commented 9 years ago

:D