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

Issue 702604 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug


Show other hotlists

Hotlists containing this issue:
Hotlist-1


Sign in to add a comment

Tabs from other devices are lost after remote browser close.

Reported by ase...@yandex-team.ru, Mar 17 2017

Issue description

ENVIRONMENT:
Client 1: Mac OS 10.12.3, chrome 56.0.2924.87 (official build) x64
Client 2: Win 10, chrome 57.0.2987.110 (official build) x64

REPRO STEPS:
Create 2 profiles on Client 1. Open browser only for first profile and turn on sync. Turn on sync on client 2. Open tabs on both clients and wait until tabs are shown on "Tabs from other device" page. Close browser on client 1 by clicking on "cross button".

ACTUAL RESULTS
Sometimes other device tabs list becomes empty on Client 2 (Win). This means that Client 1 sends tabs closing events to sync. This shouldn't happen because tabs has been saved by session service. And tabs are restored if we open first profile on client 1.

EXPECTED RESULTS
Tabs list on other devices shouldn’t be cleared because they are stored by session service.

ADDITIONAL INFO
This problem is not always reproduced due to the following:
- races during browser shutdown and sync shutdown.
- sync subsystem sends data in a certain period of time depending on settings
 
Important note: We have to specify "On startup" setting to "Continue where you left off" on both clients.

Comment 2 by s...@chromium.org, Mar 17 2017

Cc: zea@chromium.org s...@chromium.org ew...@chromium.org

Comment 3 by ew...@chromium.org, Mar 17 2017

Closing a profile on machine A shouldn't affect the tabs in the list of open tabs on machine B, should it? Nicolas/Sky - is this just a bug? Or is it WAI that we only show currently open profiles' tabs?

Comment 4 by s...@chromium.org, Mar 17 2017

I'm not sure, it seems quite ambiguous to me. At first I was worried it was kind of bad that we might leave tabs open after a browser/profile is closed, especially if their "On startup" setting is "Open the New Tab page" or "Open a specific page of set of pages." Like maybe the user intends to perform a lazy/poor mans version of clear browsing data. And not closing these tabs would be unexpected and betray the user's intention.

But the more I think about this, never committing the tab closures until the profile/chrome is started back up seems like the most useful. Obviously is gives more power to restoring foreign tabs, but it also kind of acts as a recently closed tabs section for remote data (in this small use case slice). If the user really wanted to clear the fact that they've visited these tabs, they should clear their history after they close the tabs, I think.

I added some caution on the CL that preceded this bug, https://codereview.chromium.org/2750163003/ , to check the "On startup" setting, but the more I think about this, I don't think we should check the pref.

Curious to hear what zea thinks as well. This might also make it more possible to get into odd sessions states with re-used window/tab ids, as more sync data is persisted through closing the browser. Hopefully your current sessions code handles it correctly.

Comment 5 by ew...@chromium.org, Mar 17 2017

Yeah, it's an interesting question. My intuition is that, from a desired behavior perspective, we shouldn't treat closing a window/browser/profile as closing each tab individually in that window/browser/profile.

My question was also: do we know what the *currently intended* behavior is (regardless of what it's actually doing?) Have we ever thought about this question before?

Nicolas - what are your thoughts?
Components: Privacy

Comment 7 by zea@chromium.org, Jan 4 2018

Apologies for the delay, hadn't seen this bug till now. For the record, we in the past chose to treat browser closure as different from window/tab closure, since there can be many reasons to close a browser that are unrelated to closing the tabs on that browser.

So I'd agree that that is a bug.

Comment 8 by s...@chromium.org, Jan 4 2018

After talking with zea@, it seems unclear what the correct behavior should be when you close the last window for a profile, but Chrome itself stays open, such as when you have multiple profilers or are on OSX. Especailly for the case where you don't have session restore on.

In general though, the current behavior is inherently racey, are we going to get a commit POST off to he server before Chrome's shutdown completes? And it is very inconstent with how sessions restore works. This makes me think, as well, this is something we should change.

Comment 9 by ew...@chromium.org, Jan 4 2018

Ah, that all makes sense. Should we just say that when Chrome is shutdown, we treat it differently than closing a window or tab? In the specific cases you mentioned (last window of a profile or closing last window on OSX), I think we'd just treat it like a regular window close (i.e. close out the tabs on the server as well).
Labels: SyncHandoff2018
Cc: mastiz@chromium.org
Status: Available (was: New)
This bug slipped through the filters of the new Chrome Sync team, sorry for the delay.

Mikel, could you PTAL as this is closely related to SESSIONS you've worked on. Did the USS transition make the bug easier to fix?

Sign in to add a comment