Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test status go 5925 #22011

Closed
wants to merge 1 commit into from
Closed

Test status go 5925 #22011

wants to merge 1 commit into from

Conversation

pavloburykh
Copy link
Contributor

@pavloburykh pavloburykh commented Feb 3, 2025

Created to test status-im/status-go#5925

Should fix #18096

@status-im-auto
Copy link
Member

status-im-auto commented Feb 3, 2025

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ a81151b #1 2025-02-03 11:17:10 ~6 min tests 📄log
✔️ a81151b #1 2025-02-03 11:18:49 ~7 min android-e2e 🤖apk 📲
✔️ a81151b #1 2025-02-03 11:22:15 ~11 min android 🤖apk 📲
✔️ a81151b #1 2025-02-03 11:24:04 ~13 min ios 📱ipa 📲

@pavloburykh pavloburykh self-assigned this Feb 3, 2025
@status-im-auto
Copy link
Member

95% of end-end tests have passed

Total executed tests: 59
Failed tests: 2
Expected to fail tests: 1
Passed tests: 56
IDs of failed tests: 741054,741555 
IDs of expected to fail tests: 702844 

Failed tests (2)

Click to expand
  • Rerun failed tests

  • Class TestFallbackMultipleDevice:

    1. test_fallback_add_key_pair, id: 741054

    Device 1: Swiping left on element Button
    Device 1: Find `Button` by `xpath`: `//android.view.ViewGroup[contains(@content-desc,'Imported account')]`

    critical/test_fallback.py:212: in test_fallback_add_key_pair
        wallet_1.get_account_element(account_name=imported_key_pair_account_name).swipe_left_on_element()
    ../views/base_element.py:281: in swipe_left_on_element
        location, size = self.get_element_coordinates()
    ../views/base_element.py:274: in get_element_coordinates
        element = self.find_element()
    ../views/base_element.py:78: in find_element
        raise NoSuchElementException(
     Device 1: Button by xpath: `//android.view.ViewGroup[contains(@content-desc,'Imported account')]` is not found on the screen; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
    



    Class TestWalletOneDevice:

    1. test_wallet_swap_flow_mainnet, id: 741555

    Device 1: Swiping right on element SlideButton
    Device 1: Find SlideButton by xpath: //*[@resource-id='slide-button-track']

    critical/test_wallet.py:430: in test_wallet_swap_flow_mainnet
        self.errors.verify_no_errors()
    base_test_case.py:179: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Device 1: Mainnet: Spending cap is not shown on the 'Set Spending Cap' screen
    E    Device 1: Mainnet: Text Account 1 is not shown for the account on the 'Set Spending Cap' screen
    E    Device 1: Mainnet: Text 0x83d...49e is not shown for the account on the 'Set Spending Cap' screen
    E    Device 1: Mainnet: Token is not shown on the 'Set Spending Cap' screen
    E    Device 1: Mainnet: Spender contract info is missing on the 'Set Spending Cap' screen
    E    Device 1: Mainnet: Network is not shown on the 'Set Spending Cap' screen
    E    Device 1: Mainnet: can't sign swap
    



    Expected to fail tests (1)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844

    Device 2: Find EmojisNumber by xpath: //*[starts-with(@text,'https://m.youtube.com/watch?v=Je7yErjEVt4')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']/../..//*[@content-desc='emoji-reaction-4']/android.widget.TextView[2]
    Device 2: Element EmojisNumber text is equal to 1

    critical/chats/test_public_chat_browsing.py:662: in test_community_links_with_previews_github_youtube_twitter_gif_send_enable
        self.errors.verify_no_errors()
    base_test_case.py:179: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Device 1: No preview is loaded for url https://youtu.be/Je7yErjEVt4
    E    Device 1: No preview is loaded for url https://www.youtube.com/watch?v=XN-SVmuJH2g&list=PLbrz7IuP1hrgNtYe9g6YHwHO6F3OqNMao
    E    Device 1: No preview is loaded for url https://m.youtube.com/watch?v=Je7yErjEVt4 
    

    [[Youtube links preview is not loaded on LambdaTest emulators, needs investigation]]

    Device sessions

    Passed tests (56)

    Click to expand

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    2. test_add_contact_field_validation, id: 702777
    Device sessions

    3. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    Class TestFallbackMultipleDevice:

    1. test_fallback_with_correct_seed_phrase, id: 740221
    2. test_fallback_sync_with_error, id: 740220
    3. test_fallback_validate_seed_phrase, id: 740222

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    2. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    3. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    4. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    5. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    6. test_1_1_chat_edit_message, id: 702855
    Device sessions

    7. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    8. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    2. test_community_mute_community_and_channel, id: 703382
    Device sessions

    3. test_restore_multiaccount_with_waku_backup_remove_profile_switch, id: 703133
    Device sessions

    4. test_community_undo_delete_message, id: 702869
    Device sessions

    5. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    6. test_community_discovery, id: 703503
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:

    1. test_1_1_chat_mute_chat, id: 703496
    Device sessions

    2. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    3. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    Class TestActivityMultipleDevicePRTwo:

    1. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    2. test_activity_center_mentions, id: 702957
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    2. test_group_chat_mute_chat, id: 703495
    Device sessions

    3. test_group_chat_pin_messages, id: 702732
    Device sessions

    4. test_group_chat_reactions, id: 703202
    Device sessions

    5. test_group_chat_offline_pn, id: 702808
    Device sessions

    6. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    2. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    3. test_community_one_image_send_reply, id: 702859
    Device sessions

    4. test_community_message_edit, id: 702843
    Device sessions

    5. test_community_several_images_send_reply, id: 703194
    Device sessions

    6. test_community_message_delete, id: 702839
    Device sessions

    7. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    8. test_community_unread_messages_badge, id: 702841
    Device sessions

    9. test_community_edit_delete_message_when_offline, id: 704615
    Device sessions

    10. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230
    2. test_wallet_send_eth, id: 727229

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    Class TestDeepLinksOneDevice:

    1. test_links_deep_links_profile, id: 702775
    Device sessions

    2. test_deep_links_communities, id: 739307
    Device sessions

    3. test_links_open_universal_links_from_chat, id: 704613
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_send_flow_mainnet, id: 741554
    2. test_wallet_bridge_flow_mainnet, id: 741612
    3. test_wallet_balance_mainnet, id: 740490
    4. test_wallet_add_remove_regular_account, id: 727231

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_mentions_push_notification, id: 702786
    Device sessions

    2. test_community_join_when_node_owner_offline, id: 703629
    Device sessions

    3. test_community_hashtag_links_to_community_channels, id: 702948
    Device sessions

    4. test_community_markdown_support, id: 702809
    Device sessions

    5. test_community_leave, id: 702845
    Device sessions

    @pavloburykh
    Copy link
    Contributor Author

    pavloburykh commented Feb 3, 2025

    @saledjenic thanks for the PR. Please take a look at the issues below.

    ISSUE 1 Incoming pending contact request appears from removed/blocked contacts after restore

    Steps:

    1. Create User A
    2. Add User B as a contact of User A
    3. Backup User A
    4. Remove/Block User B from User's A contact list
    5. Backup User A
    6. Restore User A from scratch
    7. Observe the result

    Actual result: incoming pending request from removed User B appears in activity center of User A.

    Status-debug-logs - 2025-02-03T152606.554.zip

    telegram-cloud-document-2-5262711513273098984.mp4

    @pavloburykh
    Copy link
    Contributor Author

    ISSUE 2 Blocking restored contact results in incoming pending contact request from this contact

    this issue is most likely related to the above ISSUE 1 and probably has the same rootcause. Logging it separately just in case.

    Steps:

    1. Create User A
    2. Add User B as a contact of User A
    3. Backup User A
    4. Restore User A from scratch
    5. Wait until contact list is restored for User A
    6. User A blocks User B
    7. Wait for some time and observe the result

    Actual result: incoming pending contact request from blocked User B appears for User A

    @saledjenic
    Copy link

    @pavloburykh it's better to continue discussing this with someone from the core team. They know better what they've implemented there, cause this is not about backing up/fetching the data only, but about the order of actions as well.

    What I've noticed in your video is that we don't use the old onboarding flow we had ~2+ years ago when we added the backup data feature, but instead, we let the users go straight to the app. That has its downsides.

    For example, I see a 3-word username instead of the display name, which tells me that the backed-up data was not fetched.

    Also, contact request messages are always around and nobody can guarantee that backed-up data are received before the message carrying the contact request.

    One more thing, you've backed up the data twice (it's a question if you've used a brand new Status profile or one you've already used before in which case more than 2 sets of backed-up messages are around, but I will assume that you tested it with a new Status profile and there are only 2 sets), so nobody can guarantee that the older one was not received first, then the request, then the latest data set or even not the latest set received at all.


    Did you use the same seed phrase for issue 2?

    Wait until contact list is restored for User A

    How did you verify this? And how did you know that the received list of contacts is from the last backup data set?

    Please read some concerns raised in this comment here status-im/status-go#6255 (review) Also, I said there that it's much better to say for activity notifications something like "Applied data are as they were on 11th of January 2025" and keep updating this instead "Profile details fetched successfully".


    Anyhow, before we had a longer fetching data stage while recovering the user from Waku and that was a more secure and better approach than what we do now. Before we were waiting for 30 seconds and in >90% the data should be received within that timeframe (if we rely on store nodes that work and they are synced (cause we keep those historical messages there)) for the rest of <10% cases we were waiting for 1.5 minutes more, after which we let the user in, but discarding all messages that may come later. That's a trade-off, but keeps the app consistent. Also, that flow should not be the first user's choice if there is another device set with the same seed phrase.

    Maybe I am wrong, but I somehow have a feeling that we've just changed the onboarding, to make it simple and short, without properly handling received messages after the user lands in the app. And that's the hardest part, not sure even if it's possible to sync all that properly at the later stage. Because there can be many data sets coming out of order and many action-related messages (like that one for contact request, added, blocked, removed) that come only once and being tried to apply for the state that is based on the lastly applied fetched data set which may not be the state when that message was initiated. That's a big problem.

    I understand that it's important to let the users land in the app as soon as possible, but that's nice if we're talking just about the wallet, our app is not just a wallet, it's a super app, with a lot of settings, chats, communities and so, so I am not sure that we should do that, but that's for another discussion.

    @pavloburykh
    Copy link
    Contributor Author

    pavloburykh commented Feb 10, 2025

    Hi @saledjenic, thank you for your comment. I am not sure I can deeply understand the problems you have raised here, so I agree that we need someone from mobile core team to help figuring out cc @ilmotta .

    Regarding your questions:

    1. For example, I see a 3-word username instead of the display name, which tells me that the backed-up data was not fetched.

    We have a separate issue for that #21827. 3 random-name is displayed until relogin. If there is a backed up display-name/default generated keys, it will be displayed after relogin.

    1. it's a question if you've used a brand new Status profile

    yes, every time I have used brand new profile

    1. Did you use the same seed phrase for issue 2

    The same to which seedphrase? As described in steps for ISSUE 2 the new user is created, backed up and then restored.

    1. Wait until contact list is restored for User A

    How did you verify this? And how did you know that the received list of contacts is from the last backup data set?

    As you can see from the steps for ISSUE 2 there is only 1 backup set (at least 1 manual). I verified contact is restored by observing User B in contact list of User A.

    1. One more thing, you've backed up the data twice (it's a question if you've used a brand new Status profile or one you've already used before in which case more than 2 sets of backed-up messages are around, but I will assume that you tested it with a new Status profile and there are only 2 sets), so nobody can guarantee that the older one was not received first, then the request, then the latest data set or even not the latest set received at all.

    As I have mentioned, my understanding of the issues raised by you is very limited. The described above looks weird for me, as I do not understand were those incoming contact request are coming from? If the contact request has been previously accepted (the status has changed) then why is it showing up again?

    Another weird thing in the context of ISSUE 1 is that User A receives incoming contact request even in case if User A initially was not the RECEIVER but the SENDER of the request to User B (which became his contact after accepting).

    Overall, maybe there is some sense in terms of technical implementation, but in terms of user experience it does not have any sense or logic.

    Regarding > so nobody can guarantee that the older one was not received first, then the request, then the latest data set or even not the latest set received at all

    why do we even receive any of the older sets of backed up data? shouldn't we receive the latest one available?

    @saledjenic
    Copy link

    why do we even receive any of the older sets of backed up data? shouldn't we receive the latest one available?

    Unfortunately no way to do that, cause you never know which one is the newest. We're operating in a decentralized environment and things are much harder than how they would be if there is a server containing all we need. Anyhow, I raised some questions in my comments, and I guess that should be discussed with the core team further and find the best (acceptable) solution, cause they know that code the best.

    @pavloburykh
    Copy link
    Contributor Author

    Thanks @saledjenic. I am closing this mobile PR for now, as we probably will need another PR after mobile core will take a look. Let's for now continue and keep discussion in one place, for example in the initial issue. I have left the links to our discussion there.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Status: DONE
    Development

    Successfully merging this pull request may close these issues.

    Waku backup - deleted contact is restored when recovering an account from recovery phrase
    3 participants