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

Issue 671498 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

"Showing history from this device." on all devices signed into the same account

Reported by lightlyf...@gmail.com, Dec 6 2016

Issue description

On three devices (laptops) signed into the same Gmail account, I'm seeing "Showing history from this device." on all of them, instead of "Showing history for all devices."

I started by searching cs.chromium.org for that string, poked around in the JS debugger for a bit, and ended up at https://cs.chromium.org/chromium/src/chrome/browser/history/browsing_history_service.cc?l=520, at which point I promptly tripped over C++ and the fact that ::WebHistoryQueryComplete's method signature specifies results_value, but the base::Bind() on L207 doesn't supply it. I'm not sure where the magic pixie dust is that makes this work, I wouldn't mind finding out :)

Apparently nuking the local profile and resyncing can fix this, but before I do that I want to see if anyone wants the chance to poke around and investigate a profile that may have chewed itself into an unhandled state or which may be triggering some edge case (either locally or on the sync servers), in case this kind of thing is rare (Going with the idea that breakages on internal accounts are likely generally easier to fix, if I'm seeing this issue, perhaps it's something obscure.)

This is occurring on the same account as the one used to file this bug, if there's anything you can check remotely. I imagine there are restrictions on viewing account data; I'm happy to approve access requests.

The only thing I can think of is that I'm using the /dev sync servers, and that I may have been using the non-dev servers in the past...? Slackware Linux builds from the developer branch.

As an aside, some UX considerations: my local profile (which I've had for a while) is variously 600MB-1GB across the devices in question, and I have 200MB+ of extensions installed along with 150MB of sync data. So I'd need to redownload this three times (just under 1GB) if I nuked everything, and I have relatively limited monthly bandwidth. There's also the fact that I have a few hundred MB of LocalStorage and IndexedDB data I'll lose (and eventually redownload), along with obvious stuff like cookie state (nooo, all my logins!).



ENVIRONMENT and STATS

All the sync dumps make this text too long, so I've put them here:

https://drive.google.com/open?id=0Bw8_6kSINYxDLTlkUUg4a1l2d2c

https://drive.google.com/open?id=0Bw8_6kSINYxDLVBCdDhnQzU0TWM

https://drive.google.com/open?id=0Bw8_6kSINYxDNzl5bzBfWEx1OWM

I can paste them in as separate comments if you like.

NOTE that I've abbreviated the sync client IDs, for what it's worth; none of the other nodes said '"sensitive": true' so I left them alone.

Also, on the last machine (which only has 2GB RAM) attempting a text dump crashed the tab; further attempts retrieved status, but not the notification list (which was 'undefined') or the log (which was an empty array). Alternative suggestions to retrieve this info if it would be helpful are welcome.

As for the rest of the sections in the ticket template, I think I've answered everything I can above.
 

Comment 1 by s...@chromium.org, Dec 6 2016

Status: WontFix (was: New)
So base::Bind returns a base::Callback that is currying the given arguments, and in this case still needs a history::WebHistoryService::Request* and const base::DictionaryValue* as you mentioned. But this is exactly the typedef of QueryWebHistoryCallback that WebHistoryService::QueryHistory expects, so the Callback is passed in and then actually invoked at https://cs.chromium.org/chromium/src/components/history/core/browser/web_history_service.cc?rcl=1481026846&l=549 which is basically just the results of a remote call.

Now, how do you get base::Bind to work like this, lots of confusing templates! https://cs.chromium.org/chromium/src/base/bind.h and https://cs.chromium.org/chromium/src/base/bind_internal.h would be good starting points.


As for your problem of not getting history synced between devices, unfortunately this is working as intended, at least for now. I'm pretty confident what's going on is that you have custom passphrase enabled, as shown by your sync dumps. If you look at https://support.google.com/chrome/answer/1181035 , you can see we try to call this out:

>> Your history won't sync across devices. Web addresses that you type in the address bar in Chrome will still sync.

What's going on is that "history" works a little differently than most datatypes. Your clients don't proactively download remote devices' history because we were worried (this decision was made a long time ago) it would be too much data/bandwidth/memory. It is unclear if this calculation still holds true for many Chrome users. Instead it is fetched on demand. Unfortunately, the way this is implemented, it doesn't work if you have a custom passphrase enabled.

But wait, you must be thinking, I didn't enable passphrases recently! But this string changed recently (at least I'm assuming you noticed this recently). Looking at your sync dumps

        {
          "is_valid": true,
          "stat_name": "Passphrase Time",
          "stat_value": "Monday, October 26, 2015 at 9:39:01 PM"
        }

That was just over a year ago when you enabled a custom passphrase. Now, I don't know the details of how the remote call for history works exactly, but how close to exactly 1 year is super suspicious. It would explain this behavior if anything over 1 year is excluded, at least from the default/first query. And so you used to get a tiny bit of stale history, but now you get no results, and so the UI text changed.


Okay, so next steps. Nuking local profile isn't going to change this. Instead you'd need to remove the custom passphrase, see https://support.google.com/chrome/answer/6386691?hl=en . Your clients will resync and use bandwidth to do this, on the order of 1-10 KB per sync entry, and you have 43183 entries. The first client to connect will upload this amount, and then the subsequent devices to connect will download this amount. Hopefully all merging goes through perfectly and we don't do anything unnecessarily. Though, your dumps show you have 27615 bookmarks, this seems like a lot to naturally accumulate. There might have been some old duplication bugs that bloated your data before they were fixed.

Alternatively, you were not actually using history sync for the last year, maybe you don't really need it. Open tabs should still be syncing for you. You could leave things as is.

I'm not going to create a follow up bug to try to be more correct this UI to more clearly reflect what's happening. The history page has actually received a big material design refresh, and the people doing this decided to remove this text. So we don't have this "problem" going forward.

Lastly, we on the Sync team strive to keep feature parity for all users, including the custom passphrase use case. We're not happy with this limitation that history sync doesn't work if you've enabled custom passphrases. I'm not sure how we want to address this, and it definitely won't be in the short term, but I hope that one day this will just work.
_Wow_. For a WontFix, the explanation you've provided is absolutely awesome, thanks so much for taking the time.

Regarding the C++ explanations, I'm trying my best to catch everything as it flies over my head :) but I sorta get it. At least I now know where the result was being generated - from code in a file in a totally different directory to the one I was in. :D

Regarding "will it use too many resources," this sounds like the perfect thing to throw telemetry at! I can see rearchitecting the entirety of the history subsystem just to test how well it would work being a bit crazy, maybe you could just generate garbage data that produces a similar resource load profile and see how well that works across the board.

I see chrome://history periodically reloads every few seconds, and if that's due to poll results coming in, I can see push working a whole lot better in terms of server resources (unless Chrome keeps so many connections open keepalive has a chance to help out).

One other thing I will say is that chrome://history could do with an overhaul, if I'm typing or about to click a link when it decides to reload, that kinda falls neatly into the "arg, the webpage moved while I was trying to use it" category. The yellow update flashes in chrome://sync-internals come to mind as inspiration for a possible redesign (with the base idea being that the page pulls in new results without needing to reload). I can report a separate bug to track this if you like.

*Sighs* so it was my passphrase :D hah. I've been using one for a while now, I think I set it immediately after setting sync up actually. But now I think about it, I just checked my alt profile (recently discovered the usefulness of multiple Chrome profiles!) and found it _doesn't_ use a custom passphrase... so yeah, I think that's where I saw the "showing history from all devices" thing; in any case I also opened things from my history I *know* I'd visited on other machines from *that* account, so that's clearly where the confusion came from.

As for my bandwidth considerations, I actually have 50GB/mo, but it disappears so quickly due to today's bloated interpretations of "how to even HTML5" (even with an ad-blocking hosts file!). I was considering users with even less bandwidth when I wrote that - I was trying to come up with an actionable use-case to justify fixing this.

Regarding the chrome://md-history redesign, I am mildly freaked out by the news that the indication is gone - as you said, you do try to call out the fact that a CUSTOM_PASSPHRASE disables history storage, but IMHO this is information that needs to be inside Chrome itself, perhaps even inside the chrome://settings/syncSetup modal. I'll admit I clicked the link, but didn't exactly read it, hah.

I cannot provide enough encouragement that (even brief) consideration be given to the fact that once this is removed, users will have no measurable metric of why "my history syncs but yours doesn't" (in the example of two people comparing devices side-by-side and trying to figure it out). From a human perspective, the kind of user who will enable a custom passphrase is also the nervous, flighty, and frequently kooky type, prone to superstition and loud screeching (in the Chrome forums) about their conspiracy theories; the poor moderators of that place already have a morbidly hilarious job on their hands, it doesn't need to be made worse... :P

In any case, I'm really glad to hear this will (eventually) be fixed - telemetry could make for an interesting start, if at least to get over the inertia of how things have been done for the past however long.

Finally, regarding my bookmarks, I actually do have that many (26,432); I constantly go "you know I read something about this that one time..." so I try to keep a vague idea of where everything is. Sadly the extension I use (Better Bookmark) is very buggy and has caused some duplication (not sure exactly how - may have been race conditions, Chrome is swapping at least 40% of the time on my systems); writing a better bookmark manager has been on the todo list for a while, but I'm not sure exactly how/where to start with fixing it, hilariously.

Sign in to add a comment