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

Enabling Brave Shields breaks “Sync with system” theme setting on multiple websites. #21220

Closed
Adrian-Samoticha opened this issue Feb 21, 2022 · 7 comments
Labels
closed/wontfix OS/Desktop priority/P5 Not scheduled. Don't anticipate work on this any time soon. webcompat/shields Shields is breaking a website.

Comments

@Adrian-Samoticha
Copy link

Description

When Brave Shields are enabled, websites that offer a “Sync with system” theme setting such that dark mode is automatically enabled if and only if it is enabled on the OS the browser is running on (such as GitHub and YouTube) default to a light theme even when the OS is currently set to dark mode.

Interestingly, YouTube seems to switch to dark mode for a fraction of a second before returning to light mode when dark mode is enabled at an OS level.

I'm aware that blocking websites from accessing OS-related information may help against certain trackers however I believe that if this is intentional, it should be present as an option in the brave-shields panel. Currently, the issue persists despite Brave showing 0 blocked items (on GitHub), which is why I believe this to be a bug.

Steps to Reproduce

  1. Open the GitHub website
  2. Navigate to the “Appearance” panel in the Settings menu and set the theme to “Sync with system”
  3. Enable Brave shields

Actual result:

image

Expected result:

image

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Brave 1.35.103 Chromium: 98.0.4758.102 (Official Build) (arm64)
Revision 273bf7ac8c909cde36982d27f66f3c70846a3718-refs/branch-heads/4758@{#1151}
OS macOS Version 12.0.1 (Build 21A559)
JavaScript V8 9.8.177.11
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36
Command Line /Applications/Brave Browser.app/Contents/MacOS/Brave Browser --disable-client-side-phishing-detection --disable-domain-reliability --enable-dom-distiller --no-pings --component-updater=url-source=https://go-updater.brave.com/extensions --origin-trial-public-key=bYUKPJoPnCxeNvu72j4EmPuK7tr1PAC7SHh8ld9Mw3E=,fMS4mpO6buLQ/QMd+zJmxzty/VQ6B1EUZqoCU04zoRU= --sync-url=https://sync-v2.brave.com/v2 --lso-url=https://no-thanks.invalid --variations-server-url=https://variations.brave.com/seed --variations-insecure-server-url=https://variations.brave.com/seed --flag-switches-begin --flag-switches-end
Executable Path /Applications/Brave Browser.app/Contents/MacOS/Brave Browser
Profile Path /Users/adriansamoticha/Library/Application Support/BraveSoftware/Brave-Browser/Default
Linker lld
Variations AdRewardsStudy:NextPaymentDayAdServingStudy:MaximumAdNotificationsPerDay=100/MaximumInlineContentAdsPerHour=8/MaximumInlineContentAdsPerDay=40BraveAds.FrequencyCappingStudy:ExcludeAdIfWithinTimeWindow=0hBraveAds.UserActivityStudy:Triggers=EMPTY/Threshold=0.0/IdleTimeThreshold=5BraveDebounceStudy:EnabledConversionsStudy:NewDefaultPatternDefault1pBlockingStudy:DisabledEphemeralStorageStudy:EnabledForceDisableBlinkFeatures:EnabledMacCoreLocationBackendStudy:EnabledNativeCosmeticFilteringStudy:EnabledNavigationThreadingOptimizationsCompat:DisabledPartitionBlinkMemoryCacheStudy:EnabledPartitionConnectionsByNetworkIsolationKeyStudy:EnabledPermissionLifetimeReleaseStudy:EnabledRequestAdsEnabledApiStudy:EnabledSpeedreaderReleaseStudy:Enabled

Version/Channel Information:

  • Can you reproduce this issue with the current release? Yes.
  • Can you reproduce this issue with the beta channel? n/a
  • Can you reproduce this issue with the nightly channel? n/a

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? Obviously, yes.
  • Does the issue resolve itself when disabling Brave Rewards? No.
  • Is the issue reproducible on the latest version of Chrome? n/a

Miscellaneous Information:

n/a

@rebron rebron added webcompat/shields Shields is breaking a website. priority/P5 Not scheduled. Don't anticipate work on this any time soon. labels Feb 25, 2022
@rebron
Copy link
Collaborator

rebron commented Feb 25, 2022

@Adrian-Samoticha I'm not able to reproduce this. Can you make sure brave://settings/appearance Brave Colors is set to Same as macOS and github is set properly, e.g. Day Theme is dark. With the github example, when I switch light and dark them from system settings, everything goes light or dark them the browser and the content.

@ryanbr
Copy link

ryanbr commented Feb 25, 2022

Which shields settings exactly is causing it? is there any extensions being used also? @Adrian-Samoticha

@rebron
Copy link
Collaborator

rebron commented Feb 25, 2022

@Adrian-Samoticha Do you have an extension possibly in conflict here. You can see below, looks like it's working properly.

Screen.Recording.2022-02-25.at.1.39.52.PM.mov

@Adrian-Samoticha
Copy link
Author

I have done further research and came to the conclusion that this issue is caused by the fingerprinting setting being set to “strict, may break sites”. Setting it to “standard” appears to fix the issue.

This intuitively makes sense, since the OS dark mode setting can indeed be used for tracking purposes, though what's suspicious is the fact that there's a zero being displayed next to the fingerprinting setting, which implies that no fingerprinting-related items have been blocked for this particular site, even though the setting very much had a visible effect on the way the site works:

image

What does the zero actually mean? Is it really supposed to represent the number of blocked fingerprinting-related items or does it mean something else entirely?

@nastavoi
Copy link

nastavoi commented Feb 27, 2022

Try to set this flag to disabled. Github, google etc. should then detect system theme just fine when strict fingerprinting is enabled.
#brave-dark-mode-block

It was added sometime ago in brave/brave-core#9735

@Adrian-Samoticha
Copy link
Author

Try to set this flag to disabled. Github, google etc. should then detect system theme just fine when strict fingerprinting is enabled. #brave-dark-mode-block

It was added sometime ago in brave/brave-core#9735

Thanks, this actually did the trick.

@ShivanKaul
Copy link
Collaborator

What does the zero actually mean? Is it really supposed to represent the number of blocked fingerprinting-related items or does it mean something else entirely?

It represents the number of times Shields blocked something (tracker, ad, etc) on the page that was on a filter list such as EasyList or EasyPrivacy.

As @nastavoi said, #brave-dark-mode-block flag can be used when you want to use Strict mode but still want the website to be able to detect your Dark/Light mode setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed/wontfix OS/Desktop priority/P5 Not scheduled. Don't anticipate work on this any time soon. webcompat/shields Shields is breaking a website.
Projects
None yet
Development

No branches or pull requests

5 participants