brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.16k stars 2.23k forks source link

Remove Hangouts component #39660

Closed ShivanKaul closed 2 weeks ago

ShivanKaul commented 2 weeks ago

(edited to add the Background section)

Test plan

See https://github.com/brave/brave-core/pull/24594

Platforms

Linux, macOS, Windows

Description

We previously added the Hangouts extension to allow screen sharing: https://github.com/brave/brave-browser/pull/1983. The setting is toggleable via the Hangouts setting in brave://settings/extensions.

The Hangouts extension uses private Chrome Web APIs: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/resources/hangout_services/manifest_v3.json;l=24-30. We need to investigate if we still need this extension/component. Screen sharing does not seem dependent on this extension any more: disabling the Hangouts setting does not affect screen sharing on Google Meet but does prevent debugging information showing up (which is fine).

Note that we disable log uploading done by this (and other) private WebRTC APIs: https://github.com/brave/brave-browser/issues/1993

Background

In 2019, Brave enabled the Hangouts Services extension to allow users to use Google Hangouts and Google Meet in the Brave browser. This extension fixed some broken Hangouts/Meet functionality in Brave (specifically, screen sharing would not work on Google Hangouts/Meet without the extension). At the time, Chromium was cautious about giving all websites access to the standards-compliant screen sharing API because of security concerns, which is presumably why Google special-cased this ability for Google’s websites only.

Having Google Meet/Hangouts work in Chrome but not Brave was a serious Web compatibility problem. Before enabling this extension by default, Brave made sure that we added a way for users to disable the Hangouts extension in brave://settings/extensions. We also proactively blocked automatic uploading of debugging information to Google’s servers, the same way we frequently modify Chromium to fix leaks and boost user privacy. However, we see now why this would have raised concerns among some users. In hindsight, a better approach would have been one similar to what we did with the Widevine extension: keep the extension off-by-default, and ask the user if they want to enable it on their first visit to a website with functionality that would be helped by the extension.

Over the years, we received clear reports from users that Google Meet did not work properly without the Hangouts Services extension, which is why we kept it on by default (though we should have revisited this sooner.) With the widespread adoption of screen sharing Web APIs, it’s clear the extension is no longer needed. Google deprecated Hangouts, and Google Meet works fine for Brave users without the extension. We have now changed our settings panel to leave the Hangouts Services extension off by default, and are removing the extension completely with the work in this issue.

bsclifton commented 2 weeks ago

Hangouts of course has been EOL'ed but Google Meet working great with a few tests I've done with the extension disabled.

ShivanKaul commented 2 weeks ago

I went through the extension's permissions:

  1. desktopCapture: this doesn't seem necessary since the page can just use Screen Capture API
  2. enterprise.hardwarePlatform: this seems purely for logging purposes. We already disable uploading of logging information
  3. processes: logging related too, "continuously reporting relevant CPU usage information to the page."
  4. system.cpu: logging
  5. webrtcAudioPrivate: AFAICT not even being used by the extension
  6. webrtcDesktopCapturePrivate: Hmm, this might be used to allow screen sharing via a WebView. @bsclifton Does this option exist on Android? If yes, if you open a Google Meet link in a WebView (maybe if you click on the link in Messenger or WhatsApp?) are you able to share screen?
  7. webrtcLoggingPrivate: logging
bsclifton commented 2 weeks ago

@ShivanKaul I can check that tomorrow (RE: webrtcDesktopCapturePrivate on Android)

Should we make a separate issue to track disabling component first? This issue can track removing it entirely. I created https://github.com/brave/brave-core/pull/24583 and added some tests that I manually ran through. Let me know what you think!

ShivanKaul commented 2 weeks ago

Yeah, that makes sense, like we discussed we don't need to block on disabling this in Nightly.

ShivanKaul commented 2 weeks ago

I created https://github.com/brave/brave-browser/issues/39664 and edited the PR description for https://github.com/brave/brave-core/pull/24583 to fix that instead.

stephendonner commented 1 week ago

Verification PASSED using

Brave | 1.69.106 Chromium: 127.0.6533.43 (Official Build) nightly (x86_64)
-- | --
Revision | 2778b12a30fa8f4d7ccd6caad101a7aabcfc6981
OS | macOS Version 11.7.10 (Build 20G1427)

Case 1: Upgrade, default - PASSED

1. installed `1.67.123` 2. launched Brave (`release`) 3. opened `brave://settings/extensions` 4. confirmed `Hangouts` is toggled `On`/`Enabled` 5. upgraded to `1.69.106` by renaming `Brave-Browser` profile to `Brave-Browser-Nightly` 6. installed launched Brave `1.69.106` (`nightly`) 7. opened `brave://settings/extensions` ### Confirmed `Hangouts` is removed from `brave://settings/extension` `1.67.123` | `1.69.106` -----------|---------- Screen Shot 2024-07-15 at 11 52 20 AM | Screen Shot 2024-07-15 at 11 56 00 AM

Case 2: Upgrade, user-modified setting - PASSED

1. installed and launched `1.67.123` (`release`) 2. opened `brave://settings/extensions` 3. toggled `Hangouts` from its default of `Enabled` to `Disabled`, and then finally toggled back to `Enabled`/`On` 4. installed `1.69.98` 5. launched Brave (`nightly`) 6. opened `brave://settings/extensions` 7. looked at the value for the `Hangouts` preference 8. loaded `google.com` 9. opened the `Developer Tools`' `Console` 10. pasted in the following: ``` chrome.runtime.sendMessage( "nkeimhogjdpnpccoofpliimaahmaaome", { method: "cpu.getInfo" }, (response) => { console.log(JSON.stringify(response, null, 2)); }, ); ``` 11. loaded `brave://extensions-internals` 12. searched for the `nkeimhogjdpnpccoofpliimaahmaaome` extension ### Confirmed `Hangouts` - both its UI and its extensions -- was still removed `1.67.123` | `1.69.106` | `brave://extensions-internals` | `Google.com` -----------|----------|------------------------------|---------------- Screen Shot 2024-07-15 at 11 52 20 AM | Screen Shot 2024-07-15 at 12 14 22 PM | Screen Shot 2024-07-15 at 12 21 15 PM | Screen Shot 2024-07-15 at 12 21 45 PM

Case 3: New profile - PASSED

### Steps: 1. installed `1.69.106` 2. launched Brave 3. loaded `brave://settings/extensions` 4. confirmed no `Hangouts` UI 5. loaded `brave://extensions-internals/` 6. searched for the `nkeimhogjdpnpccoofpliimaahmaaome` extension ### Confirmed no UI nor Hangouts extensions shown `brave://extensions-internals` | `brave://settings/extensions` ----------------------------|---------------------------- Screen Shot 2024-07-15 at 12 34 50 PM | Screen Shot 2024-07-15 at 12 35 06 PM
ShivanKaul commented 1 week ago

Just some background here:

In 2019, Brave enabled the Hangouts Services extension to allow users to use Google Hangouts and Google Meet in the Brave browser. This extension fixed some broken Hangouts/Meet functionality in Brave (specifically, screen sharing would not work on Google Hangouts/Meet without the extension). At the time, Chromium was cautious about giving all websites access to the standards-compliant screen sharing API because of security concerns, which is presumably why Google special-cased this ability for Google’s websites only.

Having Google Meet/Hangouts work in Chrome but not Brave was a serious Web compatibility problem. Before enabling this extension by default, Brave made sure that we added a way for users to disable the Hangouts extension in brave://settings/extensions. We also proactively blocked automatic uploading of debugging information to Google’s servers, the same way we frequently modify Chromium to fix leaks and boost user privacy. However, we see now why this would have raised concerns among some users. In hindsight, a better approach would have been one similar to what we did with the Widevine extension: keep the extension off-by-default, and ask the user if they want to enable it on their first visit to a website with functionality that would be helped by the extension.

Over the years, we received clear reports from users that Google Meet did not work properly without the Hangouts Services extension, which is why we kept it on by default (though we should have revisited this sooner.) With the widespread adoption of screen sharing Web APIs, it’s clear the extension is no longer needed. Google deprecated Hangouts, and Google Meet works fine for Brave users without the extension. We have now changed our settings panel to leave the Hangouts Services extension off by default, and are removing the extension completely with the work in this issue.

MadhaviSeelam commented 5 days ago

Adding QA/Test-All-Platforms as per the issue description

MadhaviSeelam commented 4 days ago

Verification `PASSED using

Brave | 1.69.122 Chromium: 127.0.6533.57 (Official Build) beta (64-bit)
-- | --
Revision | bd77e9b76a8e67ff2bf9f62f1df7d60378ca811f
OS | Windows 11 Version 23H2 (Build 22631.3880)

Note: Hangout is enabled by default 1.67.123 in, however, in 1.67.134 & 1.68.127 it's disabled by default

1.67.123 | 1.67.134 | 1.68.127 ------ | ----- | ----- ![image](https://github.com/user-attachments/assets/a316c108-9010-4171-9545-07a5bb3035c2)|![image](https://github.com/user-attachments/assets/150e222a-f589-429c-81db-fb65123b8dd8)|![image](https://github.com/user-attachments/assets/f8ad5e36-89ad-4d8d-a695-c82e466285dd) ![image](https://github.com/user-attachments/assets/7f02f03d-5d33-4c91-91d6-b896c3b58c06)|![image](https://github.com/user-attachments/assets/bbe2dae2-ec0e-4543-8a54-51ffd5cbc625)|![image](https://github.com/user-attachments/assets/e130ec74-b615-4ea4-af97-8e96defa965a)

Case 1: Upgrade, default - PASSED

1. installed `1.68.127` 2. launched Brave 3. opened `brave://settings/extensions` 4. confirmed `Hangouts` is toggled `Off`/`disabled` 5. upgraded to `1.69.122` by renaming `Brave-Browser` profile to `Brave-Browser-Beta` 6. installed launched Brave `1.69.122` (`Beta`) 7. opened `brave://settings/extensions` ### Confirmed `Hangouts` is removed from `brave://settings/extension` step 4 | step 7 ----- | ------ ![image](https://github.com/user-attachments/assets/00411f8b-16ac-4fe5-b898-a4a75706a39d)|![image](https://github.com/user-attachments/assets/c1d9b892-4620-4583-a906-433b9dae72d1)

Case 2: Upgrade, user-modified setting - PASSED

1. installed and launched `1.67.123` (`release`) 2. opened `brave://settings/extensions` 3. toggled `Hangouts` from its default of `disabled` to `enabled` 4. installed `1.69.122 ` 5. launched Brave (`Beta`) 6. opened `brave://settings/extensions` 7. verified `Hangouts` entry is no longer shown 8. opened brave://extensions-internals/ 9. confirmed `nkeimhogjdpnpccoofpliimaahmaaome` is no longer there 10. loaded `google.com` 11. opened the `Developer Tools`' `Console` 12. pasted in the following and hit Enter: ``` chrome.runtime.sendMessage( "nkeimhogjdpnpccoofpliimaahmaaome", { method: "cpu.getInfo" }, (response) => { console.log(JSON.stringify(response, null, 2)); }, ); ``` 13. confirmed an error shown in console and no information shown. step 3a | step 3b | step 7 | step 9 | step 13 ----- | ----- | ----- | ------ | ------- ![image](https://github.com/user-attachments/assets/6672d2c5-4877-4948-b633-44415cbfd9fe)|![image](https://github.com/user-attachments/assets/2a271b1e-d6e4-4ccf-bdb6-66fbcbba5d77)|![image](https://github.com/user-attachments/assets/56c674c1-a57c-4186-ab84-ea2ca1b920fb)|![image](https://github.com/user-attachments/assets/5de912fe-d214-4541-82fd-a02097c3445d)|![image](https://github.com/user-attachments/assets/313b4f97-45f8-4b94-b256-47d442f9cd62)

Case 3: New profile - PASSED

### Steps: 1. installed `1.69.122` 2. launched Brave 3. loaded `brave://settings/extensions` 4. confirmed no `Hangouts` UI 5. loaded `brave://extensions-internals/` 6. searched for the `nkeimhogjdpnpccoofpliimaahmaaome` extension #### Confirmed no UI nor Hangouts extensions shown step 3 | step 5 ----- | ------ ![image](https://github.com/user-attachments/assets/619e707f-164b-48be-8957-1f73c8760535)|![image](https://github.com/user-attachments/assets/f3edb2ba-4594-46bf-b12e-dc72e09c0645)
Martin-K24 commented 3 days ago

I see that the latest merge disabled it by default and this issue has been closed.

Anyway my question is about a group policy I had set regarding the Google Hangouts extension.\ My goal is to never allow the extension from being enabled and loaded. Also to block it in case it was to ever be added back to Brave (highly doubtful). Will my policy conflict with the latest merge of disabling it?

{
    "WebRtcEventLogCollectionAllowed": false,
    "WebRtcTextLogCollectionAllowed": false,
    "ExtensionInstallBlocklist": [
      "nkeimhogjdpnpccoofpliimaahmaaome"
  ]
}
Martin-K24 commented 23 hours ago

Upon further testing there is no way to lock the slider in brave://settings/extensions with a group policy rule. And the one I tried above ^ does nothing.

Also many group policies are broken and dont carry over in Brave dsepite them being valid in brave://policy/

For example these two do not work on Brave:

{
    "EnableMediaRouter": false,
    "ClearBrowsingDataOnExitList": [
      "browsing_history",
      "download_history",
      "cookies_and_other_site_data",
      "cached_images_and_files",
      "password_signin",
      "autofill",
      "site_settings",
      "hosted_app_data"
  ]
}