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

Brave Ads are not shown if the browser window did not enter the background and then become active #14736

Closed
tmancey opened this issue Mar 15, 2021 · 2 comments · Fixed by brave/brave-core#8255

Comments

@tmancey
Copy link
Contributor

tmancey commented Mar 15, 2021

Description

Steps to Reproduce

  1. Join Rewards
  2. Quit browser
  3. Launch browser
  4. Trigger ad

Actual result:

Ad notification is not shown

Expected result:

Ad notification should be shown

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Version/Channel Information:

  • Can you reproduce this issue with the current release? Yes
  • Can you reproduce this issue with the beta channel? Yes
  • Can you reproduce this issue with the nightly channel? Yes

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? N/A
  • Does the issue resolve itself when disabling Brave Rewards? N/A
  • Is the issue reproducible on the latest version of Chrome? N/A

Miscellaneous Information:

@tmancey tmancey added bug priority/P2 A bad problem. We might uplift this to the next planned release. QA/Yes release-notes/exclude feature/ads OS/Desktop labels Mar 15, 2021
@tmancey tmancey self-assigned this Mar 15, 2021
@tmancey tmancey changed the title Brave Ads are not shown unless the browser window entered the background and then become active Brave Ads are not shown if the browser window did not enter the background and then become active Mar 15, 2021
@tmancey tmancey added this to the 1.24.x - Nightly milestone Mar 17, 2021
@tmancey tmancey added priority/P3 The next thing for us to work on. It'll ride the trains. and removed priority/P2 A bad problem. We might uplift this to the next planned release. labels Mar 17, 2021
@btlechowski
Copy link

Added QA/Test-All-Platforms since different platforms can handle background/active behaviors differently.

@stephendonner stephendonner added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Mar 26, 2021
@stephendonner
Copy link

stephendonner commented Mar 26, 2021

Verified FIXED using the inline testplan on build

Confirmed the problem using

Brave 1.24.1 Chromium: 89.0.4389.90 (Official Build) nightly (x86_64)
Revision 62eb262cdaae9ef819aadd778193781455ec7a49-refs/branch-heads/4389@{#1534}
OS macOS Version 11.2.3 (Build 20D91)
screenshot Screen Shot 2021-03-26 at 11 05 52 AM
logs:
[20283:775:0326/110343.843454:VERBOSE1:ads_impl.cc(192)] Browser state changed to idle
[20283:775:0326/110409.868409:VERBOSE1:ads_impl.cc(203)] Browser state changed to unidle after 40 s
[20283:775:0326/110409.868841:VERBOSE1:text_classification_model.cc(93)] No text classification probabilities found for en-US locale
[20283:775:0326/110409.871183:VERBOSE2:permission_rule_util.cc(23)] Browser window is not active
[20283:775:0326/110409.871262:VERBOSE1:ad_notification_serving.cc(137)] Ad notification not served: Not allowed
[20283:775:0326/110409.871311:VERBOSE1:ad_notification_serving.cc(85)] Ad notification not delivered
[20283:775:0326/110420.661970:VERBOSE1:browser_manager.cc(48)] Browser window is active

Verified the fix using

Brave 1.24.29 Chromium: 90.0.4430.41 (Official Build) nightly (x86_64)
Revision e9c92b1eaca8487e212f3f6bc081fdb6d4863759-refs/branch-heads/4430@{#723}
OS macOS Version 11.2.3 (Build 20D91)

Steps to verify fix:

  1. new profile
  2. launched Brave using --args --enable-logging=stderr --vmodule="*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=6,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true
  3. opened a new-tab page from the welcome screeen
  4. clicked Start using Brave Rewards
  5. opened a few more new-tab pages
  6. waited less than a minute
  7. moved mouse
  8. confirmed I received an ad notification successfully
screenshot Screen Shot 2021-03-26 at 11 32 18 AM
logs:
[20680:775:0326/113200.823072:VERBOSE1:ads_impl.cc(189)] Browser state changed to idle
[20680:775:0326/113211.835276:VERBOSE1:ads_impl.cc(200)] Browser state changed to unidle after 25 s
[20680:775:0326/113211.835807:VERBOSE1:text_classification_model.cc(93)] No text classification probabilities found for en-US locale
[20680:775:0326/113211.839369:VERBOSE1:ad_notification_serving.cc(159)] Serve ad for segments:
[20680:775:0326/113211.839428:VERBOSE1:ad_notification_serving.cc(161)]   untargeted
[20680:775:0326/113211.848622:VERBOSE2:ad_notification_serving.cc(261)] 8 eligible ads before pacing
[20680:775:0326/113211.848682:VERBOSE2:eligible_ads_priority_filter.cc(81)] 8 eligible ads with a priority of 1
[20680:775:0326/113211.848780:VERBOSE2:ad_notification_serving.cc(266)] 8 eligible ads after pacing
[20680:775:0326/113211.848843:VERBOSE1:ad_notification_serving.cc(252)] Found 8 eligible ads
[20680:775:0326/113211.857671:VERBOSE1:ads_service_impl.cc(1797)] Timeout ad notification with uuid f6017ba8-fcf7-41bd-9fa5-f5599977bca9 in 120 seconds
[20680:775:0326/113211.860859:VERBOSE1:ad_notification_serving.cc(99)] Ad notification delivered:
  uuid: f6017ba8-fcf7-41bd-9fa5-f5599977bca9
  creativeInstanceId: 7898a259-664a-4052-8382-9c7279ae3249
  creativeSetId: 5e96fecc-2926-4c72-bb76-4e745bf6b539
  campaignId: 0d01425b-c970-4a25-b2d0-ccf748cfaf6e
  advertiserId: ecbcc833-8b1d-4867-98f7-ad2341396ce8
  segment: untargeted
  title: Ad Set 2 - Creative 1 - Ad 1
  body: Ad Set 2 - Creative 1 - Ad 1
  targetUrl: https://youtube.com
[20680:775:0326/113211.861071:VERBOSE3:ad_notification_event_viewed.cc(24)] Viewed ad notification with uuid f6017ba8-fcf7-41bd-9fa5-f5599977bca9 and creative instance id 7898a259-664a-4052-8382-9c7279ae3249
[20680:775:0326/113211.861181:VERBOSE1:confirmations.cc(89)] Confirming view ad for creative instance id 7898a259-664a-4052-8382-9c7279ae3249

Verification passed on

Brave 1.23.69 Chromium: 90.0.4430.61 (Official Build) (64-bit)
Revision dced74d4124b26b14126b611853d33512b60c7b6-refs/branch-heads/4430@{#1115}
OS Ubuntu 18.04 LTS

Verified test plan from the description

logs:
[31873:31873:0412/105917.931484:VERBOSE1:ads_impl.cc(192)] Browser state changed to idle
[31873:31873:0412/105921.943228:VERBOSE1:ads_impl.cc(203)] Browser state changed to unidle after 18 s
[31873:31873:0412/105921.943548:VERBOSE1:text_classification_model.cc(93)] No text classification probabilities found for en_US.UTF-8 locale
[31873:31873:0412/105921.945781:VERBOSE1:ad_notification_serving.cc(158)] Serve ad for segments:
[31873:31873:0412/105921.945838:VERBOSE1:ad_notification_serving.cc(160)]   untargeted
[31873:31873:0412/105921.950417:VERBOSE2:ad_notification_serving.cc(260)] 4 eligible ads before pacing
[31873:31873:0412/105921.950472:VERBOSE2:eligible_ads_priority_filter.cc(81)] 4 eligible ads with a priority of 1
[31873:31873:0412/105921.950632:VERBOSE2:ad_notification_serving.cc(265)] 4 eligible ads after pacing
[31873:31873:0412/105921.950669:VERBOSE1:ad_notification_serving.cc(251)] Found 4 eligible ads
[31873:31873:0412/105921.951301:VERBOSE1:ads_service_impl.cc(1783)] Timeout ad notification with uuid 61b1a926-ef5c-45cc-8cb9-7855f5e7f0dc in 120 seconds
[31873:31873:0412/105921.951403:VERBOSE1:ad_notification_serving.cc(98)] Ad notification delivered:
  uuid: 61b1a926-ef5c-45cc-8cb9-7855f5e7f0dc
  creativeInstanceId: 54592ab6-5a8e-42e6-8e11-9e9c04e9eecb
  creativeSetId: c7e7a381-4c74-4dd9-9b6d-4edf9330454b
  campaignId: 0d01425b-c970-4a25-b2d0-ccf748cfaf6e
  segment: untargeted
  title: Ad Set 1 - Creative 2 - Ad 2
  body: Ad Set 1 - Creative 2 - Ad 2
  targetUrl: https://youtube.com

Verification passed on

Brave | 1.24.65 Chromium: 90.0.4430.72 (Official Build) dev (64-bit)
-- | --
Revision | b6172ef8d07ef486489a4b11b66b2eaeed50d132-refs/branch-heads/4430@{#1233}
OS | Windows 10 OS Version 2004 (Build 19041.928)
Screenshots

image
image

[21212:10540:0419/202907.085:VERBOSE1:ads_impl.cc(191)] Browser state changed to idle
[21212:10540:0419/202921.210:VERBOSE1:ads_impl.cc(202)] Browser state changed to unidle after 28 s
[21212:10540:0419/202921.216:VERBOSE1:text_classification_model.cc(93)] No text classification probabilities found for en-US locale
[21212:10540:0419/202921.228:INFO:notification_helper_win.cc(164)] Focus Assist is disabled
[21212:10540:0419/202921.271:INFO:notification_helper_win.cc(200)] Notifications are enabled
[21212:10540:0419/202921.288:VERBOSE1:ad_notification_serving.cc(174)] Serve ad for segments:
[21212:10540:0419/202921.289:VERBOSE1:ad_notification_serving.cc(176)]   untargeted
[21212:10540:0419/202921.317:VERBOSE2:ad_notification_serving.cc(279)] 7 eligible ads before pacing
[21212:10540:0419/202921.318:VERBOSE2:eligible_ads_priority_filter.cc(81)] 7 eligible ads with a priority of 1
[21212:10540:0419/202921.319:VERBOSE2:ad_notification_serving.cc(284)] 7 eligible ads after pacing
[21212:10540:0419/202921.321:VERBOSE1:ad_notification_serving.cc(270)] Found 7 eligible ads
[21212:10540:0419/202921.327:VERBOSE1:ads_service_impl.cc(1800)] Timeout ad notification with uuid 54fe132e-0065-4998-b84e-07f87922c890 in 120 seconds
[21212:10540:0419/202921.339:VERBOSE1:ad_notification_serving.cc(105)] Ad notification delivered:
  uuid: 54fe132e-0065-4998-b84e-07f87922c890
  creativeInstanceId: 4983dc92-09fd-4e5c-94c3-616a4728c1d9
  creativeSetId: 5bdeab83-048f-48a7-9602-a1092ded123c
  campaignId: 63010037-c230-40db-b41a-3127619b88e4
  advertiserId: 8d2f4191-b76e-4369-8983-3d9ff551c5ad
  segment: untargeted
  title: This is a test
  body: This is a test
  targetUrl: https://www.brave.com
[21212:10540:0419/202921.344:VERBOSE3:ad_notification_event_viewed.cc(24)] Viewed ad notification with uuid 54fe132e-0065-4998-b84e-07f87922c890 and creative instance id 4983dc92-09fd-4e5c-94c3-616a4728c1d9
[21212:10540:0419/202921.355:VERBOSE1:confirmations.cc(89)] Confirming view ad for creative instance id 4983dc92-09fd-4e5c-94c3-616a4728c1d9

@stephendonner stephendonner added QA Pass-macOS and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Mar 26, 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