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

[ads] Notification ads are shown when playing media #38225

Closed
btlechowski opened this issue May 10, 2024 · 4 comments · Fixed by brave/brave-core#23584
Closed

[ads] Notification ads are shown when playing media #38225

btlechowski opened this issue May 10, 2024 · 4 comments · Fixed by brave/brave-core#23584

Comments

@btlechowski
Copy link

Important: This is regression introduced in 1.66.x. Not reproducible in 1.65.x

Steps to Reproduce

Test case 1:

  1. Clean profile
  2. Enable rewards
  3. Wait for confirmation tokens
  4. Open youtube.com
  5. Play a video
  6. Trigger an ad

Test case 2:

  1. Clean profile
  2. Enable rewards
  3. Wait for confirmation tokens
  4. Open youtube.com
  5. Minimize the browser window
  6. Restore the browser window
  7. Play a video
  8. Trigger an ad

Actual result:

Notification ad is shown

Expected result:

Notification ad is not shown

[9569:9569:0510/185904.063940:VERBOSE2:permission_rules.cc(263)] Media is playing
[9569:9569:0510/185904.064190:VERBOSE1:notification_ad_serving.cc(77)] Notification ad not served: Not allowed due to permission rules

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Brave 1.66.104 Chromium: 125.0.6422.41 (Official Build) (64-bit)
Revision 6213f85e37bb676772fb221ce11a41c2b1be0fe2
OS Linux

cc @tmancey @aseren @iambrianfung

@tmancey tmancey added this to Priority in Ads May 10, 2024
@tmancey tmancey added the bug label May 10, 2024
@tmancey tmancey self-assigned this May 10, 2024
@tmancey tmancey moved this from Priority to In progress in Ads May 10, 2024
@tmancey tmancey assigned aseren and unassigned tmancey May 11, 2024
@tmancey tmancey moved this from In progress to Priority in Ads May 11, 2024
@tmancey tmancey added the priority/P2 A bad problem. We might uplift this to the next planned release. label May 11, 2024
@tmancey tmancey added this to the 1.66.x - Release milestone May 11, 2024
@tmancey tmancey assigned tmancey and unassigned aseren May 11, 2024
@tmancey tmancey moved this from Priority to Review in Ads May 11, 2024
@tmancey tmancey removed this from the 1.66.x - Release milestone May 11, 2024
Ads automation moved this from Review to Done May 13, 2024
@kjozwiak
Copy link
Member

The above requires 1.66.107 or higher for 1.66.x verification 👍

@btlechowski
Copy link
Author

Verified with

Brave 1.66.107 Chromium: 125.0.6422.41 (Official Build) (64-bit)
Revision 188213f024297511fc5e37efe56eabde5992b300
OS Linux

Verified test plan from #38225

Test case 1

Verified ads are not shown when media is playing

[15357:15357:0514/214401.310066:VERBOSE2:permission_rules.cc(263)] Media is playing
[15357:15357:0514/214401.310730:VERBOSE1:notification_ad_serving.cc(77)] Notification ad not served: Not allowed due to permission rules

Test case 2

Verified ads are not shown when media is playing even when window was restored

[15357:15357:0514/214551.496728:VERBOSE2:permission_rules.cc(263)] Media is playing
[15357:15357:0514/214551.497081:VERBOSE1:notification_ad_serving.cc(77)] Notification ad not served: Not allowed due to permission rules


@btlechowski
Copy link
Author

btlechowski commented May 16, 2024

Verified with

Brave 1.66.110 Chromium: 125.0.6422.60 (Official Build) (64-bit)
Revision de593d76e2ca4d02faa85bf1ca27bcf3ee46793c
OS Windows 10 Version 22H2 (Build 19045.4412)

Verified test plan from #38225

Test case 1

Verified ads are not shown when media is playing

[9544:1404:0516/125629.550:VERBOSE2:permission_rules.cc(263)] Media is playing
[9544:1404:0516/125629.550:VERBOSE1:notification_ad_serving.cc(77)] Notification ad not served: Not allowed due to permission rules

Test case 2

Verified ads are not shown when media is playing even when window was restored

[9544:1404:0516/125742.989:VERBOSE2:tab_manager.cc(251)] Tab id 1732594971 did become focused
[9544:1404:0516/125742.991:VERBOSE6:user_activity_manager.cc(42)] Triggered event: 09 (0:0:900 s)
[9544:1404:0516/125748.610:VERBOSE1:user_idle_detection.cc(46)] User is idle
[9544:1404:0516/125749.623:VERBOSE1:notification_helper_impl_win.cc(187)] Notifications disabled for user
[9544:1404:0516/125749.633:VERBOSE1:notification_helper_impl_win.cc(187)] Notifications disabled for user
[9544:1404:0516/125749.633:VERBOSE2:permission_rules.cc(263)] Media is playing
[9544:1404:0516/125749.633:VERBOSE1:notification_ad_serving.cc(77)] Notification ad not served: Not allowed due to permission rules



@btlechowski
Copy link
Author

Verified with

Brave	1.66.110 Chromium: 125.0.6422.60 (Official Build) (arm64) 
Revision	de593d76e2ca4d02faa85bf1ca27bcf3ee46793c
OS	macOS Version 14.4 (Build 23E214)

Verified test plan from #38225

Test case 1

Verified ads are not shown when media is playing

[963:259:0516/172812.857110:VERBOSE2:permission_rules.cc(263)] Media is playing
[963:259:0516/172812.857292:VERBOSE1:notification_ad_serving.cc(77)] Notification ad not served: Not allowed due to permission rules

Test case 2

Verified ads are not shown when media is playing even when window was restored

[963:259:0516/172943.505904:VERBOSE2:permission_rules.cc(263)] Media is playing
[963:259:0516/172943.506054:VERBOSE1:notification_ad_serving.cc(77)] Notification ad not served: Not allowed due to permission rules

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