Closed
Bug 753289
Opened 12 years ago
Closed 9 years ago
Sync overwrites option added manually to the services.sync.prefs. when adding new sync client
Categories
(Firefox :: Sync, defect)
Firefox
Sync
Tracking
()
RESOLVED
FIXED
Iteration:
43.3 - Sep 21
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: jan.dechent, Assigned: tabmix.onemen, Mentored)
References
Details
(Whiteboard: [sync:preferences][sync:rigor][sync:scale][good first bug][lang=js])
Attachments
(1 file)
3.41 KB,
patch
|
rnewman
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0 Build ID: 20120501201020 Steps to reproduce: Added manually some options to be synced across different firefoxes Added to about:config on client A: services.sync.prefs.sync.browser.sessionstore.privacy_level = true services.sync.prefs.sync.browser.sessionstore.privacy_level_deferred = true browser.sessionstore.privacy_level = 2 browser.sessionstore.privacy_level_deferred =2 Then added new synclilent on different PC (same ff version) Actual results: Firefox sync the option what will be synced, but overwirtes the option itself: services.sync.prefs.sync.browser.sessionstore.privacy_level = true services.sync.prefs.sync.browser.sessionstore.privacy_level_deferred = true browser.sessionstore.privacy_level = default browser.sessionstore.privacy_level_deferred = default Expected results: firefox should sync the options correctly: browser.sessionstore.privacy_level = 2 browser.sessionstore.privacy_level_deferred = 2
Comment 1•12 years ago
|
||
This bug makes it sound like preferences sync is broken. We should probably try to reproduce this...
Component: Untriaged → Firefox Sync: Backend
Keywords: qawanted
Product: Firefox → Mozilla Services
QA Contact: untriaged → sync-backend
Version: 13 Branch → unspecified
Reporter | ||
Comment 2•12 years ago
|
||
I want to re-report this bug since I installed firefox 13 on a mac today and connected my sync account. The same as stated above happens... Perhaps my user profile is damaged. Can anyone reproduce this error?
Reporter | ||
Comment 3•12 years ago
|
||
Still buggy in 14.0.1
Comment 4•12 years ago
|
||
questions: is it necessary to restart after adding and setting new prefs? If so, was that done before you added client B to the Sync account?
Updated•12 years ago
|
Whiteboard: [sync:preferences]
Updated•12 years ago
|
Blocks: 745408
Whiteboard: [sync:preferences] → [sync:preferences][sync:rigor][sync:scale]
Comment 5•9 years ago
|
||
More STR: https://discourse.mozilla-community.org/t/how-to-sync-preferences-of-a-bootstrapped-extension-via-sync/3024
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 7 → All
Hardware: x86_64 → All
Assignee | ||
Comment 6•9 years ago
|
||
The problem is that the preferences save in the server not sorted sync.extensions.foo.xxx is saved before services.sync.prefs.sync.extensions.foo.xxx when the pref engine import the saved record on new device that don't have both sync.extensions.foo.xxx and services.sync.prefs.sync.extensions.foo.xxx, it import sync.extensions.foo.xxx first so PrefStore.prototype._isSynced return false. The fix for this issue is to sort the imported record with services.sync.prefs.sync. preferences before other preferences.
Comment 7•9 years ago
|
||
That seems like a legitimate fix to me.
Updated•9 years ago
|
Mentor: markh, rnewman
Keywords: qawanted
Whiteboard: [sync:preferences][sync:rigor][sync:scale] → [sync:preferences][sync:rigor][sync:scale][good first bug][lang=js]
Assignee | ||
Comment 8•9 years ago
|
||
This patch fix this bug.
Attachment #8654635 -
Flags: review?(rnewman)
Comment 9•9 years ago
|
||
Comment on attachment 8654635 [details] [diff] [review] Update 'services.sync.prefs.sync' preferences first Review of attachment 8654635 [details] [diff] [review]: ----------------------------------------------------------------- r+ with that change. ::: services/sync/modules/engines/prefs.js @@ +89,5 @@ > .getBranch(WEAVE_SYNC_PREFS) > .getChildList("", {}); > // Also sync preferences that determine which prefs get synced. > + let weavePrefs = syncPrefs.map(function (pref) { return WEAVE_SYNC_PREFS + pref; }); > + return weavePrefs.concat(syncPrefs); Remove these changes; it doesn't look like they do anything, and we don't want to reintroduce uses of 'weave'. @@ +114,5 @@ > let selectedThemeIDBefore = this._prefs.get(selectedThemeIDPref, null); > > + // Update 'services.sync.prefs.sync.foo.pref' before 'foo.pref' otherwise > + // _isSynced return false when 'foo.pref' doesn't exist in a new device. > + let prefs = Object.keys(values).sort(a => -a.indexOf(WEAVE_SYNC_PREFS)); We only want to bother searching at the start of the string, so I think this is what we want: .sort(a => !a.startsWith(WEAVE_SYNC_PREFS));
Attachment #8654635 -
Flags: review?(rnewman) → review+
Comment 10•9 years ago
|
||
Do you need me to land this?
Assignee: nobody → tabmix.onemen
Status: NEW → ASSIGNED
Flags: needinfo?(tabmix.onemen)
Assignee | ||
Comment 11•9 years ago
|
||
Thank you Richard, Please land this patch, I'm away until September 20.
Comment 12•9 years ago
|
||
I applied my nits and some other cleanup; waiting for try to open. Will land. Thanks!
Flags: needinfo?(tabmix.onemen) → needinfo?(rnewman)
Comment 14•9 years ago
|
||
url: https://hg.mozilla.org/integration/fx-team/rev/4378a00214c5b591c4c4dce77e03a87619539f64 changeset: 4378a00214c5b591c4c4dce77e03a87619539f64 user: Richard Newman <rnewman@mozilla.com> date: Thu Sep 10 17:33:50 2015 +0100 description: Bug 753289 - Pre: rename WEAVE_SYNC_PREFS to PREF_SYNC_PREFS_PREFIX. url: https://hg.mozilla.org/integration/fx-team/rev/06f396c07ac9ae10158eec2834faf4d5febbb167 changeset: 06f396c07ac9ae10158eec2834faf4d5febbb167 user: onemen <tabmix.onemen@gmail.com> date: Thu Sep 10 17:33:50 2015 +0100 description: Bug 753289 - Apply prefs-related prefs before applying other synced prefs. r=rnewman
Updated•9 years ago
|
Flags: needinfo?(rnewman)
Comment 15•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4378a00214c5 https://hg.mozilla.org/mozilla-central/rev/06f396c07ac9
Updated•9 years ago
|
Iteration: --- → 43.3 - Sep 21
Flags: firefox-backlog+
Comment hidden (spam) |
Updated•8 years ago
|
blocking-b2g: 2.2? → ---
tracking-b2g:
backlog → ---
Updated•6 years ago
|
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in
before you can comment on or make changes to this bug.
Description
•