status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.91k stars 984 forks source link

The required popup is not displayed on the device that is syncing with another device multiple times using seed phrase fallback #21260

Open Horupa-Olena opened 2 months ago

Horupa-Olena commented 2 months ago

Bug Report

Follow up: #21090

Reproduction

  1. Device A1 syncs with Device A.
  2. On Device A, click the 'Pair and Sync' button in the sync popup.
  3. Device A2 syncs with Device A.

Expected behavior:

A popup Sync your profile is displayed on Device A2.

Actual behavior:

A popup New device detected is displayed on Device A2. If a try sync device A3 with device A - the same result.

Video from device A2: https://github.com/user-attachments/assets/51d0310e-7524-4856-9d9f-20ecc415cf8e

Screenshots from device A after sync: photo_2024-09-12_13-02-31 photo_2024-09-12_13-02-28

Additional Information

Parveshdhull commented 1 month ago

Original report: https://github.com/status-im/status-mobile/pull/21090#issuecomment-2345820848

More details: https://github.com/status-im/status-mobile/pull/21090#issuecomment-2345841505 https://github.com/status-im/status-mobile/pull/21090#issuecomment-2346491345 https://github.com/status-im/status-mobile/pull/21090#issuecomment-2346494640 https://github.com/status-im/status-mobile/pull/21090#issuecomment-2349134620 https://github.com/status-im/status-mobile/pull/21090#issuecomment-2350002316

Parveshdhull commented 1 month ago

~Or wrong notification is fetched - https://github.com/status-im/status-mobile/pull/21090#issuecomment-2345841505~

Parveshdhull commented 1 month ago

To summarize, if the account previously used the fallback flow, then on the next recovery—whether through normal syncing or fallback—it might fetch an old pairing message. This could trigger a pair-and-sync notification which was intended for the main device from which we recovered the account

qfrank commented 1 month ago

Hi @jrainville , are you working on this? If not yet, I can help.

Parveshdhull commented 1 month ago

@qfrank, please avoid working on the issue for now

@Horupa-Olena, please update this issue once https://github.com/status-im/status-mobile/pull/21298 has been tested. I believe we have mixed two issues here:

I think these are two distinct issues. The first one might have been fixed in https://github.com/status-im/status-mobile/pull/21298#issuecomment-2371599349.

So, if only the second issue remains after https://github.com/status-im/status-mobile/pull/21298 is tested, then we can update issue accordingly and proceed.

qfrank commented 1 month ago

I'm sure there exist issue on creating notification logic on status-go side, if @jrainville is not working on it, I can help

Horupa-Olena commented 1 month ago

@qfrank @Parveshdhull Hi. I'm not finished with #21298 but can say that this issue still reproduce. Also I noticed that old notifications about sync fetched in usual restore for old account (old = account that have few tries to syncs before) flow where we use seed phrase.