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

P3A being re-enabled after upgrading even though it was disabled #19324

Closed
kjozwiak opened this issue Nov 9, 2021 · 4 comments · Fixed by brave/brave-core#11063
Closed

P3A being re-enabled after upgrading even though it was disabled #19324

kjozwiak opened this issue Nov 9, 2021 · 4 comments · Fixed by brave/brave-core#11063
Assignees
Labels
features/P3A OS/Android Fixes related to Android browser functionality priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass - Android ARM QA Pass - Android Tab QA/Yes release/blocking release-notes/include

Comments

@kjozwiak
Copy link
Member

kjozwiak commented Nov 9, 2021

Description

P3A is being re-enabled whenever an upgrade occurs even though a user has disabled P3A via the on-boarding or under Brave shields & privacy via Settings.

Steps to reproduce

  • install 1.31.90 Chromium: 95.0.4638.69 and disable P3A via on-boarding (installed using GPS)
  • go into the Privacy/Security settings and ensure that Allow privacy-preserving product analytics (P3A) is disabled
  • upgrade to 1.31.91 Chromium: 95.0.4638.69 and check the same setting (notice that Allow privacy-preserving product analytics (P3A) is enabled)

Actual result

P3A is being enabled whenever a user upgrades.

Expected result

P3A should stay disabled after upgrading. We should be respecting the users choice.

Issue reproduces how often

100% reproducible using the STR. @SergeyZhukovsky also reproduced/confirmed the issue.

Version/Channel Information:

  • Can you reproduce this issue with the current Play Store version? Yes
  • Can you reproduce this issue with the current Play Store Beta version? Yes
  • Can you reproduce this issue with the current Play Store Nightly version? Yes

Device details

  • Install type (ARM, x86): ARM
  • Device type (Phone, Tablet, Phablet): Samsung S10+ (Phone)
  • Android version: Android 11

Brave version

Basically any version after brave/brave-core#7765.

Website problems only

  • 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

Additional information

CCing @aekeus @bsclifton @SergeyZhukovsky @diracdeltas @PrivacyMatters

@kjozwiak kjozwiak added release/blocking priority/P2 A bad problem. We might uplift this to the next planned release. QA/Yes release-notes/include OS/Android Fixes related to Android browser functionality labels Nov 9, 2021
@kjozwiak kjozwiak added this to the 1.32.x - Beta milestone Nov 9, 2021
@rillian
Copy link

rillian commented Nov 9, 2021

@deeppandya Are you able to diagnose this? I'm not familiar with the android installer mechanism.

@bsclifton
Copy link
Member

@rillian looks like this was unintentionally introduced with brave/brave-core#7765

Problem is in the logic here:
https://github.com/brave/brave-core/blob/877a6dbf1346f0a0327b11355ed69d4d1515232e/android/java/org/chromium/chrome/browser/app/BraveActivity.java#L480-L481

This is always evaluating to true basically

@rillian
Copy link

rillian commented Nov 9, 2021

@bsclifton I figured it was something like that, but I'm still having trouble following. I didn't find any documentation on what p3a_enabled_for_existing_users means. Are the shared prefs not preserved across the update?

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Nov 23, 2021

Verification passed on Vivo X70 Pro version Android 11 running Bravemonoarm.64_apk_1.32.111

Case 1: Upgrade from GPS version 1.32.106 to 1.32.11
  • Install GPS version 1.32.106 and disable P3A via onboarding flow
  • Ensured P3A is disabled via Hamburger Menu -> Settings -> Brave shields & privacy
  • Open a few websites and add bookmarks and change the default search engine and enable rewards
  • Open the brave://local-state file and confirm P3A logs array is empty, P3A stats are not collected for the metrics above
  • Upgrade the profile to 1.32.111
  • Ensured P3A is disabled via Hamburger Menu -> Settings -> Brave shields & privacy
  • Ensured that P3A entries are appearing under brave://local-state but "sent:" false
  • Enable P3A via Hamburger Menu -> Settings -> Brave shields & privacy
  • Ensure that some of the data is eventually sent by making sure that "sent:" true
Case 2: Upgrade from 1.31.90 to 1.32.11
  • Install GPS version 1.31.90 and disable P3A via onboarding flow
  • Ensured P3A is disabled via Hamburger Menu -> Settings -> Brave shields & privacy
  • Open a few websites and add bookmarks and change the default search engine and enable rewards
  • Upgrade the profile to 1.32.111
  • Ensured P3A is disabled via Hamburger Menu -> Settings -> Brave shields & privacy
  • Ensured that P3A entries are appearing under brave://local-state but "sent:" false
  • Enable P3A via Hamburger Menu -> Settings -> Brave shields & privacy
  • Ensure that some of the data is eventually sent by making sure that "sent:" true
Case 3: Upgrade from 1.31.91 to 1.32.11
  • Install GPS version 1.31.91 and disable P3A via onboarding flow
  • Ensured P3A is disabled via Hamburger Menu -> Settings -> Brave shields & privacy
  • Open a few websites and add bookmarks and change the default search engine and enable rewards
  • Upgrade the profile to 1.32.111
  • Ensured P3A is disabled via Hamburger Menu -> Settings -> Brave shields & privacy
  • Ensured that P3A entries are appearing under brave://local-state but "sent:" false
  • Enable P3A via Hamburger Menu -> Settings -> Brave shields & privacy
  • Ensure that some of the data is eventually sent by making sure that "sent:" true
Case 4: Upgrade from 1.30.89 to 1.32.11
  • Install GPS version 1.30.89 and disable P3A via onboarding flow
  • Ensured P3A is disabled via Hamburger Menu -> Settings -> Brave shields & privacy
  • Open a few websites and add bookmarks and change the default search engine and enable rewards
  • Upgrade the profile to 1.32.111
  • Ensured P3A is disabled via Hamburger Menu -> Settings -> Brave shields & privacy
  • Ensured that P3A entries are appearing under brave://local-state but "sent:" false
  • Enable P3A via Hamburger Menu -> Settings -> Brave shields & privacy
  • Ensure that some of the data is eventually sent by making sure that "sent:" true

Verification PASSED on Samsung Galaxy Tab A (2019) running Android 11 using the following build:

1.32.112 Chromium: 96.0.4664.45

Test Case #1 (Upgrading 1.32.106 -> 1.32.112):

  • downloaded/installed 1.32.106 Chromium: 96.0.4664.45 and disabled P3A via on-boarding
  • double checked that P3A was disabled via Hamburger Menu -> Settings -> Brave shields & privacy
  • upgraded from 1.32.106 Chromium: 96.0.4664.45->1.32.112 Chromium: 96.0.4664.45`
  • ensured that P3A was still disabled via Hamburger Menu -> Settings -> Brave shields & privacy
  • ensured that P3A entries are appearing under brave://local-state but "sent:" false (shouldn't be sending data is it's disabled)
  • enable P3A via Hamburger Menu -> Settings -> Brave shields & privacy
  • ensure that some of the data is eventually sent by making sure that "sent:" true

Test Case #2 (Upgrading 1.31.91 -> 1.32.112):

  • downloaded/installed 1.31.91 Chromium: 95.0.4638.69 and disabled P3A via on-boarding
  • double checked that P3A was disabled via Hamburger Menu -> Settings -> Brave shields & privacy
  • upgraded from 1.31.91 Chromium: 95.0.4638.69 -> 1.32.112 Chromium: 96.0.4664.45
  • ensured that P3A was still disabled via Hamburger Menu -> Settings -> Brave shields & privacy
  • ensured that P3A entries are appearing under brave://local-state but "sent:" false (shouldn't be sending data is it's disabled)
  • enable P3A via Hamburger Menu -> Settings -> Brave shields & privacy
  • ensure that some of the data is eventually sent by making sure that "sent:" true

Test Case #3 (Upgrading 1.31.90 -> 1.32.112):

  • downloaded/installed 1.31.90 Chromium: 95.0.4638.69 and disabled P3A via on-boarding
  • double checked that P3A was disabled via Hamburger Menu -> Settings -> Brave shields & privacy
  • upgraded from 1.31.90 Chromium: 95.0.4638.69 -> 1.32.112 Chromium: 96.0.4664.45
  • ensured that P3A was still disabled via Hamburger Menu -> Settings -> Brave shields & privacy
  • ensured that P3A entries are appearing under brave://local-state but "sent:" false (shouldn't be sending data is it's disabled)
  • enable P3A via Hamburger Menu -> Settings -> Brave shields & privacy
  • ensure that some of the data is eventually sent by making sure that "sent:" true

@GeetaSarvadnya GeetaSarvadnya added QA Pass - Android ARM and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
features/P3A OS/Android Fixes related to Android browser functionality priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass - Android ARM QA Pass - Android Tab QA/Yes release/blocking release-notes/include
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants