Closed Bug 1378407 Opened 8 years ago Closed 8 years ago

Wrong device name shows as sender of sent tabs

Categories

(Firefox for iOS :: Firefox Accounts, defect, P1)

Other
iOS
defect

Tracking

()

VERIFIED FIXED
Tracking Status
fxios 8.0+ ---

People

(Reporter: jhugman, Assigned: st3fan)

Details

(Whiteboard: [MobileCore])

Attachments

(1 file)

While testing iOS receiving send tabs via WebPush, it's seen that the id of the sender of the displayURI command { command: displayURI args : [ uri, senderId, uriTitle ] } The sender often does not correspond to the device that actually sent the tab. This is most often seen in sync fest environments, but dependent on the order in which devices (incl. desktop) were connected to the account. STR: 1. Connect 3 or more devices to the same account. 2. Start to send tabs between them. Observed: Device A sends a tab to Device B. Device B displays that Device C send it. Expected: Device B displays that Device A sent the tab. This has certainly been observed from Desktop to iOS, displaying both different desktop and different iOS devices in error, on the iOS device. I haven't attempted to reproduce on Android. This became apparent after Bug 1373204 was implemented.
It would appear that the wrong senderId is being sent to the iOS device. Suspect that there's a mixup someplace else in the system. (is iOS's client record correct? is the sender sending its own id correctly?)
Flags: needinfo?(rfeeley)
I'm able to reproduce this issue 100% following this steps: 1. With a newly created FxA, sign in to sync on: - Desktop - OSx 10.12.5 / Nightly 56.0a1 (2017-07-05) - iPhone 6 Plus - iOS 10.3.2 / Firefox Beta 8.0 (4383) 2. Send a tab from desktop to iOS 3. Check the notification received in iOS Result: The notification displays: "Tab received from Firefox Beta on "iOS Device name"" when it should display "Tab received from Nightly on "Desktop name""
I have also seen this: "Tab received from Nightly on "Wrong Desktop name"", and "Tab received from Firefox Beta on "Different iOS device name"" in more complicated set ups.
Priority: -- → P1
First step here is to simply log out the client records to see if we can determine where things are going wrong.
Assignee: nobody → jdarcangelo
Status: NEW → ASSIGNED
This is what I have .. this is what profile.getClients() returns: (lldb) po self.clients[0] ▿ <RemoteClient GUID: 9a1fqAmCX1E9, name: Firefox Beta on Stefan's iPhone 667, modified: 1499353635060, type: mobile, formfactor: phone, OS: iOS, version: 1.0, fxaDeviceId: 887ed818d920b6f3a65f6107c3fb9a47> ▿ guid : Optional<String> - some : "9a1fqAmCX1E9" - modified : 1499353635060 - name : "Firefox Beta on Stefan\'s iPhone 667" ▿ type : Optional<String> - some : "mobile" ▿ os : Optional<String> - some : "iOS" ▿ version : Optional<String> - some : "1.0" ▿ fxaDeviceId : Optional<String> - some : "887ed818d920b6f3a65f6107c3fb9a47" - protocols : nil - appPackage : nil - application : nil ▿ formfactor : Optional<String> - some : "phone" - device : nil (lldb) po self.clients[1] ▿ <RemoteClient GUID: ZZ4DtZS-oFIn, name: sarentz’s Firefox on Maczilla, modified: 1499353633800, type: desktop, formfactor: nil, OS: Darwin, version: 54.0.1, fxaDeviceId: ecae38cbba91a403dc660fff490e1cda> ▿ guid : Optional<String> - some : "ZZ4DtZS-oFIn" - modified : 1499353633800 - name : "sarentz’s Firefox on Maczilla" ▿ type : Optional<String> - some : "desktop" ▿ os : Optional<String> - some : "Darwin" ▿ version : Optional<String> - some : "54.0.1" ▿ fxaDeviceId : Optional<String> - some : "ecae38cbba91a403dc660fff490e1cda" - protocols : nil - appPackage : nil - application : nil - formfactor : nil - device : nil (lldb) po self.clients[2] ▿ <RemoteClient GUID: V_FD5Ay3UmIA, name: Fennec (sarentz) on Stefan’s iPod touch, modified: 1499353630710, type: mobile, formfactor: phone, OS: iOS, version: 7.5, fxaDeviceId: nil> ▿ guid : Optional<String> - some : "V_FD5Ay3UmIA" - modified : 1499353630710 - name : "Fennec (sarentz) on Stefan’s iPod touch" ▿ type : Optional<String> - some : "mobile" ▿ os : Optional<String> - some : "iOS" ▿ version : Optional<String> - some : "7.5" - fxaDeviceId : nil - protocols : nil - appPackage : nil - application : nil ▿ formfactor : Optional<String> - some : "phone" - device : nil (lldb) po self.clients[3] ▿ <RemoteClient GUID: 3oz7Ji5ptbxV, name: Fennec (sarentz) on Stefan’s iPod touch, modified: 1499353630600, type: mobile, formfactor: phone, OS: iOS, version: 8.0, fxaDeviceId: eecb36b8d0e0ca738c367a4881940066> ▿ guid : Optional<String> - some : "3oz7Ji5ptbxV" - modified : 1499353630600 - name : "Fennec (sarentz) on Stefan’s iPod touch" ▿ type : Optional<String> - some : "mobile" ▿ os : Optional<String> - some : "iOS" ▿ version : Optional<String> - some : "8.0" ▿ fxaDeviceId : Optional<String> - some : "eecb36b8d0e0ca738c367a4881940066" - protocols : nil - appPackage : nil - application : nil ▿ formfactor : Optional<String> - some : "phone" - device : nil (lldb) po self.clients[4] ▿ <RemoteClient GUID: Qds3Hj75tDTV, name: Firefox Beta on Stefan's iPhone 667, modified: 1499353630580, type: mobile, formfactor: phone, OS: iOS, version: 8.0, fxaDeviceId: 311927ab237068d58051d6add4b2efb1> ▿ guid : Optional<String> - some : "Qds3Hj75tDTV" - modified : 1499353630580 - name : "Firefox Beta on Stefan\'s iPhone 667" ▿ type : Optional<String> - some : "mobile" ▿ os : Optional<String> - some : "iOS" ▿ version : Optional<String> - some : "8.0" ▿ fxaDeviceId : Optional<String> - some : "311927ab237068d58051d6add4b2efb1" - protocols : nil - appPackage : nil - application : nil ▿ formfactor : Optional<String> - some : "phone" - device : nil (lldb) po self.clients[5] ▿ <RemoteClient GUID: nhnW6Hv766in, name: Fennec (sarentz) on Stefan’s iPod touch, modified: 1499353630550, type: mobile, formfactor: phone, OS: iOS, version: 7.5, fxaDeviceId: nil> ▿ guid : Optional<String> - some : "nhnW6Hv766in" - modified : 1499353630550 - name : "Fennec (sarentz) on Stefan’s iPod touch" ▿ type : Optional<String> - some : "mobile" ▿ os : Optional<String> - some : "iOS" ▿ version : Optional<String> - some : "7.5" - fxaDeviceId : nil - protocols : nil - appPackage : nil - application : nil ▿ formfactor : Optional<String> - some : "phone" - device : nil (lldb) po self.clients[6] ▿ <RemoteClient GUID: W7_FLFmoiMqb, name: Fennec (sarentz) on Stefan's iPhone 667, modified: 1499353583090, type: mobile, formfactor: phone, OS: iOS, version: 1.0, fxaDeviceId: 9dd90cf0d2368c67f477a6351fa1716c> ▿ guid : Optional<String> - some : "W7_FLFmoiMqb" - modified : 1499353583090 - name : "Fennec (sarentz) on Stefan\'s iPhone 667" ▿ type : Optional<String> - some : "mobile" ▿ os : Optional<String> - some : "iOS" ▿ version : Optional<String> - some : "1.0" ▿ fxaDeviceId : Optional<String> - some : "9dd90cf0d2368c67f477a6351fa1716c" - protocols : nil - appPackage : nil - application : nil ▿ formfactor : Optional<String> - some : "phone" - device : nil
For your desktop, does "ZZ4DtZS-oFIn" match the `services.sync.client.GUID` pref in about:config?
Flags: needinfo?(sarentz)
Kit, yes it does.
Flags: needinfo?(sarentz)
I have a reproducible case for this bug. This looks like it is an iOS client bug: - Sent myself a tab from Desktop, which has GUID hzRvPh_Qvfhe - On iOS I receive a client command: - name: "displayURI" - args: ["https://github.com/mmcloughlin/globe" "hzRvPh_Qvfhe" "GitHub - mmcloughlin/globe: Globe wireframe visualizations in Golang"] - In About SYnc I see that hzRvPh_Qvfhe corresponds to "sarentz's Firefox on Risa" The notification title is wrapped on iOS but it starts with "Tab received from Fennec (sarentz)" so clearly the lookup is not correct. Dumping all the client records on iOS, I see this: - <RemoteClient GUID: AK3QCFtv9iqj, name: Fennec (sarentz) on iPhone 6 Plus, modified: 1499441381010, type: mobile, formfactor: phone, OS: iOS, version: 8.0, fxaDeviceId: 225dace7205d1ff3d3daaf91b54148b3> - <RemoteClient GUID: hzRvPh_Qvfhe, name: sarentz’s Firefox on Risa, modified: 1499440341060, type: desktop, formfactor: nil, OS: Darwin, version: 54.0.1, fxaDeviceId: 0a67d72f2062d5dbf1cb40d0589f7651> Which is also expected. Looks like a bug in the code where we try to find the device name on our side.
This patch correctly implements getClientWithId so that it will actually look for a client with the requested GUID.
Attachment #8884337 - Flags: review?(rnewman)
Attachment #8884337 - Flags: review?(rnewman) → review+
Landed on both master and v8.x
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Whiteboard: [MobileCore]
Assignee: jdarcangelo → sarentz
I'm no longer able to reproduce this issue. Tested on Beta 8.0 (4467)
Status: RESOLVED → VERIFIED
Flags: needinfo?(rfeeley)
This was only landed on v8.x and not master. I just fixed that.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: