Closed Bug 1787975 Opened 2 years ago Closed 2 years ago

Tab pickup section in Firefox View gets stuck on "Loading" screen after adding a new device

Categories

(Firefox :: Firefox View, defect, P1)

defect

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 + fixed

People

(Reporter: vchin, Assigned: sfoster)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fidefe-2022-mr1-firefox-view])

Attachments

(3 files, 1 obsolete file)

On the initial restart after Firefox View was enabled in Nightly it took more than 10 minutes for my sync tabs to load. I updated from 8-22 Nightly to 8-29 Nightly.

There was internet connection the whole time and I did try to reload the page twice. Eventually sync tabs loaded after a long time.

I've noticed this happening again after the inital sync as well. (probably during a time triggered refresh?)

I get a "Try again button" now but pressing it doesn't do anything.

@Sam - This one sounds familiar. Are we already tracking this bug elsewhere?

Flags: needinfo?(sfoster)

Also adding Janet to the thread for visibility.

(In reply to Ray Fambro from comment #2)

@Sam - This one sounds familiar. Are we already tracking this bug elsewhere?

We've made a few changes in bug 1784085 and bug 1784244 already (those fixes postdate Vicky's issues and I think would have helped with at least the problem in comment #1), and are waiting for bug 1784294 to land (which I think will help with the issue in comment #0.

I'll add this into JIRA and mark this as depending on Niklas' work in 1784294 and then we can revisit once that is in Nightly and see if Vicky is still seeing the same thing.

Blocks: firefox-view
Depends on: 1784294
Flags: needinfo?(sfoster)
Whiteboard: [fidefe-2022-mr1-firefox-view]
Severity: -- → S2
Priority: -- → P1

Vicky, after updating to today's nightly, are you still seeing this?

Flags: needinfo?(vchin)

Unfortunately yes. I'm on 106.0a1 (2022-09-02) and restarted 34 minutes ago and still no sync tabs (spinner still going).

Flags: needinfo?(vchin)

Vicky, do you have the about:sync extension installed? https://addons.mozilla.org/en-US/firefox/addon/about-sync/ (if you don't have it yet).

If you look at about:sync - you can see what data is pulled in and if your recent tabs have made it to the server / desktop. Also about:sync-log will let you look for any error logs.

Flags: needinfo?(vchin)

In addition to what Janet said, do any errors appear in the browser console when opening fxview (or shortly after)?

I installed the extension and will give it a try again.

FWIW, I just updated on my Windows laptop and the sync tabs showed up fairly quickly. However, it's on MacOS where I've been experiencing this issues so I'll give that a try over the weekend and report back.

It loads up quite quickly after a restart now!

Flags: needinfo?(vchin)
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME

I am able to reproduce it constantly using the following steps:

  1. Be signed in to sync on nightly
  2. Add a device via QR or via email (the issue is reproducible in both ways)

ER: The “Tab pickup” sync is loading fast (~5 seconds)

AR: The “Tab pickup” sync is stuck in loading for about ~30 min

Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---

Thanks for confirming this Maria - can you try to grab some sync logs for us (see comment #7), please.

Flags: needinfo?(maria.berlinger)
Summary: Sync tabs take a long time to load → Tab pickup section in Firefox View gets stuck on "Loading" screen after adding a new device
Assignee: nobody → sfoster

Here's what I think is going on here:
We show that "Sit tight while your tabs sync" state when the services.sync.lastTabFetch pref shows the last data we have is stale (more than 30 seconds old).
After signing in or adding a device, it will in fact take about 30 seconds to get new data from syncing devices. I believe that is expected, but we decided previously that if there was tab data we could show in the meantime, we should do that. That is what isn't working.

When we do eventually get the weave:service:sync:finish notification, both that lastTabFetch and the services.sync.tabs.changed prefs are updated and the setup state conditions are re-evaluated and we finally advance past the 'Sit tight' state to see the synced tabs.

So I think the solution is to make sure that synced-tabs-not-ready state can exit if we have synced tabs data we can show.
The workaround to use the FxA menu "Sync now" item forces a full sync (not just tabs), so while that does work to get a faster result, I don't think we should be doing that from fx-view?

Can you fact-check :mark?

Flags: needinfo?(markh)

(In reply to Sam Foster [:sfoster] (he/him) from comment #13)

After signing in or adding a device, it will in fact take about 30 seconds to get new data from syncing devices. I believe that is expected, but we decided previously that if there was tab data we could show in the meantime, we should do that. That is what isn't working.

It is expected that tabs should sync before things like history - so 30 seconds should be close to the upper limit I'd expect. 30 minutes is extreme and I'd really like to better understand what's going on there, but I'm yet to see any sync logs.

So I think the solution is to make sure that synced-tabs-not-ready state can exit if we have synced tabs data we can show.

I think it's true that in all contexts (eg, like the error states we've previously discussed), possibly stale tabs is better than no tabs. Obviously you can have requested a sync before showing the stale tabs and refresh them once the new ones appear, but I can't see why you wouldn't show what you have in the mean time.

The workaround to use the FxA menu "Sync now" item forces a full sync (not just tabs), so while that does work to get a faster result, I don't think we should be doing that from fx-view?

If that's true, then something else is going wrong. There's no scenario I can think of where doing a full "sync now" delivers tabs faster than asking for them via SyncedTabs.syncTabs(). Logs would probably explain what's going on.

Flags: needinfo?(markh)
See Also: → 1789885

Hello,
Attaching the sync logs.

Flags: needinfo?(maria.berlinger)

Thanks. We probably need all your logs though, and sorry I wasn't clear. That log has:

Sync completed at 2022-09-09 14:50:06 after 6.06 secs.

So that's not the problematic one :) https://addons.mozilla.org/en-US/firefox/addon/about-sync/ is an addon which can zip up your log files - so it would be great if you could install that, reproduce the problem, then attach the log zip. Or attach all the logs in the weave/logs directory under your profile.

  • dispatch an event from TabPickupList when we get recent tabs data from SyncedTabs.jsm
  • and forward that along to TabsSetupFlowManager, where we can use it in the 'synced-tabs-not-ready' exitConditions to pass through the loading/waiting state as soon as we have something to show

Comment on attachment 9294028 [details]
Bug 1787975 - Advance through the synced-tabs-not-ready state when recent synced tabs data has been received. r?Gijs!

Revision D156997 was moved to bug 1789885. Setting attachment 9294028 [details] to obsolete.

Attachment #9294028 - Attachment is obsolete: true

Bug 1789885 was resolved late last week, which I believe should also have fixed this bug :mberlinger, :vchin Can either of you still reproduce this issue with a recent nightly?

Flags: needinfo?(vchin)
Flags: needinfo?(maria.berlinger)

I haven't been able to reproduce since updating to the most recent nightly.

Flags: needinfo?(vchin)

Hello,
Sorry for the delay.
I have just tried to reproduce this again using the latest Nightly 107.0a1 (2022-09-21).
I have noticed the following:

  • Signing in to sync on a mobile device via QR or email, the "Loading" screen is no longer displayed
  • The "Nothing to see yet" message is displayed when connecting via QR code, even if the mobile device has tabs opened. The tabs opened on the mobile device are displayed after reloading one of the opened pages and hitting multiple times the "Sync now" option on both mobile and desktop.
  • When connecting via email, the opened tabs from the mobile device are displayed in ~1 min.
Flags: needinfo?(maria.berlinger)

(In reply to Maria Berlinger [:mberlinger], Services QA from comment #21)

Hello,
Sorry for the delay.
I have just tried to reproduce this again using the latest Nightly 107.0a1 (2022-09-21).
I have noticed the following:

  • Signing in to sync on a mobile device via QR or email, the "Loading" screen is no longer displayed

Great! Between this and Vicky's confirmation, I'm going to close this out.

  • The "Nothing to see yet" message is displayed when connecting via QR code, even if the mobile device has tabs opened. The tabs opened on the mobile device are displayed after reloading one of the opened pages and hitting multiple times the "Sync now" option on both mobile and desktop.

This is also surfaced in a recent demo to product folks. I think there is some race between when sync happens and when the tabs appear, and we may want to specialcase the situation where a second device has only just been connected. Please can you file a follow-up bug for this and CC :markh, :skhamis, :sfoster and me?

Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Flags: needinfo?(maria.berlinger)
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
Flags: needinfo?(maria.berlinger)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: