Page MenuHomePureOS Tracker

PureBrowser incompatible with user-agent sniffing at meet.jit.si
Closed, InvalidPublic

Description

Steps to reproduce:

What should happen:

  • Page loads
  • Prompted for WebRTC access (microphone and camera)
  • Able to take part in a meeting

What happens instead:

  • Page does not finish loading (grey background, favicon visible, nothing else)
  • JavaScript error in console (looks like it's related to user agent, see below)
  • No WebRTC prompts

Notes:

  • Confirmed that media.peerconnection.enabled (under about:config) is True
  • Console error message (when visiting https;//meet.jit.si ):
(TIME) index.html loaded:	 2608.175 meet.jit.si:9:9
TypeError: navigator.userAgent.match(...) is null
 lib-jitsi-meet.min.js:2:1818
DEPRECATED JS - Cookie has been deprecated since 5.8.0 and will be removed in a future release. Use cookie instead.   
 t.default@https://cdn.jitsi.net/2250/libs/app.bundle.min.js?v=2250:2:3822 app.bundle.min.js:2:116542
mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create app.bundle.min.js:2:1784342
ReferenceError: JitsiMeetJS is not defined
 app.bundle.min.js:2:370578

Event Timeline

d3vid created this task.Sep 20 2017, 02:58

that smells like bad code in jitsi.meet, choking on browser names not known to it.

Imagine a French postal worker passing a sack of mail to a gernam postal office, but instead of processing the mail sack they throw out all the mail because the mailman was not wearing a green or yellow shirt as expected. French outfits are arguably weird but should be tolerated!

Similarly, a browser weirdly identifying itself as "hey, my name is FreedomBrowser" should not make jitisi vommit: Blame jitsi.meet.

mladen added a subscriber: mladen.Nov 9 2017, 05:43

I can use jitsi on my IceWeasel if I put comment the following in its vendor.js:

// pref("media.peerconnection.enabled", false);
// pref("media.peerconnection.ice.default_address_only", true);

So if your media.peerconnection.enabled is true you might wanna also check if media.peerconnection.ice.default_address_only is set to false.

d3vid added a comment.Nov 10 2017, 02:57

From cross-report (link above):

Yep, looks like an extra check would be needed in order to treat PureBrowser as Firefox. The logic will probably need to go here ...

A quick inspection reveals they use user-agent sniffing to determine RTC capabilities, and require "Firefox" to appear in the UA string. (This is true for IceWeasel, IceCat and Tor.)

Jitsi Meet are happy to accept a patch, so this is no longer a PureBrowser issue. So I'm closing this ticket.

But I'd like to confirm our UA string policy as it has broader implications, see https://tracker.pureos.net/T247 (@jonas.smedegaard you might have some insights on why we'd want to keep the UA the way it is?)

d3vid closed this task as Invalid.Nov 10 2017, 02:58
jonas.smedegaard added a comment.EditedNov 10 2017, 03:22

User Agent sniffing is an anti-pattern - use feature detection instead!

For more info, search the web with these keywords:

user agent sniffing parsing bad evil anti-pattern feature detection

For the record: I did not make the choice to change User Agent string, but it makes good sense to change the User Agent string when changing the product.

d3vid added a comment.Jan 23 2018, 07:04

Just to confirm this specific issue is resolved in PureBrowser 52.5.0. Thanks!

d3vid added a comment.Mar 7 2018, 01:07

(solution was to set general.useragent.compatMode.firefox to True)

jonas.smedegaard renamed this task from Cannot use Jitsi Meet with PureBrowser to PureBrowser incompatible with user-agent sniffing at meet.jit.si.Aug 24 2019, 01:41