New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 680821 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Shelf pinning not synced to new device

Project Member Reported by derat@chromium.org, Jan 13 2017

Issue description

I just added my personal account to a beta-channel kevin device running 56.0.2924.58 / 9000.58.0. chrome://sync-internals appears to say that "App List" has been successfully synced (Active:GROUP_UI, 50 Total Entries, 50 Live Entries, green background), but the only apps in the shelf are Gmail and Play Store. I have many more apps in the shelf on other Chromebooks logged in to the same account: Calendar, Secure Shell, Drive, Files app, etc. I've tried logging in and out a few times, but it hasn't helped.

A few observations:

- The kevin device has a Play Store app, but most of my other Chromebooks don't support Play Store. Maybe the new app confused things. (But I also use this account on a samus device that can run Android apps, so this theory may not hold water.)

- I have a custom sync passphrase, which I dutifully entered after I logged in for the first time. Everything else appears to have synced correctly (with the exception of my custom wallpaper, but that code is known to be buggy), though, so I'm not sure that it could be the cause.

The device is still in this state, so let me know if there's anything I can try, nodes I should look up, etc.
 

Comment 1 by khmel@chromium.org, Jan 13 2017

Hi, what is the version of your previous device?

Comment 2 by derat@chromium.org, Jan 13 2017

Stable channel: 55.0.2883.105 / 8872.76.0 (on a peppy device). The app list sync internals there also report 50/50.

Comment 3 by khmel@chromium.org, Jan 13 2017

I tested exact versions 8872.76.0(minnie) -> 9000.58.0(caroline) and it works as expected. 

Would you mind to provide more data? Please goto chrome://sync-internals->Sync node browser->App List and extract several recent nodes that include app with missing pin.

Comment 4 by derat@chromium.org, Jan 16 2017

Thanks for trying to reproduce it! For what it's worth, the app list _did_ get synced correctly on my corp account on this device; it's just my personal account that's broken.

I'm attaching a text file with App List sync nodes for a couple of apps that are pinned for this account on other Chromebooks but not on this one.
unsynced_app_list.txt
8.0 KB View Download
Cc: steve...@chromium.org
Owner: khmel@chromium.org
khemel@, I'm going to put this on your plate to continue to investigate since you've been working on the code most recently. I'll try to take a look when I have a chance.

Comment 6 by khmel@chromium.org, Jan 17 2017

Status: Started (was: Untriaged)

Comment 7 by s...@chromium.org, Jan 17 2017

Labels: Sync-Triaged

Comment 8 by derat@chromium.org, Jan 18 2017

I brought in the kevin device that's exhibiting this problem and Steven and I just took a look at it.

In the kevin's App List sync data, none of the apps that are pinned on other devices appear to have a SERVER_SPECIFICS.app_list.item_pin_ordinal or SPECIFICS.app_list.item_pin_ordinal key. Interestingly, this is also the case on another peppy device where my apps are correctly pinned.

Steven put forth the theory that perhaps the kevin device wrote its local app-list prefs when I first logged in, and before I had entered my sync passphrase. After I entered the passphrase, perhaps the local empty pinning config was synced and overwrote the real pinning config. (I'm not sure whether I logged out of the kevin device between when I logged in for the first time and when I entered the sync passphrase, but that may also be a factor.)

So, it'd be interesting to see if it's possible to repro this when a sync passphrase is configured. I'm assuming that you didn't have one when testing this, right?

Comment 9 by khmel@chromium.org, Jan 18 2017

Thanks for your update!
I could reproduce the problem. But I had to make one more step back.

In my case:

1. I created account in M52 (where pins were pref based)
2. Did some pinning in M52.
3. Used the same account on M55 (where pins are sync based). Did not modify pins made in M52. I can add new pin here for example. Pins looked good and transferred correctly (however I have to sign out/sign in for first time).
4. Move to M56. And see the problem you described.

I investigated the code and found root of the problem. The problem occurred in M55 as well due the race condition (shelf initialized earlier then sync processor attached). Normally we have the code to import legacy pins from pref based to sync based. It is planned to be executed only once. In M55 it is executed every time on sign in and this mask the problem and let pins work as expected (at least from user point of view).

In M56 we introduced sync local storage to keep app list and pins info across logins even if sync is disabled. Now we have more stable behavior and problem becomes visible. Now import executed only once as expected but.

1. At first login we have usually few apps available and based on current code we skip importing apps that are not available at the import time. It was not the problem in M55 because import did happen every time you sign  in. Now in 56 
we have only one import.
2. Information for preference may not be available during first shelf initialization. That means preferences might be in sync, during shelf initialization and don't contain required information for import.

Solving everything is quite risky. I have few prototype solution but thinking about how to simplify and reduce the risk.



Project Member

Comment 10 by bugdroid1@chromium.org, Jan 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d8cc9d23b26dc31e050fdc1e2042f639d8a608fa

commit d8cc9d23b26dc31e050fdc1e2042f639d8a608fa
Author: khmel <khmel@chromium.org>
Date: Mon Jan 23 17:33:54 2017

Fix import legacy, pref based pins.

This CL contains 2 fixes for importing legacy pref based pins.
1. Import may happen at the moment when profile is not synced yet and
in last case it does not actually contain information from previous
bulds.
2. Importing ignores apps that currently are not installed. This
leads to situation that we loose pin information for such apps
and in case apps are installed later they do not appear pinned.
Solution is to import all existings apps in prefs.

BUG= 680821 
TEST=Clearn app sync server data. Login on M52 and do some pinning.
     Next login on M55 and pin additional app. Next login to ToT
     and observe that pin is restored for existing apps and
     pins appear automatically once apps are installed later.

Review-Url: https://codereview.chromium.org/2646973003
Cr-Commit-Position: refs/heads/master@{#445398}

[modify] https://crrev.com/d8cc9d23b26dc31e050fdc1e2042f639d8a608fa/chrome/browser/ui/ash/chrome_launcher_prefs.cc
[modify] https://crrev.com/d8cc9d23b26dc31e050fdc1e2042f639d8a608fa/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
[modify] https://crrev.com/d8cc9d23b26dc31e050fdc1e2042f639d8a608fa/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h
[modify] https://crrev.com/d8cc9d23b26dc31e050fdc1e2042f639d8a608fa/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc

We probably want to merge this to 57 at least.

Comment 12 by khmel@chromium.org, Jan 23 2017

Labels: M-57 Merge-Request-56 Merge-Request-57
Yes, also it might be feasible to have it in M56, since it important to have non-breakable migration flow for shelf pins. In 55 we had this problem hidden and from user perspective it worked as expected. So, I am requesting it to merge for M56 too.
sgtm
Project Member

Comment 14 by sheriffbot@chromium.org, Jan 23 2017

Labels: -Merge-Request-56 Merge-Review-56 Hotlist-Merge-Review
This bug requires manual review: We are only 7 days from stable.
Please contact the milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), gkihumba@(cros), bustamante@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 15 by khmel@chromium.org, Jan 23 2017

Cc: keta...@chromium.org gkihumba@chromium.org
Labels: -Merge-Request-57 Merge-Approved-57
Approving merge to M57.
Project Member

Comment 17 by bugdroid1@chromium.org, Jan 24 2017

Labels: -merge-approved-57 merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/932919878abdfe3d0e0da83da1125726425949c3

commit 932919878abdfe3d0e0da83da1125726425949c3
Author: khmel <khmel@chromium.org>
Date: Tue Jan 24 01:49:22 2017

[Merge M57] Fix import legacy, pref based pins.

This CL contains 2 fixes for importing legacy pref based pins.
1. Import may happen at the moment when profile is not synced yet and
in last case it does not actually contain information from previous
bulds.
2. Importing ignores apps that currently are not installed. This
leads to situation that we loose pin information for such apps
and in case apps are installed later they do not appear pinned.
Solution is to import all existings apps in prefs.

BUG= 680821 
TEST=Clearn app sync server data. Login on M52 and do some pinning.
     Next login on M55 and pin additional app. Next login to ToT
     and observe that pin is restored for existing apps and
     pins appear automatically once apps are installed later.
TBR=stevenjb@chromium.org
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2646973003
Cr-Commit-Position: refs/heads/master@{#445398}
(cherry picked from commit d8cc9d23b26dc31e050fdc1e2042f639d8a608fa)

Review-Url: https://codereview.chromium.org/2655553002
Cr-Commit-Position: refs/branch-heads/2987@{#51}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[modify] https://crrev.com/932919878abdfe3d0e0da83da1125726425949c3/chrome/browser/ui/ash/chrome_launcher_prefs.cc
[modify] https://crrev.com/932919878abdfe3d0e0da83da1125726425949c3/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
[modify] https://crrev.com/932919878abdfe3d0e0da83da1125726425949c3/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h
[modify] https://crrev.com/932919878abdfe3d0e0da83da1125726425949c3/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc

Labels: Merge-Approved-56
Project Member

Comment 19 by bugdroid1@chromium.org, Jan 26 2017

Labels: -merge-approved-56 merge-merged-2924
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/58e7b66a0afcf4f3f1cf9db1e0012b1d56dec77c

commit 58e7b66a0afcf4f3f1cf9db1e0012b1d56dec77c
Author: khmel <khmel@chromium.org>
Date: Thu Jan 26 01:05:58 2017

[Merge M56] Fix import legacy, pref based pins.

This CL contains 2 fixes for importing legacy pref based pins.
1. Import may happen at the moment when profile is not synced yet and
in last case it does not actually contain information from previous
bulds.
2. Importing ignores apps that currently are not installed. This
leads to situation that we loose pin information for such apps
and in case apps are installed later they do not appear pinned.
Solution is to import all existings apps in prefs.

BUG= 680821 
TEST=Clearn app sync server data. Login on M52 and do some pinning.
     Next login on M55 and pin additional app. Next login to ToT
     and observe that pin is restored for existing apps and
     pins appear automatically once apps are installed later.
TBR=stevenjb@chromium.org
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2646973003
Cr-Commit-Position: refs/heads/master@{#445398}
(cherry picked from commit d8cc9d23b26dc31e050fdc1e2042f639d8a608fa)

Review-Url: https://codereview.chromium.org/2655563002
Cr-Commit-Position: refs/branch-heads/2924@{#873}
Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059}

[modify] https://crrev.com/58e7b66a0afcf4f3f1cf9db1e0012b1d56dec77c/chrome/browser/ui/ash/chrome_launcher_prefs.cc
[modify] https://crrev.com/58e7b66a0afcf4f3f1cf9db1e0012b1d56dec77c/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
[modify] https://crrev.com/58e7b66a0afcf4f3f1cf9db1e0012b1d56dec77c/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h
[modify] https://crrev.com/58e7b66a0afcf4f3f1cf9db1e0012b1d56dec77c/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc

Comment 20 by khmel@chromium.org, Jan 26 2017

Labels: -Hotlist-Merge-Review -Merge-Review-56

Comment 21 by khmel@chromium.org, Jan 26 2017

Status: Fixed (was: Started)
Status: Verified (was: Fixed)
57.0.2987.85/9202.43.0

Sign in to add a comment