Preferences set by users before enrolling into an experiment which uses the same value are deleted/reset at unenrollment
Categories
(Firefox :: Normandy Client, defect)
Tracking
()
People
(Reporter: mheres, Assigned: mythmon)
References
(Depends on 1 open bug)
Details
Attachments
(3 files)
[Affected Versions]:
- Firefox Beta 90.0b6 (Build ID: 20210610185818)
- Firefox Nightly 91.0a1 (Build ID: 20210610215038)
[Affected Platforms]:
- Windows 10
- Linux Mint 20
- macOS 11.1
[Prerequisites]:
- Have a Normandy default type recipe for an experiment that will create some preferences with values not default to Firefox.
E.g. default type recipe for:
“browser.topsites.experiment.ebay-2020-1” to “true” - Have a user.js file that will enroll you in the experiment.
- Have Firefox open (not enrolled in study).
[Steps to reproduce]:
- Navigate to “about:config”
- Create preferences with the experiment values (i.e. “browser.topsites.experiment.ebay-2020-1” to “true”)
- Restart the browser.
- Open the “Profile Directory” folder and copy the user.js file from prerequisites there.
- Restart Firefox.
- Navigate to “about:studies” and unenroll from the study.
- Restart Firefox.
- Go to "about:config" and observe the preferences.
[Expected result]:
- Preferences set before enrolling are kept on user value after unenrollment.
[Actual result]:
- Preferences set before enrolling are deleted after unenrollment if they have the same value as the one used by that branch.
Assignee | ||
Comment 1•4 years ago
|
||
The problem lies in /toolkit/components/normandy/lib/PreferenceExperiments.jsm#500-515. After detecting that the preference already has a user-set value, we unconditionally set a default value for it. Since Firefox doesn't save user prefs that are identical to default prefs at shut down, this causes the user pref to be erased.
Instead we should not set a default branch when it is the same as the user branch. We may also want to never change the default value if their is a user set value, but I'm less convinced about that.
![]() |
Reporter | |
Comment 2•4 years ago
|
||
The issue is also reproducible for already existing preferences as long as between steps 5 and 6 the browser is restarted while enrolled in the study, as seen in the recording.
Assignee | ||
Comment 3•4 years ago
|
||
When the default and user branch values of a preference match, the user brach
value is effectively erased, and we keep no evidence that the user made a
choice. This changes makes normandy avoid that situation, so that user
preferences remain intact.
Updated•4 years ago
|
Comment 5•4 years ago
|
||
bugherder |
![]() |
Reporter | |
Comment 7•4 years ago
•
|
||
I am reopening this issue as the fix seems to have only partially been effective. In the case of the original STR the issue seems fixed, while for the case described in comment 2, the issue is fully reproducible.
Tested using Firefox Nightly 91.0a1 (Build ID: 20210616214200) on Windows 10, Linux Mint 20 and macOS 11.1.
![]() |
Reporter | |
Updated•4 years ago
|
Assignee | ||
Comment 8•4 years ago
|
||
(In reply to Julien Cristau [:jcristau] from comment #6)
Is this something we'll need in 90?
I think this is a fairly minor bug since the preferences we tend to do experiments on these days are dedicated preferences that shouldn't have pre-existing user-set values. Additionally, given QA's yellow sign off I think it is worth taking this slowly. Given that, I don't think we should uplift it for 90.
Updated•4 years ago
|
Assignee | ||
Comment 9•4 years ago
|
||
This should help with bugs where users lose user-set values after an experiment expires.
Comment 10•4 years ago
|
||
![]() |
||
Comment 11•4 years ago
|
||
bugherder |
Comment 12•4 years ago
|
||
The patch landed in nightly and beta is affected.
:mythmon, is this bug important enough to require an uplift?
If not please set status_beta
to wontfix
.
For more information, please visit auto_nag documentation.
![]() |
Reporter | |
Comment 13•4 years ago
•
|
||
The latest fix does not seem to have modified the behavior. The exact steps in Comment 0 cannot reproduce the issue in either Firefox Nightly 92.0a1 (Build ID: 20210714215010) or Firefox Beta 91.0b2 (Build ID: 20210713163746) since the first fix. Bug 1720675 and Bug 1720677 have been opened for the behaviors encountered at different numbers of restarts after enrollment.
Considering this, I will mark this issue as verified fixed for the original behavior. Tested using Windows 10, Linux Mint 20 and macOS 11.1.
Assignee | ||
Comment 14•4 years ago
|
||
The patch landed in nightly and beta is affected.
:mythmon, is this bug important enough to require an uplift?
I'm of the opinion this does not require an uplift.
If not please set status_beta to wontfix.
I don't see a status_beta
flag on this bug. I'm going to assume there isn't one, since the bot also didn't change it.
Comment 15•4 years ago
|
||
The bot meant status-firefox91. :)
Description
•