Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1745313 - Remove Slack User Agent override. #255

Merged
merged 1 commit into from
Dec 10, 2021
Merged

Conversation

denschub
Copy link
Member

Base is release-hotfix, not main, because that is the first target. Patchlevel version bump, this is planned to be shipped as a System Addon Update.

r? @wisniewskit

@denschub denschub merged commit 8e2cdbd into release-hotfix Dec 10, 2021
@JulienRobitaille
Copy link

Hi, I am leaving this here for others that are wondering why slack calls and huddle stopped working again yesterday.
https://bugzilla.mozilla.org/show_bug.cgi?id=1727100

I hope that they publish the update soon.

@denschub
Copy link
Member Author

denschub commented Dec 14, 2021

@JulienRobitaille are you on Linux by any chance? Huddles should work just fine on Windows and macOS. Either way, there is still a lot to do, and everyone is interested and actively working on fixing those things. :)

@denschub denschub deleted the bug1745313 branch December 14, 2021 16:24
@JulienRobitaille
Copy link

Yes, I am. However, the user agent change, that you guys pushed a few days ago, was working perfectly on Linux. I guess I'll have to change the user agent myself, as I was doing before. I am glad that they are trying to fix things up.

@denschub
Copy link
Member Author

We did notice several weird edge-cases with the spoofed UA, so the current state is preferred. You can obviously do whatever you want, and spoof your own UA if that is better for you, but it didn't make sense for us to keep it around for all Firefox users. :) Thanks for getting back to me, though!

@PureTryOut
Copy link

Sorry for bumping such an old thread, but Slack Huddles are still broken on Firefox on Linux, almost 2 years later! I'm sure everyone could just add an user-agent override locally but it should really work out of the box, not everyone has the technical knowledge needed for manual user-agent overrides.

Can this user-agent override be re-added, but for Linux only maybe? Preferably Slack just enables huddles on Linux of course, not sure why they don't, but at least re-instating the previous workaround would improve things already. Sure some weird edge-cases might re-appear but I'd argue that huddles not working is a more severe problem, it's literally the only reason I still have the desktop client installed.

@ghomem
Copy link

ghomem commented Jan 15, 2024

Still broken on Firefox 117 on Ubuntu. What is the simplest way to enable Slack Huddles?

@puresick
Copy link

This is ultimately an issue of Amazons Chime SDK which is being used by Slack.
I had opened an issue over there some time ago – leaving it here as a reference: aws/amazon-chime-sdk-js#2044

@ghomem
Copy link

ghomem commented Jan 16, 2024

thanks a lof for the information @puresick . Is there a workaround for Firefox users on Linux?

@denschub

@puresick
Copy link

puresick commented Jan 17, 2024

You're welcome!

As mentioned above the workaround for now is to spoof the user agent ourselves.

There is a "Firefox recommended" add on which you can use for this: https://addons.mozilla.org/en-GB/firefox/addon/user-agent-string-switcher/.

@ghomem
Copy link

ghomem commented Jan 17, 2024

I usually avoid installing extensions, for security reasons, but I see that the native way of doing this was removed :(

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

If that extension is trustworthy I can give it a try.

@puresick
Copy link

I cannot guarantee you that, but you could look into the source code if you know your way around HTML, CSS and JavaScript: https://github.com/ray-lothian/UserAgent-Switcher/

In general, Add-Ons with the "Recommendation" tag are, AFAIK, reviewed by the Firefox team to meet their performance and security standards.

@ghomem
Copy link

ghomem commented Jan 17, 2024

I tried it and it works, as in it makes the Huddle widget appear. I used whitelist mode and added only slack.com the whitelist.

But it has a terribly counterintuitive UX, way worse than the simple definition of a per site pref that has been removed by Mozilla (see previous comment). I had to use the logs of my own webserver to make sure that I was configuring it right.

I still don't understand why this has been removed from about:compat since it could be turned on/off easily there. They could even ship it as off by default.

I really want to use Firefox but even Mozilla is making it difficult.

I will report later on whether the actual calls work.

Big thanks you you @puresick .

@ghomem
Copy link

ghomem commented Jan 17, 2024

Tried this on a 1-1- call and:

  • sound + remote camera worked
  • my sound worked but my camera did not (after several permissions where I authorized Firefox to use it)
  • I could not share my screen (the button did not do anything)

@denschub
Copy link
Member Author

denschub commented Jan 17, 2024

I still don't understand why this has been removed from about:compat

I already answered this in 2021: our QA testers noted several edge-cases with random things not working - just like you discovered in your testing. We're only ever shipping interventions if we're actually confident it works, because otherwise, users run into random edge-cases that make look like Firefox is at fault here, when it's not the case. It also increases the likelihood of Slack receiving support tickets for things they can't support, and it increases the chance of us receiving bug reports for things we can't support.

They could even ship it as off by default.

Ignoring the fact that we actually can't ship an intervention "off by default", it wouldn't even address the concerns. No average user will think "huh this is somewhat broken, let me go to about:compat and check if there's something I can disable". That interface isn't even meant for end users anyway, it's only there for our QA people to verify things are still broken without interventions.

I really want to use Firefox but even Mozilla is making it difficult.

See, there's a huge difference between us. You want your stuff to work, and that's reasonable. But when I make a decision, I have to ensure that it works for the majority of users, and doesn't make things worse for the average end user, because my decisions go a bit further than just my use-case.

We can't ship an intervention unless we know that the intervention actually works without introducing different bugs. No matter how many comments y'all write here, this isn't going to change. Your efforts are much less wasted if you complain to Slack and Amazon instead.

As I said earlier, if you want to spoof your own UA string, then do so. You're more than welcome to do it yourself, because if you do, then you are responsible for any negative side-effects, not us.

Also, please note that this is a GitHub repo where people work - it is not a discussion forum. Please stop treating it as one.

@ghomem
Copy link

ghomem commented Jan 17, 2024

Thank you for the clarifications @denschub . I apologize for my accumulated frustration on this issue. I already "complained" to Amazon and Slack, of course. The problem is a combination of things. This

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

combined with the bad usability of the extension. Of course at the root of all this is Slack, but I will not use this space to expand on that.

Thank you again.

@denschub
Copy link
Member Author

Here's a suggestion: building a Web Extension isn't that hard for anyone with a bit of basic web development knowledge. There's an API to change request headers that allows you to change the User-Agent header for Slack specifically. You might also need to change some of the navigator properties, but that can be done with a content script, and this PR should give a good inspiration (everything in this repo is licensed under the MPL). You can also take a bit of inspiration from the "Google Search Fixer" addon for Firefox for Android (source is here).

Go ahead and build a Web Extension that spoofs as Chrome on Firefox Linux for Slack only. Upload it to addons.mozilla.org, and link it here. That way, nobody has to deal with bad UX in UA spoof extensions, and instead they can just install an addon if they want. But also, that way, we're not getting the one receiving bug reports if things go wrong.

@ghomem
Copy link

ghomem commented Jan 17, 2024

That's not a bad idea, but having a per-domain pref is a much better idea. That's because the distribution of extensions is very different from the distribution of the base browser. For instance, I acquire Firefox via Canonical which I accept as a trusted supplier. Adding extensions means adding something else to the suppliers list. It is very different from a security perspective. The difference is the same that makes me resistant to install the Slack application directly and pushes me to use the browser instead.

(This is not the place to develop risk management conversations but I assume you understand what I mean)

From what I could see in:

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

the option to set a per-domain preference was removed because

Screenshot_20240117_220409

But this seems to be a misunderstanding because the per-domain preference was generic whereas the webcompat addon includes only a whitelist of interventions that are known to work.

So, a generic preference where the user could take the risk to make a change was removed in favor of a restricted whitelist where the user has no control.

The impacts of changing a generic preference on Firefox are something that the user is accountable for just as the impacts of installing a specific extension - bug reports from generated by such actions "if things go wrong" are equally unfair. But the effort and the security risk associated to changing a generic pref are much lower.

In short: it would be nice if Firefox brought back the per-domain UA override feature which had better usability and no security risks, as far as I understand.

@denschub
Copy link
Member Author

a generic preference where the user could take the risk to make a change was removed

Absolutely nothing on about:config is designed for the user to fiddle with.

UserAgentOverrides.jsm, even if it were still here, would not help you in this case. You also need to change navigator.userAgent, which the old impl did not do. You'd also need to change another navigator property, as did happen in this PR - again, something that the old system never could do. For a UA override to work in cases like Slack, you need a bit more powerful APIs, which is why we replaced UserAgentOverrides.jsm with this very system addon you're commenting in. We also replaced it because the old method was slow and buggy, but I'm sure you have figured it out given you just screenshotted one of the bugs in question. There is no point in maintaining two system features that can do the same from our point of view (which, again, is what all of those methods are designed for - they're explicilty not designed for users to fiddle with).

I also explained how you can do that yourself, without having to trust anyone except yourself - because all the relevant APIs are available to anyone. If you don't want to do that, that's fine - but that's not my fault, and I'm not going to suggest to my team that we have to maintain known-problematic UA overrides - and I'm also not going to suggest to the Networking module engineers that we have to add a second mechanism to change UA strings. Firefox engineers don't need another mechanism, and you don't need one either, as that's what we have an entire team maintaining extension APIs for. We put those things into the browser so people like you can use them if you want to do more/different things than we do.

Everyone is invited to use the existing WebExtension APIs to mimic what we're doing here. You might make Slack work fine for you, you might break it horribly, but either way, you did it to yourself. This discussion is on a PR from 2021. The PR has been merged, and there won't be a revert of this removal. This is the end of the discussion in this PR.

@mozilla-extensions mozilla-extensions locked as resolved and limited conversation to collaborators Jan 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants