News for hackers. Stuff that matters.
Re:Firefox 95 Released by jiripospisil on Tuesday December 07, 2021 @05:46PM (#29479208)
> We’ve added a User Agent override for Slack.com, which allows Firefox users to use more Call features and have access to Huddles.

So now `window.navigator.vendor` returns "Google Inc." if your URL matches `://app.slack.com/`. LOL.

https://github.com/mozilla/gecko-dev/blob/eea0fac2cb8cae1e5a...

Re:Firefox 95 Released by perihelions on Tuesday December 07, 2021 @06:20PM (#29479433)
There's a list of UA overrides and other hardcoded website patches in about:compat.
Re:Firefox 95 Released by nonameiguess on Tuesday December 07, 2021 @06:45PM (#29479649)
The things you learn. The damn CDC Covid tracker won't open in Firefox. It feels like not following open standards for cross compatibility is a dereliction of duty for government agencies, let alone the official tracking app during a pandemic.
Re:Firefox 95 Released by Osiris on Tuesday December 07, 2021 @06:40PM (#29479606)
Opera 12, with the Presto engine, had this same problem. It had a huge list of overrides (JavaScript and CSS) to fix problems with popular websites.

This is inevitable when a browser has limited market share.

Re:Firefox 95 Released by NelsonMinar on Tuesday December 07, 2021 @06:40PM (#29479600)
Wow, what a collection of hacks. It reminds me of the efforts Microsoft goes to so that old programs keep working on Windows.
Re:Firefox 95 Released by TimTheTinker on Tuesday December 07, 2021 @06:46PM (#29479665)
I think in both cases it was less hack and more getting around browser sniffing code that makes outdated or incorrect assumptions.

Please don't browser-sniff, use feature detection instead. The web platform is standards-driven, not browser-driven -- let's keep it that way :)

Re:Firefox 95 Released by NelsonMinar on Tuesday December 07, 2021 @08:54PM (#29480477)
I'm sympathetic to the need to do this, just admiring the kludges. It's not just user agent spoofing; some of the compatibility hacks seem to be modifying CSS of websites.
Re:Firefox 95 Released by solarkraft on Tuesday December 07, 2021 @06:23PM (#29479463)
Kind of interesting that they don't even mention talking to Slack about just removing the check ...

https://bugzilla.mozilla.org/show_bug.cgi?id=1727100

Re:Firefox 95 Released by usrlocal1023 on Tuesday December 07, 2021 @06:40PM (#29479609)
They tried but Slack weren't interested. Update from 2 years ago

To summarize my current understanding: Slack's video conferencing service only support Chrome's non-standard Plan B format for WebRTC calls. And our attempts to talk to Slack about changing that were kindly rejected (we met with them shortly after they had launched the calling feature). And my repeated questions in public events about adding Firefox support were also turned down.

Source: https://bugzilla.mozilla.org/show_bug.cgi?id=1626121#c4

Further clarification from last year https://bugzilla.mozilla.org/show_bug.cgi?id=1626121#c10

I have seen people mention that they have tried few more times to contact them, but Slack weren't interested.

My understanding as to why it works now, correct me if I am wrong, is because of Slack moving to using AWS Chime SDK for calls which has Firefox support and just faking the UA to Chrome tricks Slack into loads the necessary SDK/JS for calls and Chime SDK takes care of the rest.

Re:Firefox 95 Released by shmerl on Tuesday December 07, 2021 @06:42PM (#29479619)
Such kind of attitude from Slack is disgusting.
Re:Firefox 95 Released by splatzone on Tuesday December 07, 2021 @06:51PM (#29479704)
I'm very confused - if it's working on Firefox with the Chime SDK, what good reason is there for Slack to block the feature on Firefox?

Is there some political reason for them to disadvantage Firefox that I'm not aware of?

Re:Firefox 95 Released by usrlocal1023 on Tuesday December 07, 2021 @07:12PM (#29479887)
When Slack launched video calls, it was using Chrome's own implementation of WebRTC which is called Plan B. So it worked in both their app which is electron based and Chrome. Not sure if it worked with chromium derivatives like Brave, Vivaldi, etc.

Firefox rolled out the standard based WebRTC implementation and chrome eventually did as well, but companies like Slack and various others didn't migrate instead just threw an error message saying calling isn't supported in Firefox and instead use their app or chrome.

Since Slack's partnership with AWS about 2 years ago, they migrated from their own call infrastructure to using AWS's Chime. Chime SDK has support for all major browsers https://docs.aws.amazon.com/chime/latest/dg/meetings-sdk.htm...

But their browser check still remains today and Mozilla started to spoof the user agent as a workaround so that Firefox users can make calls as Slack aren't willing to remove the check or properly add support.

Chrome is planning to remove WebRTC plan B soon, so this should force companies to use the unified WebRTC implementation and hopefully means Firefox support. https://groups.google.com/a/chromium.org/g/blink-dev/c/IY2am...

Re:Firefox 95 Released by splatzone on Tuesday December 07, 2021 @08:59PM (#29480504)
Thank you
Re:Firefox 95 Released by thayne on Tuesday December 07, 2021 @06:51PM (#29479710)
Sadly, this behavior is somewhat common for many sites that block firefox based on the user agent. At least form some webcompat bug issues I've looked at.
Re:Firefox 95 Released by shmerl on Tuesday December 07, 2021 @06:19PM (#29479425)
Slack is very nasty in how they refused to support proper WebRTC.
Re:Firefox 95 Released by Nextgrid on Tuesday December 07, 2021 @06:08PM (#29479335)
I wonder why they bother with user-agents in the first place. It's more of a fingerprinting vector than anything else, especially considering Firefox's browser marketshare.

Just hardcode it to Chrome's once and for all.

Re:Firefox 95 Released by streptomycin on Tuesday December 07, 2021 @06:11PM (#29479356)
Sometimes browsers have bugs that cannot be identified with feature detection, in which case the user agent is all we have to know when to work around those bugs.
Re:Firefox 95 Released by foxrider on Tuesday December 07, 2021 @06:43PM (#29479633)
I feel like with the modern rate of browser development by the time you have identified and fixed the bug the fix may no longer be relevant
Re:Firefox 95 Released by tomxor on Tuesday December 07, 2021 @06:53PM (#29479735)
This^

I like Firefox, but it's the only browser to blindly follow the questionable and backwards incompatible parts of the SVG-2 spec... I challenge anyone to identify that SVG-2 <use> is implemented instead of SVG-1 <use> without parsing the useragent string.

The former is backwards incompatible (implemented in Firefox) and will render some nice black shapes if you've previously relied upon target context CSS rules for inheritance that have been supported by SVG-1 for the last decade. AFAIK you can only see this in the output since the inside of the <use> element is a shadow DOM inaccessible to JavaScript, so you cannot determine computed styles. For this reason I wrote an "unpolyfill" [0] that implements some of SVG-1 <use> elements with mutation-observers in JS, albeit in a not 100% correct way. Even so, it still needs to be explicitly enabled, depending one something else to parse the useragent string.

We enjoy far more consistency than a decade ago, but browsers are incredibly complex, and there will no doubt continue to be obscure differences that are difficult or impossible to detect programmatically. Rendering differences most of all.

[0] https://github.com/ThomasBrierley/svg2use-unpolyfill

Re:Firefox 95 Released by RF_Savage on Tuesday December 07, 2021 @06:23PM (#29479470)
Heh, user-agents have been like that since the start. Almost all modern browsers start their user-agent with "Mozilla/", so we are back to the beginning in that regard. And naturally it is for the same reasons too!
Re:Firefox 95 Released by jonathankoren on Tuesday December 07, 2021 @06:30PM (#29479528)
The big wheel of `User-Agent: Mozilla` has finally turned.
Re:Firefox 95 Released by smnrchrds on Tuesday December 07, 2021 @06:35PM (#29479569)
Quirks Mode 2.0
Re:Firefox 95 Released by kingcharles on Tuesday December 07, 2021 @06:10PM (#29479348)
You can't make this shit up O_O
Re:Firefox 95 Released by stavros on Tuesday December 07, 2021 @06:13PM (#29479374)
What's so unbelievable about faking something to get an app that works perfectly fine on your browser to stop refusing to work on your browser?
Re:Firefox 95 Released by prohobo on Tuesday December 07, 2021 @06:23PM (#29479458)
I think he's talking about the fact that they had to do that at all.
Re:Firefox 95 Released by stavros on Tuesday December 07, 2021 @06:34PM (#29479564)
In that case, what's unbelievable about a developer phoning feature detection in and just using the user-agent string? :P
Re:Firefox 95 Released by sp332 on Tuesday December 07, 2021 @06:50PM (#29479694)
Is it possible to detect the format of the webrtc video? That sounds difficult anyway.
Re:Firefox 95 Released by werdnapk on Tuesday December 07, 2021 @06:32PM (#29479539)
Blame slack.
Re:Firefox 95 Released by kingcharles on Tuesday December 07, 2021 @06:27PM (#29479505)
This.