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 does not reliably enable when activated from pop-up in rewards settings #12715

Closed
moritzhaller opened this issue Nov 16, 2020 · 4 comments · Fixed by brave/brave-core#7263

Comments

@moritzhaller
Copy link

Description

Ads does not reliably enable when activated from new opt-in pop-up in Preferences, see screen capture here: https://bravesoftware.slack.com/files/UM5GQEGBV/F01ECRT35V5/screen_recording_2020-11-16_at_09.45.24.mov

Steps to Reproduce

  1. start latest Nightly with fresh profile
  2. go to rewards settings and click "Start using Brave rewards"

Actual result:

Ads switch not being enabled, but auto-contribute switch being enabled

Expected result:

Ads switch being enabled, but auto-contribute switch being enabled

Reproduces how often:

intermittent on every 2nd to 3rd attempt

Brave version (brave://version info)

Version 1.19.5 Chromium: 87.0.4280.49 (Official Build) nightly (x86_64)

Version/Channel Information:

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

Other Additional Information:

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

Miscellaneous Information:

@moritzhaller moritzhaller changed the title Ads does not reliably enable when activated from new opt-in pop-up in Preferences Ads does not reliably enable when activated from pop-up in rewards settings Nov 16, 2020
@zenparsing
Copy link

I believe that this issue is occurring because the ads service has not registered user pref listeners when the kEnabled ads pref is set to true as a result of the "Enable Rewards" button begin pressed.

  • In ads_service_impl.cc, the AdsServiceImpl constructor calls MaybeInitialize, which performs MigrateConfirmationsStateOnFileTaskRunner on a separate task runner.
  • When that task is complete, AdsServiceImpl::Initialize is called, which registers pref change listeners.
  • If AdsServiceImpl::SetEnabled is called prior to Initialize, then the pref change will not be observed, and consequently rewards_service_->CreateWallet will not be called.

@btlechowski
Copy link

QA/Blocked as build > 1.18.68 is needed

@btlechowski
Copy link

btlechowski commented Dec 9, 2020

Verification passed on

Brave 1.18.69 Chromium: 87.0.4280.88 (Official Build) (64-bit)
Revision 89e2380a3e36c3464b5dd1302349b1382549290d-refs/branch-heads/4280@{#1761}
OS Windows 7 Service Pack 1 (Build 7601.24544)

Verified test plan from brave/brave-core#7276
Verified for Rewards Panel:
image
image
Verified for NTP:
image
image
Verified for brave://rewards
image
image

Checked the logs for any errors
Verified on production and staging


Verification passed on

Brave 1.18.70 Chromium: 87.0.4280.101 (Official Build) (64-bit)
Revision 9407c80213cda69c2b7abcb4fa8e3f74488f4956-refs/branch-heads/4280@{#1807}
OS Windows 7 Service Pack 1 (Build 7601.24544)

Verified test plan from brave/brave-core#7276
Verified for Rewards Panel:
image

Verified for NTP:
image

Verified for brave://rewards
image

Checked the logs for any errors

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