Closed Bug 1789876 Opened 2 years ago Closed 2 years ago

“Tab pickup” option doesn’t show iOS device as connected to sync, after changing the password from it

Categories

(Firefox :: Firefox View, defect, P1)

defect

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- affected

People

(Reporter: mberlinger, Assigned: skhamis, NeedInfo)

References

(Blocks 1 open bug)

Details

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

Attachments

(2 files)

Precondition

  • The user is connected to sync on desktop and on iOS device;

Affected versions

  • 106.0a1 (2022-09-08)

Tested platforms

  • Affected platforms: windows 10, macOS 10.14.6
  • Unaffected platforms: Android

Steps to reproduce

  1. On the connected iOS device, access your Firefox account from the 3 dots menu;
  2. Access the “Manage account & Devices” option;
  3. From the Firefox account settings page, change the password;
  4. The user is disconnected from the desktop sync, the iOS device is still connected to sync;
  5. Reconnect to the desktop sync, with the new password;
  6. Access the Firefox view tab;
  7. Observe the “Tab pickup” option;

Expected result

  • The 3 last active tabs are displayed in ”Tab pickup” section;

Actual result

  • The “Sync Firefox on your phone or tablet” title is displayed and the user is not seen as connected on the mobile device;

Additional notes

  • This is not reproducible using Android devices since the “Manage account & Devices” option is not available in sync
  • Signing out from the mobile device and then Signing in again, the 3 last active tabs are displayed in ”Tab pickup” section;
  • Connecting the iOS device first to sync and then with the same account connecting on desktop, the 3 last active tabs are not displayed in ”Tab pickup” section;
  • Connecting an Android device first to sync and then with the same account connecting on desktop, the 3 last active tabs are displayed in ”Tab pickup” section;
Priority: -- → P2

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

  • Connecting the iOS device first to sync and then with the same account connecting on desktop, the 3 last active tabs are not displayed in ”Tab pickup” section;
  • Connecting an Android device first to sync and then with the same account connecting on desktop, the 3 last active tabs are displayed in ”Tab pickup” section;

This makes it sound to me like maybe the problem is not with desktop. Mark/Sammy, can you help?

Flags: needinfo?(skhamis)
Flags: needinfo?(markh)

(In reply to :Gijs (he/him) from comment #1)

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

  • Connecting the iOS device first to sync and then with the same account connecting on desktop, the 3 last active tabs are not displayed in ”Tab pickup” section;
  • Connecting an Android device first to sync and then with the same account connecting on desktop, the 3 last active tabs are displayed in ”Tab pickup” section;

This makes it sound to me like maybe the problem is not with desktop. Mark/Sammy, can you help?

There seems to be two issues here from what I can tell:

  1. I was able to reproduce this with Firefox Beta for iOS, but not with release (tabs show up immediately on the synced tabs menu)

  2. With both Beta & Release Firefox on iOS, I eventually see the synced tabs on the FxA avatar menu -- but Firefox View is stuck on the "Sync Firefox on your phone or tablet" and I can't seem to get out of that mode unless I restart the browser.

Using the about:sync addon for seeing what's on the server, and it looks like Beta is sometimes not pushing tabs correctly after changing the password on the device.

So I'm going to say this seems closer to an issue with iOS after changing password/signing in+out. However my (2) points there might be something in the Firefox View flow that stops the pickups from happening?

Maria, do you happen to know which iOS version you are using for testing?

Flags: needinfo?(skhamis)
Flags: needinfo?(markh)
Flags: needinfo?(maria.berlinger)

This is not reproducible using Android devices since the “Manage account & Devices” option is not available in sync

huh - I never noticed that and it seems bad - android users apparently can't change their password! I opened https://github.com/mozilla-mobile/fenix/issues/26899

The fact that Firefox View doesn't change even after the iOS device has synced tabs sounds like another manifestation of bug 1787975

Hello,
I was able to reproduce the same scenario using the following steps:

  1. Be connected to sync on desktop and mobile
  2. On desktop access the Firefox account settings page in new tab
  3. From the “Connected Services” section, sign out the desktop sync session
  4. Reconnect to sync on desktop
  5. Open the Firefox account option from toolbar and observe that the mobile device is connected to sync
  6. Go to Firefox view tab and observe the “Tab pickup” section

AR:

  • The “Sync Firefox on your phone or tablet” title is displayed and the user is not seen as connected on the mobile device;

ER:

  • The 3 last active tabs are displayed in ”Tab pickup” section from the connected mobile device;

Additional notes

  • See the attached screenshot;
  • This is reproducible for both Android and iOS mobile devices;
  • Clicking the “Sync now” doesn’t make the mobile device available in the “Tab pickup”;

Should we log a new issue for the above steps?

Attached image Firefox view.png (deleted) —
Flags: needinfo?(maria.berlinger)

Maria, do you happen to know which iOS version you are using for testing?

Hello,
I am using iOS 15.5 (iPhone 11).

@sammy - can you please follow the steps described in Comment #4 which is more desktop centric - and see if you can uncover any additional information.

Flags: needinfo?(skhamis)

Sure thing! So a couple of things here....

  1. It seems there is some errors that are produced due to Can't sync tabs due to login status: success.login which is happening due to this: https://searchfox.org/mozilla-central/source/services/sync/modules/SyncedTabs.jsm#160-166
    Logs:
1662756512101	Sync.Engine.Tabs.Store	TRACE	Wrapping tab: : {"title":"Hacker News","urlHistory":["https://news.ycombinator.com/"],"icon":"https://news.ycombinator.com/favicon.ico","lastUsed":1662756509}
1662756512101	Sync.Engine.Tabs	TRACE	Outgoing: { id: QCKMBZmsCRts  index: 0  modified: undefined  ttl: 31622400  payload: {"id":"QCKMBZmsCRts","clientName":"skhamis’s Nightly on skhamis-n2q05n","tabs":[{"title":"Hacker News","urlHistory":["https://news.ycombinator.com/"],"icon":"https://news.ycombinator.com/favicon.ico","lastUsed":1662756509}]}  collection: tabs }
1662756512102	Sync.Engine.Tabs	INFO	Posting 1 records of 506 bytes with batch=true
1662756512103	FirefoxAccounts	TRACE	not checking freshness of profile as it remains recent
1662756512103	Sync.SyncAuthManager	TRACE	_ensureValidToken already has one
1662756512104	Sync.Collection	DEBUG	POST Length: 506
1662756512235	Sync.Collection	DEBUG	POST success 200 https://sync-1-us-west1-g.sync.services.mozilla.com/1.5/193500943/storage/tabs?batch=true&commit=true
1662756512236	Sync.Engine.Tabs	TRACE	Committed batch
1662756512236	Sync.Telemetry	TRACE	observed weave:engine:sync:uploaded tabs
1662756512236	Sync.Telemetry	INFO	Observed notification weave:engine:sync:uploaded but no current sync is being recorded.
1662756512236	Sync.Telemetry	TRACE	shouldSubmitForDataChange - no need to submit
1662756512237	Sync.Engine.Tabs.Tracker	TRACE	tab quick-sync done.
1662756574154	Sync.RemoteTabs	INFO	Can't sync tabs due to the login status: success.login
1662756600192	Sync.RemoteTabs	INFO	Can't sync tabs due to the login status: success.login
1662756752049	FirefoxAccounts	ERROR	Pairing channel error: Error: WebSocket unexpectedly closed(resource://gre/modules/FxAccountsPairingChannel.js:3600:20) JS Stack trace: FxAccountsPairingChannel</_setupListeners/<@FxAccountsPairingChannel.js:3600:20
1662756839820	Sync.RemoteTabs	INFO	Can't sync tabs due to the login status: success.login
1662756860938	Sync.RemoteTabs	INFO	Can't sync tabs due to the login status: success.login
1662756861063	Sync.RemoteTabs	INFO	Can't sync tabs due to the login status: success.login
  1. What :mberlinger showed is reproducible as I saw that same issue when testing the iOS changes in my comment #2. However this is definitely a Firefox View issue as :markh mentioned is a manifestation of bug #1787975 I looked at the logs and it definitely looks like they should skip through all those UI steps if there are synced tabs detected already. Which in that bug looks like there's a patch already that will probably fix it

  2. Seems like there's a bunch of errors in the beginning of signing in on desktop with the FxAccountsPairingChannel but seems unrelated (just mentioned it incase it's somewhat related):

1662758843103	Sync.RemoteTabs	INFO	_refetchTabs was done recently, do not doing it again
1662758854961	FirefoxAccounts	ERROR	Pairing channel error: Error: WebSocket unexpectedly closed(resource://gre/modules/FxAccountsPairingChannel.js:3600:20) JS Stack trace: FxAccountsPairingChannel</_setupListeners/<@FxAccountsPairingChannel.js:3600:20
EventListener.handleEvent*_setupListeners@FxAccountsPairingChannel.js:3595:18
src_PairingChannel@FxAccountsPairingChannel.js:3472:10
onFirstMessage@FxAccountsPairingChannel.js:3529:28
async*FxAccountsPairingChannel</_makePairingChannel/<@FxAccountsPairingChannel.js:3542:14
_makePairingChannel@FxAccountsPairingChannel.js:3509:12
create@FxAccountsPairingChannel.js:3488:17
start@FxAccountsPairing.jsm:200:44
async*startPairingFlow@fxaPairDevice.js:69:31
init/<@fxaPairDevice.js:37:49

Overall: This seems like a duplicate of bug #1787975

Flags: needinfo?(skhamis)
Assignee: nobody → skhamis
Status: NEW → ASSIGNED
Assignee: skhamis → nobody
Status: ASSIGNED → NEW

Sorry, in case my comment wasn't too clear -- sync seems to not be the issue in these cases and this will most likely be resolved by the patch in bug #1787975. I'll let the Firefox View team triage this as they deem appropriate.

Flags: needinfo?(gijskruitbosch+bugs)
Assignee: nobody → skhamis
Status: NEW → ASSIGNED
Pushed by mhammond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1b23cc32e5b8 Don't return early if we just recently logged in r=markh
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch

(In reply to Sammy Khamis [:skhamis] from comment #10)

Sorry, in case my comment wasn't too clear -- sync seems to not be the issue in these cases and this will most likely be resolved by the patch in bug #1787975. I'll let the Firefox View team triage this as they deem appropriate.

I'm a little confused - do you think the patch here will not do anything to resolve bug 1787975 in the end? Because my impression was that it would...

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(skhamis)

(In reply to :Gijs (he/him) from comment #13)

(In reply to Sammy Khamis [:skhamis] from comment #10)

Sorry, in case my comment wasn't too clear -- sync seems to not be the issue in these cases and this will most likely be resolved by the patch in bug #1787975. I'll let the Firefox View team triage this as they deem appropriate.

I'm a little confused - do you think the patch here will not do anything to resolve bug 1787975 in the end? Because my impression was that it would...

Hey Gijs, yes it will definitely help towards resolving Bug 1787975, but I was mentioning this wouldn't be a complete fix of comment #4 until Firefox view updates the the progression through the steps (which looks like will be fixed in: https://phabricator.services.mozilla.com/D156997). But this will definitely help make sure Firefox view can detect tabs when signing in.

Flags: needinfo?(skhamis)

Hello,
I have tried to verify this issue using Firefox beta 106.0b7. The “Sync Firefox on your phone or tablet” title is still displayed after changing the password using an iOS device. The user is still not seen as connected with the iOS device. Reopening.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

I can reproduce this and identified https://github.com/mozilla-mobile/firefox-ios/issues/12070. Can you please see if the problem goes away after force-closing then restarting the iOS browser, then doing a shift-refresh of the Firefox View page? If it does, then that issue is probably what you are seeing - if not, then there will be something else going on.

(In reply to Mark Hammond [:markh] [:mhammond] from comment #16)

I can reproduce this and identified https://github.com/mozilla-mobile/firefox-ios/issues/12070. Can you please see if the problem goes away after force-closing then restarting the iOS browser, then doing a shift-refresh of the Firefox View page? If it does, then that issue is probably what you are seeing - if not, then there will be something else going on.

+needinfo for this

Flags: needinfo?(maria.berlinger)

Hello,
I have tried to reproduce this issue https://github.com/mozilla-mobile/firefox-ios/issues/12070 .
Due to this issue 1792040 the iOS opened tabs are not displayed in the Firefox view ( the connection to Sync on iOS is made via QR or via email) even if the browser is restarted.

Flags: needinfo?(maria.berlinger)

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

Due to this issue 1792040 the iOS opened tabs are not displayed in the Firefox view ( the connection to Sync on iOS is made via QR or via email) even if the browser is restarted.

To be clear, you mean the iOS browser here? This works fine for me in iOS builds with that patch applied, and it look like that will land in a day or so.

After Signing in to Sync on the iOS device, Firefox browser (by QR or by email), the opened tabs on the iOS device are not displayed in the Firefox desktop browser, Firefox view tab.

Severity: S3 → S2
Priority: P2 → P1
Severity: S2 → S3

Maria - can you please retest with a version of iOS that has this fix? https://github.com/mozilla-mobile/firefox-ios/pull/12087 it was merged 3 days ago - planned for 107.

Flags: needinfo?(maria.berlinger)

Hello,
I have tried again using the latest beta 107.0b1 on both desktop and ios. After changing the password from the ios device, both desktop and ios are disconnected from sync, is this the intended behavior?

Note: After reconnecting to sync on both devices, I am unable to see the tabs from the ios device due to this issue 1792040

Flags: needinfo?(maria.berlinger) → needinfo?(jdragojevic)

Note: After reconnecting to sync on both devices, I am unable to see the tabs from the ios device due to this issue 1792040

Hey Maria, I don't have access to the v107 Beta yet but I just tested this locally from the main branch of firefox-ios. On the iOS device where you've changed your password, you shouldn't be signed out. You should be disconnected from desktop until you sign back in with the new password.

Also, does signing in with email instead of the QR code work?

Flags: needinfo?(maria.berlinger)

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

I have tried again using the latest beta 107.0b1 on both desktop and ios. After changing the password from the ios device, both desktop and ios are disconnected from sync, is this the intended behavior?

I did manage the reproduce this once via email, but failed to repro it later. I suspect there's some specific path that causes this that I found once.

(In reply to Lougenia Bailey from comment #23)

Also, does signing in with email instead of the QR code work?

But this is only relevant once the issue reproduces, right? ie, it shouldn't be necessary to sign in on the iOS device by either email or qr code, because that's the device where the password was changed.

But this is only relevant once the issue reproduces, right? ie, it shouldn't be necessary to sign in on the iOS device by either email or qr code, because that's the device where the password was changed.

No it shouldn't be necessary to sign back in on iOS, and I haven't been able to reproduce this. Even before the fix when I changed my password on the iOS device I stayed signed in. That was also what I experienced this morning when I tested this locally from the main branch. I only asked about testing with email because there may be two separate issues here: one related to the FxA flow (which is causing the iOS device to be signed out) and the other that (hopefully) was resolved with iOS #12087.

Thank you so much to everyone helping to troubleshoot this issue. Do we feel confident in coming to a resolution before week's end to be able to uplift this fix for 107?

(In reply to Ray Fambro from comment #26)

Thank you so much to everyone helping to troubleshoot this issue. Do we feel confident in coming to a resolution before week's end to be able to uplift this fix for 107?

I'm fairly confident that any iOS specific issues which remain here will not require changes to desktop but instead to the iOS repo.

(In reply to Lougenia Bailey from comment #23)

Note: After reconnecting to sync on both devices, I am unable to see the tabs from the ios device due to this issue 1792040

Hey Maria, I don't have access to the v107 Beta yet but I just tested this locally from the main branch of firefox-ios. On the iOS device where you've changed your password, you shouldn't be signed out. You should be disconnected from desktop until you sign back in with the new password.

Also, does signing in with email instead of the QR code work?

Hello Lougenia,
We have tried again using the latest beta 107.0b2 on desktop and 107(20522) on ios.
After changing the password from the ios device and logging back in on desktop (this time the ios device wasn't disconnected from sync), the "Sync Firefox on your phone or tablet" message was displayed in the Tab pickup section.
After restarting the Firefox browser on desktop, refreshing a page on ios and then performing a manual sync, the tabs from the ios device are displayed.

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

There is a quite a few moving parts in this bug and the Sync portions have been fixed. While we will still help where we can and identify areas in the Sync code we need to fix, I feel this will need to be closed & split into their respective categories.

Firefox View:

iOS:

If we feel different about this, lets reopen and discuss. Thanks!

Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED

Ni me to don't forget to mark this as verified, when the other 2 separate issues are fixed.

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: