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

Custom notifications are shown when native(system) notifications are enabled #18342

Closed
btlechowski opened this issue Sep 24, 2021 · 5 comments
Closed

Comments

@btlechowski
Copy link

native(system) notifications must be used when native(system) notifications are enabled and
For Windows 10 build 17134 and newer (should not be shown if Focus Assist is enabled)
For macOS 10.14 and newer if native notifications are enabled
For Android 8 and newer

More info brave/brave-variations#120

Steps to Reproduce

  1. Enable native(system) notifications
  2. Run Brave with --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true --variations-server-url=https://variations.bravesoftware.com/seed
  3. Restart Brave
  4. Make sure variations are downloaded in brave://version
  5. Enable rewards and ads
  6. Trigger an ad

Actual result:

Custom notification is shown

Expected result:

native(system) notifications is shown

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Brave 1.30.84 Chromium: 94.0.4606.54 (Official Build) (64-bit)
Revision c8191a1d5cccbf64e8fe7269043f8ace8d74dd05-refs/branch-heads/4606@{#1130}
OS Windows 10 Version 20H2 (Build 19042.1237)

cc @brave/legacy_qa @rebron @tmancey @jsecretan

@kjozwiak
Copy link
Member

As @btlechowski mentioned, this is also reproducible on macOS 11.5.2 x64 as well. Even though you have system notifications enabled via Notifications under System Notifications, you're always going to get added into the following and you'll get custom ad notifications 100% of the time even though native notifications should be shown/used:

[9007:259:0924/120415.982593:VERBOSE1:features.cc(45)] Study BraveAds.ShowCustomAdNotificationOnMacStudy is active (Enabled)

This is in relation to brave/brave-variations#120. Specifically:

Native ad notifications should be displayed via the following when:

  • for macOS 10.14 and newer if native notifications are enabled - seeing custom ad notifications
  • for Windows 10 build 17134 and newer (should not be shown if Focus Assist is enabled) - seeing custom ad notifications

@tmancey tmancey self-assigned this Sep 24, 2021
@tmancey
Copy link
Contributor

tmancey commented Sep 24, 2021

@btlechowski fixed via variations seed

@kjozwiak
Copy link
Member

kjozwiak commented Sep 27, 2021

Once we get RC builds, we should quickly run through brave/brave-variations#129 to make sure things are working as expected. There's some notes/better STR/Cases outlined via brave/brave-variations#120 which is the same PR but merged into main (staging).

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Sep 28, 2021

Verification passed on


Brave | 1.30.86 Chromium: 94.0.4606.61 (Official Build) (64-bit)
-- | --
Revision | 418b78f5838ed0b1c69bb4e51ea0252171854915-refs/branch-heads/4606@{#1204}
OS | Windows 10 Version 21H1 (Build 19043.1237)

Case 1: Show default ad notification

1. Confirmed default ad notifications are delivered when brave is launched via
  • brave.exe --enable-logging=stderr --vmodule="*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=6
  • Native or system notifications are enabled
  • Focus assist is OFF
    image

Case 1.1: Show default ad notification

  1. Confirmed default ad notifications are delivered when brave is launched via
  • --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-debug --variations-server-url=https://variations.brave.com/seed
  • Native or system notifications are enabled
  • Focus assist is OFF
  • Windows 10 build 17134 and newer (Windows 10 build is 19043.1237 in my machine)
    image

Case 2: Show custom ad notification

3. Confirmed custom ad notifications are delivered when brave is launched via
  • --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-debug --variations-server-url=https://variations.brave.com/seed
  • Native or system notifications are disabled
  • Focus assist is OFF
  • Windows 10 build 17134 and newer (Windows 10 build is 19043.1237 in my machine)

Actual: Custom ad notifications are not shown, in fact all the notifications are blocked, Encountered the issue #18351

Case 3 : Show custom ad notification (enable custom ads via brave://flags)

4. Confirmed custom ad notifications are delivered when brave is launched via
  • --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-debug --variations-server-url=https://variations.brave.com/seed
  • Native or system notifications are enabled
  • Enable Brave Ads custom notifications via brave://flags
  • Focus assist is OFF
  • Windows 10 build 17134 and newer (Windows 10 build is 19043.1237 in my machine)

image


Verification PASSED on macOS 11.6 x64 using the following build:

Brave | 1.30.86 Chromium: 94.0.4606.61 (Official Build) (x86_64)
--- | ---
Revision | 418b78f5838ed0b1c69bb4e51ea0252171854915-refs/branch-heads/4606@{#1204}
OS | macOS Version 11.6 (Build 20G165)

Test Case #1 (default installation/native notifications)

  • launched 1.30.86 Chromium: 94.0.4606.61
  • restarted 1.30.86 Chromium: 94.0.4606.61 and ensured that variations are loaded/being used via brave://version
[5695:259:0928/091426.836456:VERBOSE1:features.cc(45)] Study BraveAds.FrequencyCappingStudy is active (ExcludeAdIfWithinTimeWindow=0h)
[5695:259:0928/091426.836489:VERBOSE1:features.cc(45)] Study BraveAds.UserActivityStudy is active (Triggers=EMPTY/Threshold=0.0/IdleTimeThreshold=5)
  • enabled rewards using the rewards panel and triggered an ad notification
  • ensured that a native ad notification was being displayed/used
Example Example
Screen Shot 2021-09-28 at 9 44 38 AM Screen Shot 2021-09-28 at 9 15 58 AM

Test Case #2 (native notifications disabled)

  • launched 1.30.86 Chromium: 94.0.4606.61
  • disabled native notifications via brave://flags/#enable-system-notifications and restarted 1.30.86 Chromium: 94.0.4606.61
  • ensured that variations are loaded/being used via brave://version
[7494:259:0928/093320.828418:VERBOSE1:features.cc(45)] Study BraveAds.FrequencyCappingStudy is active (ExcludeAdIfWithinTimeWindow=0h)
[7494:259:0928/093320.828448:VERBOSE1:features.cc(45)] Study BraveAds.UserActivityStudy is active (Triggers=EMPTY/Threshold=0.0/IdleTimeThreshold=5)
  • enabled rewards using the rewards panel and triggered an ad notification
  • ensured that a custom ad notification was being displayed/used
Example Example
Screen Shot 2021-09-28 at 9 32 49 AM Screen Shot 2021-09-28 at 9 34 25 AM

Verification passed on

Brave 1.30.86 Chromium: 94.0.4606.61 (Official Build) (64-bit)
Revision 418b78f5838ed0b1c69bb4e51ea0252171854915-refs/branch-heads/4606@{#1204}
OS Ubuntu 18.04 LTS

Verified test plan from brave/brave-variations#120

Verified on Linux Custom ads are enabled by default.
image


Verification passed on

Brave 1.30.86 Chromium: 94.0.4606.61 (Official Build) (64-bit)
Revision 418b78f5838ed0b1c69bb4e51ea0252171854915-refs/branch-heads/4606@{#1204}
OS Windows 7 Service Pack 1 (Build 7601.24544)

Verified test plan from brave/brave-variations#120

Verified on Linux Custom ads are enabled by default.
image

@srirambv
Copy link
Contributor

Verification passed on Oppo Reno 5 with Android 11 running 1.30.86 x64 build

Native Ads Custom Ads via Flags
image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment