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

Foregrounded browser window without focus isn't detected as active, so not served ads #16598

Closed
stephendonner opened this issue Jun 24, 2021 · 3 comments

Comments

@stephendonner
Copy link

Description

Foregrounded browser window without focus isn't detected as active, so not served ads

Steps to Reproduce

  1. new profile
  2. launch Brave using --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,reconcile-interval=3
  3. open a new tab
  4. click on Start using Rewards
  5. open a 4+ tabs
  6. ensure the console window has focus (not the browser)
  7. wait a while
  8. resume activity
  9. look for ad notification / look in console log

Actual result:

No ad notification displays, due to:

[5938:259:0624/091648.169341:VERBOSE2:permission_rule_util.cc(23)] Browser window is not active [5938:259:0624/091648.169413:VERBOSE1:ad_notification_serving.cc(90)] Ad notification not served: Not allowed due to permission rules

You have to:

  1. wait for a new cycle
  2. have the browser window focused at the time of delivery

Expected result:

Upon refocusing the browser window after the appropriate conditions/wait time has passed, you should get served the ad

Reproduces how often:

100%

Brave version (brave://version info)

Brave 1.28.27 Chromium: 91.0.4472.120 (Official Build) nightly (x86_64)
Revision 12c5925972cffe578ca7ca7a295e98ee7e178a7a-refs/branch-heads/4472@{#1506}
OS macOS Version 11.4 (Build 20F71)

/cc @tmancey @btlechowski

@stephendonner
Copy link
Author

Also happens on

Brave 1.27.78 Chromium: 91.0.4472.114 (Official Build) beta (x86_64)
Revision 4bb19460e8d88c3446b360b0df8fd991fee49c0b-refs/branch-heads/4472@{#1496}
OS macOS Version 11.4 (Build 20F71)

so we'll want an uplift to 1.27.x, once we have a fix in hand.

@tmancey
Copy link
Contributor

tmancey commented Jun 25, 2021

@stephendonner can you please confirm this issue only occurs if launched from Terminal (macOS) or Command Prompt (Windows)? Thanks

@tmancey
Copy link
Contributor

tmancey commented Jun 25, 2021

@stephendonner has confirmed this issue only occurs if launching the browser from the command line. Closing as won't fix as the browser requires focus.

@tmancey tmancey closed this as completed Jun 25, 2021
@tmancey tmancey added this to Ads Jun 10, 2024
@tmancey tmancey moved this to Done in Ads Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants