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

fix_: use 24h batches to retrieve message history #21674

Closed
wants to merge 1 commit into from

Conversation

richard-ramos
Copy link
Member

Instead of retrieving 30d of messages, split the request in 24h batches.
Requires: status-im/status-go#6115

To test this:
Ensure that profiles restore from backup successfully, as well as curated communities, and message history older than 24h

@status-im-auto
Copy link
Member

status-im-auto commented Nov 25, 2024

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 4ac1616 #1 2024-11-25 16:16:07 ~5 min tests 📄log
✔️ 4ac1616 #1 2024-11-25 16:18:40 ~7 min android-e2e 🤖apk 📲
✔️ 4ac1616 #1 2024-11-25 16:20:55 ~10 min android 🤖apk 📲
✔️ 4ac1616 #1 2024-11-25 16:21:21 ~10 min ios 📱ipa 📲
✔️ b9af66f #2 2024-12-02 13:16:22 ~5 min tests 📄log
✔️ b9af66f #2 2024-12-02 13:19:53 ~8 min android-e2e 🤖apk 📲
✔️ b9af66f #2 2024-12-02 13:22:06 ~11 min android 🤖apk 📲
b9af66f #2 2024-12-02 15:16:01 ~2 hr 5 min ios 📄log

@status-im-auto
Copy link
Member

88% of end-end tests have passed

Total executed tests: 8
Failed tests: 0
Expected to fail tests: 1
Passed tests: 7
IDs of expected to fail tests: 702843 

Expected to fail tests (1)

Click to expand

Class TestCommunityMultipleDeviceMerged:

1. test_community_message_edit, id: 702843
Test is not run, e2e blocker  

[[reason: [NOTRUN] Skipped due to waku issue on staging fleet]]

Passed tests (7)

Click to expand

Class TestWalletMultipleDevice:

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

Class TestOneToOneChatMultipleSharedDevicesNewUi:

1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
Device sessions

Class TestCommunityOneDeviceMerged:

1. test_community_copy_and_paste_message_in_chat_input, id: 702742
Device sessions

2. test_restore_multiaccount_with_waku_backup_remove_profile_switch, id: 703133
Device sessions

Class TestWalletOneDevice:

1. test_wallet_add_remove_regular_account, id: 727231
2. test_wallet_balance_mainnet, id: 740490

@churik
Copy link
Member

churik commented Nov 26, 2024

@richard-ramos
Could you clarify which timeframe is expected to be fetched in the community when someone joins?
I was under the impression it has always been the last 24 hours—am I mistaken?

@status-im-auto
Copy link
Member

100% of end-end tests have passed

Total executed tests: 8
Failed tests: 0
Expected to fail tests: 0
Passed tests: 8

Passed tests (8)

Click to expand

Class TestOneToOneChatMultipleSharedDevicesNewUi:

1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
Device sessions

Class TestWalletOneDevice:

1. test_wallet_add_remove_regular_account, id: 727231
2. test_wallet_balance_mainnet, id: 740490

Class TestCommunityOneDeviceMerged:

1. test_restore_multiaccount_with_waku_backup_remove_profile_switch, id: 703133
Device sessions

2. test_community_copy_and_paste_message_in_chat_input, id: 702742
Device sessions

Class TestCommunityMultipleDeviceMerged:

1. test_community_message_edit, id: 702843
Device sessions

Class TestWalletMultipleDevice:

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

@status-im-auto
Copy link
Member

80% of end-end tests have passed

Total executed tests: 55
Failed tests: 10
Expected to fail tests: 1
Passed tests: 44
IDs of failed tests: 702845,702786,702809,702948,703629,702783,702782,740220,740221,740222 
IDs of expected to fail tests: 702838 

Failed tests (10)

Click to expand
  • Rerun failed tests

  • Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_leave, id: 702845
    Test setup failed: critical/chats/test_public_chat_browsing.py:872: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:420: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:100: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element 
    

    [[Skipped due to waku issue on staging fleet]]

    2. test_community_mentions_push_notification, id: 702786

    Device 2: Find Text by xpath: //android.view.ViewGroup[@content-desc='chat-item']//android.widget.TextView[contains(@text,'https://status.app/c/')]
    Device 2: Wait for element Button for max 120s and click when it is available

    Test setup failed: critical/chats/test_public_chat_browsing.py:872: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:420: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:100: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element 
    

    [[Skipped due to waku issue on staging fleet]]

    Device sessions

    3. test_community_markdown_support, id: 702809

    Test setup failed: critical/chats/test_public_chat_browsing.py:872: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:420: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:100: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element 
    

    [[Skipped due to waku issue on staging fleet]]

    4. test_community_hashtag_links_to_community_channels, id: 702948

    Test setup failed: critical/chats/test_public_chat_browsing.py:872: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:420: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:100: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element 
    

    [[Skipped due to waku issue on staging fleet]]

    5. test_community_join_when_node_owner_offline, id: 703629

    Test setup failed: critical/chats/test_public_chat_browsing.py:872: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:420: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:100: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element 
    

    [[Skipped due to waku issue on staging fleet]]

    Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:

    1. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783

    Device 2: Find Text by xpath: //*[starts-with(@text,'test message')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='message-status']/android.widget.TextView
    Device 2: Text is Sent

    critical/chats/test_1_1_public_chats.py:627: in test_1_1_chat_is_shown_message_sent_delivered_from_offline
        self.errors.verify_no_errors()
    base_test_case.py:192: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Message status was not changed to Delivered, it's Sent after back up online!
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782

    Device 2: Find OpenInStatusButton by xpath: //*[@text="Open in Status"]
    Device 2: Tap on found: OpenInStatusButton

    critical/chats/test_1_1_public_chats.py:180: in test_1_1_chat_emoji_send_reply_and_open_link
        self.errors.verify_no_errors()
    base_test_case.py:192: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     URL was not opened from 1-1 chat
    



    Device sessions

    Class TestFallbackMultipleDevice:

    1. test_fallback_sync_with_error, id: 740220

    Device 2: Tap on found: Button
    Device 2: Find Button by accessibility id: scan-sync-code-option-card

    critical/test_fallback.py:46: in test_fallback_sync_with_error
        self.sign_in_2.sync_profile(sync_code=self.sync_code)
    ../views/sign_in_view.py:295: in sync_profile
        self.scan_sync_code_button.click()
    ../views/base_element.py:90: in click
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: Button by accessibility id: `scan-sync-code-option-card` 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
    



    Device sessions

    2. test_fallback_with_correct_seed_phrase, id: 740221

    # STEP: Device 2: recover a profile with backed up seed phrase
    Device 2: Find Button by accessibility id: try-seed-phrase-button

    critical/test_fallback.py:54: in test_fallback_with_correct_seed_phrase
        self.sign_in_2.try_seed_phrase_button.click()
    ../views/base_element.py:90: in click
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: Button by accessibility id: `try-seed-phrase-button` 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
    



    Device sessions

    3. test_fallback_validate_seed_phrase, id: 740222

    # STEP: Device 2: try syncing profile
    Device 2: Find Button by accessibility id: show-new-account-options

    critical/test_fallback.py:168: in test_fallback_validate_seed_phrase
        self.sign_in_2.sync_profile(sync_code=self.sync_code, first_user=False)
    ../views/sign_in_view.py:293: in sync_profile
        self.plus_profiles_button.click()
    ../views/base_element.py:90: in click
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: Button by accessibility id: `show-new-account-options` 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
    



    Device sessions

    Expected to fail tests (1)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_send_check_timestamps_sender_username, id: 702838

    Device 2: Verifying that 'new message' is under today
    Device 2: Looking for a message by text: new message

    critical/chats/test_public_chat_browsing.py:364: in test_community_message_send_check_timestamps_sender_username
        self.channel_2.verify_message_is_under_today_text(new_message, self.errors, 60)
    ../views/chat_view.py:976: in verify_message_is_under_today_text
        message_element.wait_for_visibility_of_element(timeout)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: ChatElementByText by xpath:`//*[starts-with(@text,'new message')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_visibility_of_element 
    

    [[Skipped due to waku issue on staging fleet]]

    Device sessions

    Passed tests (44)

    Click to expand

    Class TestWalletMultipleDevice:

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

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_profile_switch, id: 703133
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    3. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    4. test_community_undo_delete_message, id: 702869
    Device sessions

    5. test_community_mute_community_and_channel, id: 703382
    Device sessions

    6. test_community_discovery, id: 703503
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_reactions, id: 703202
    Device sessions

    2. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    3. test_group_chat_offline_pn, id: 702808
    Device sessions

    4. test_group_chat_pin_messages, id: 702732
    Device sessions

    5. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    6. test_group_chat_mute_chat, id: 703495
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:

    1. test_1_1_chat_mute_chat, id: 703496
    Device sessions

    2. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_edit_message, id: 702855
    Device sessions

    2. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    3. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    4. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    5. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    6. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    7. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    2. test_wallet_balance_mainnet, id: 740490

    Class TestDeepLinksOneDevice:

    1. test_links_open_universal_links_from_chat, id: 704613
    Device sessions

    2. test_links_deep_links_profile, id: 702775
    Device sessions

    3. test_deep_links_communities, id: 739307
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    2. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    3. test_add_contact_field_validation, id: 702777
    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 TestCommunityMultipleDeviceMerged:

    1. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    2. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    3. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    4. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    5. test_community_unread_messages_badge, id: 702841
    Device sessions

    6. test_community_message_delete, id: 702839
    Device sessions

    7. test_community_edit_delete_message_when_offline, id: 704615
    Device sessions

    8. test_community_one_image_send_reply, id: 702859
    Device sessions

    9. test_community_message_edit, id: 702843
    Device sessions

    10. test_community_several_images_send_reply, id: 703194
    Device sessions

    @richard-ramos
    Copy link
    Member Author

    Could you clarify which timeframe is expected to be fetched in the community when someone joins?

    9d according to this setting: https://github.com/status-im/status-go/blob/develop/appdatabase/migrations/sql/1682073779_settings_table_remove_latest_derived_path_column.up.sql#L55 It will not load the 9d immediatly though as it will iterate over the result set day by day from most recent to earlier.

    Also, perhaps this is a parameter we could change to reduce the load on the storenodes to maybe 3d instead? wdyt @fryorcraken? I imagine this should reduce the number of requests done to a storenode when joining a community to ~1/3 of the number of requests we do now depending on how active a community is.

    @churik
    Copy link
    Member

    churik commented Nov 26, 2024

    @richard-ramos

    I'll comment one by one
    1) Backup

    For today stat the test was failed 3 times and passed 5 times (all that on staging fleet) and it seems unstable on both fleets - so sometimes it is restored, sometimes not.

    image

    What we should exactly ensure here and in what fleet?

    2) Curated communities
    Meaning - they should fetch the same way they fetch on nightly (also barely working as it mentioned here) on status.prod fleet, right?

    3) Fetching history in communities

    9d according to this setting: https://github.com/status-im/status-go/blob/develop/appdatabase/migrations/sql/1682073779_settings_table_remove_latest_derived_path_column.up.sql#L55 It will not load the 9d immediately though as it will iterate over the result set day by day from most recent to earlier.

    It has never been working on mobile, so frankly I do not really know how to test it.

    When you join for example Status community from mobile, only 24h were fetched. And we do not have an option in nightly of to fetch more history, and usually even the one for 24h is very incomplete (as it can be seen from #21581) which is totally valid issue.

    So basically what I can test now for sure that new communities that are created on status.staging are fetched.
    Will really appreciate if you can clarify all the comments that I mentioned above, as it seems that reality in the app does not match expected behaviour, but we never get a requirements per se :)

    @churik
    Copy link
    Member

    churik commented Nov 26, 2024

    So we made a small investigation of how app behaves on PR and nightly builds (thanks @Horupa-Olena), the comparison spreadsheet is here

    Based on the comparison table provided in the document, here are the conclusions regarding key differences between the PR and Nightly builds:

    General Observations:

    1. Speed:

      • Joining the Status community was slightly faster in PR builds compared to nightly builds. Specifically, PR was 5 minutes faster on Android and 2 minutes faster on iOS.
    2. Message Syncing:

      • PR builds tended to show more messages initially when joining the Status community or restoring accounts.
      • Nightly builds sometimes displayed fewer or no messages in specific channels.
    3. Data Loss:

      • For restored accounts, data loss in close and open test communities varied significantly:
        • PR builds showed more consistent recovery of messages across all channels.
        • Nightly builds frequently lost messages or displayed empty channels, particularly in the close test community.

    Channel-Specific Differences:

    • Channels with Missing Messages:

      • On Android and iOS, Nightly builds consistently showed fewer messages in several channels, including general, feedback-mobile, general-banter, and others.
      • PR builds recovered messages from more channels, such as feedback-desktop, memes, and core-desktop, with better completeness.
    • Close and Open Communities:

      • In PR builds:
        • The close community generally retained or displayed most messages.
        • The open community sometimes showed empty channels but performed better than nightly builds.
      • In Nightly builds:
        • There was frequent loss of messages in both close and open communities, with many channels appearing empty.

    Additional Notes:

    • Message Display Across Platforms:

      • Both builds showed discrepancies in syncing messages between the mobile app and Discord channels, but this issue was more pronounced in Nightly builds.
    • Channel Fetching Behavior:

      • PR builds fetched messages from a broader range of channels (e.g., web, memes, sports) compared to Nightly builds.

    Conclusion:

    • PR builds generally outperformed Nightly builds in terms of speed, message recovery, and channel syncing when joining or restoring the Status community. The Nightly builds showed significant issues with data completeness and channel syncing, particularly in test communities and less frequently used channels.

    But it all might be a coincidence
    All tests are performed on status.prod fleet.
    For staging I'm re-running tests and continue investigation tomorrow.

    @status-im-auto
    Copy link
    Member

    76% of end-end tests have passed

    Total executed tests: 55
    Failed tests: 12
    Expected to fail tests: 1
    Passed tests: 42
    
    IDs of failed tests: 702845,727230,702786,702809,702948,703629,740220,727229,703391,740221,703495,740222 
    
    IDs of expected to fail tests: 702894 
    

    Failed tests (12)

    Click to expand
  • Rerun failed tests

  • Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_mute_chat, id: 703495

    Device 2: Click until `ChatMessageInput` by `accessibility id`: `chat-message-input` will be presented
    Device 2: Looking for a message by text: Chat is unmuted now

    critical/chats/test_group_chat.py:521: in test_group_chat_mute_chat
        self.errors.verify_no_errors()
    base_test_case.py:192: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Text 'Muted until 02:10 today' is not shown for muted chat
    



    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    Test setup failed: critical/test_wallet.py:22: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:330: in create_shared_drivers
        raise e
    base_test_case.py:320: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    



    2. test_wallet_send_eth, id: 727229

    Test setup failed: critical/test_wallet.py:22: in prepare_devices
        self.drivers, self.loop = create_shared_drivers(2)
    base_test_case.py:330: in create_shared_drivers
        raise e
    base_test_case.py:320: in create_shared_drivers
        test_suite_data.current_test.testruns[-1].jobs[drivers[i].session_id] = i + 1
     '_asyncio.Future' object has no attribute 'session_id'
    



    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_send_image_save_and_share, id: 703391

    Device 2: Tap on found: Button
    Device 2: Find BaseElement by accessibility id: toast-content

    critical/chats/test_1_1_public_chats.py:451: in test_1_1_chat_send_image_save_and_share
        toast_element_text = toast_element.text
    ../views/base_element.py:237: in text
        return self.find_element().text
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: BaseElement by accessibility id: `toast-content` 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
    



    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_leave, id: 702845

    Test setup failed: critical/chats/test_public_chat_browsing.py:872: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:420: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:100: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element 
    

    [[Skipped due to waku issue on staging fleet]]

    2. test_community_mentions_push_notification, id: 702786

    Device 2: Find Text by xpath: //android.view.ViewGroup[@content-desc='chat-item']//android.widget.TextView[contains(@text,'https://status.app/c/')]
    Device 2: Wait for element Button for max 120s and click when it is available

    Test setup failed: critical/chats/test_public_chat_browsing.py:872: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:420: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:100: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element 
    

    [[Skipped due to waku issue on staging fleet]]

    Device sessions

    3. test_community_markdown_support, id: 702809

    Test setup failed: critical/chats/test_public_chat_browsing.py:872: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:420: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:100: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element 
    

    [[Skipped due to waku issue on staging fleet]]

    4. test_community_hashtag_links_to_community_channels, id: 702948

    Test setup failed: critical/chats/test_public_chat_browsing.py:872: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:420: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:100: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element 
    

    [[Skipped due to waku issue on staging fleet]]

    5. test_community_join_when_node_owner_offline, id: 703629

    Test setup failed: critical/chats/test_public_chat_browsing.py:872: in prepare_devices
        self.community_2.join_community()
    ../views/chat_view.py:420: in join_community
        self.join_button.wait_and_click(120)
    ../views/base_element.py:100: in wait_and_click
        self.wait_for_visibility_of_element(sec)
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: Button by accessibility id:`show-request-to-join-screen-button` is not found on the screen after wait_for_visibility_of_element 
    

    [[Skipped due to waku issue on staging fleet]]

    Class TestFallbackMultipleDevice:

    1. test_fallback_sync_with_error, id: 740220

    Device 2: Tap on found: Button
    Device 2: Find Button by accessibility id: scan-sync-code-option-card

    critical/test_fallback.py:46: in test_fallback_sync_with_error
        self.sign_in_2.sync_profile(sync_code=self.sync_code)
    ../views/sign_in_view.py:295: in sync_profile
        self.scan_sync_code_button.click()
    ../views/base_element.py:90: in click
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: Button by accessibility id: `scan-sync-code-option-card` 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
    



    Device sessions

    2. test_fallback_with_correct_seed_phrase, id: 740221

    # STEP: Device 2: recover a profile with backed up seed phrase
    Device 2: Find Button by accessibility id: try-seed-phrase-button

    critical/test_fallback.py:54: in test_fallback_with_correct_seed_phrase
        self.sign_in_2.try_seed_phrase_button.click()
    ../views/base_element.py:90: in click
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: Button by accessibility id: `try-seed-phrase-button` 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
    



    Device sessions

    3. test_fallback_validate_seed_phrase, id: 740222

    # STEP: Device 2: try syncing profile
    Device 2: Find Button by accessibility id: show-new-account-options

    critical/test_fallback.py:168: in test_fallback_validate_seed_phrase
        self.sign_in_2.sync_profile(sync_code=self.sync_code, first_user=False)
    ../views/sign_in_view.py:293: in sync_profile
        self.plus_profiles_button.click()
    ../views/base_element.py:90: in click
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: Button by accessibility id: `show-new-account-options` 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
    



    Device sessions

    Expected to fail tests (1)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_contact_block_unblock_offline, id: 702894

    Device 1: Click until ChatMessageInput by accessibility id: chat-message-input will be presented
    Device 1: Looking for a message by text: Hurray! unblocked

    critical/chats/test_public_chat_browsing.py:737: in test_community_contact_block_unblock_offline
        self.errors.verify_no_errors()
    base_test_case.py:192: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Hurray! unblocked was not received in public chat after user unblock! 
    

    [[Skipped due to waku issue on staging fleet]]

    Device sessions

    Passed tests (42)

    Click to expand

    Class TestActivityMultipleDevicePRTwo:

    1. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    2. test_activity_center_mentions, id: 702957
    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 TestActivityMultipleDevicePR:

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_reactions, id: 703202
    Device sessions

    2. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    3. test_group_chat_offline_pn, id: 702808
    Device sessions

    4. test_group_chat_pin_messages, id: 702732
    Device sessions

    5. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    2. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    3. test_add_contact_field_validation, id: 702777
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    2. test_wallet_balance_mainnet, id: 740490

    Class TestDeepLinksOneDevice:

    1. test_links_open_universal_links_from_chat, id: 704613
    Device sessions

    2. test_links_deep_links_profile, id: 702775
    Device sessions

    3. test_deep_links_communities, id: 739307
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_profile_switch, id: 703133
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    3. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    4. test_community_undo_delete_message, id: 702869
    Device sessions

    5. test_community_mute_community_and_channel, id: 703382
    Device sessions

    6. test_community_discovery, id: 703503
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_edit_message, id: 702855
    Device sessions

    2. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    3. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    4. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    5. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    6. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    7. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    2. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    3. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    4. test_community_unread_messages_badge, id: 702841
    Device sessions

    5. test_community_message_delete, id: 702839
    Device sessions

    6. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    7. test_community_edit_delete_message_when_offline, id: 704615
    Device sessions

    8. test_community_one_image_send_reply, id: 702859
    Device sessions

    9. test_community_message_edit, id: 702843
    Device sessions

    10. test_community_several_images_send_reply, id: 703194
    Device sessions

    @richard-ramos
    Copy link
    Member Author

    richard-ramos commented Nov 26, 2024

    Backup: ... What we should exactly ensure here and in what fleet?

    That the backup feature still works. This should work on any fleet.

    Curated communities: they should fetch the same way they fetch on nightly (also barely working as it mentioned #21158) on status.prod fleet, right?

    Yes

    Fetching history in communities: It has never been working on mobile, so frankly I do not really know how to test it.

    Perhaps this is something that should be confirmed on the PR created for desktop? cc: @anastasiyaig

    Overall the behaviour should be the same, except that on the background the queries are splitted into 24h batches which should help reduce the load on the storenodes as well as improve the response times for the store queries, which seems to be the case, based on the comment before this! For the cases that sometimes work / sometimes doesn't, it seems to me that this is likely that some storenode is missing messages or maybe it wasn't even possible to publish the message containing the backup.

    I wonder what's the experience like with this PR on desktop?

    Thank you, @churik

    @anastasiyaig
    Copy link

    sadly i did not try yet , pretty loaded with tasks for 2.32 . i will be back to it, there is a desktop pr, which i am planning to try tomorrow @richard-ramos

    @anastasiyaig
    Copy link

    some context for prod fleet: tests are passing here status-im/status-desktop#16813
    we dont check history in tests but real time messages work.

    i need to check staging and backup manually, will reply in desktop pr

    @churik churik assigned churik and unassigned Horupa-Olena Nov 27, 2024
    @churik
    Copy link
    Member

    churik commented Nov 27, 2024

    @richard-ramos

    I cannot really prove that this is actually PR issue, but worth checking

    ISSUE 1 sometimes messages are not fetched from history nodes in 1-1 chat when the sender is offline
    Mobile-Mobile.

    Reproducibility:

    • on nightly could not reproduce 3/3
    • on Pr build: reproduced 3/5 (2 times messages were lost, and 1 more time part of the messages was lost)

    Prerequisites: sender and receiver are mutual contacts

    Steps:

    1. Receiver: goes offline
    2. Sender: sent 10 messages, wait for them to change status to "Sent"
    3. Sender: goes offline (just closed the app, therefore the messages should be stored on the history node)
    4. Receiver: goes online
    5. Receiver: wait for the messages.

    Expected result: messages will be fetched from history node in max 2 mins after the receiver goes back online
    Actual result: messages are not received until the sender goes back online (waited for 6 mins after receiver goes back online)
    Messages that lost were sent at 13:43 (10 items) and received at 13:49(10 items) when sender went back online and they started to re-transmit

    Sender logs: logs.zip

    Receiver logs: Status-debug-logs.zip

    @churik
    Copy link
    Member

    churik commented Nov 27, 2024

    apart from #21674 (comment) and taking into account #21674 (comment) I can confirm that:

    • initial issue with communities are not being fetched on staging fleet is fixed
    • e2e failures are not related to PR.

    So if you are 100% sure that the message fetching in 1-1 chat is not getting worse in this PR (meaning: #21674 (comment) is not related to PR), you have a green light from mobile side.

    @richard-ramos
    Copy link
    Member Author

    Looking at the logs I'm thinking this failure to retrieve messages is not related to the PR. This PR what it does is to change the start/end time of the queries ONLY if they exceed 24h, which is not the case for the queries being done when going from offline to online.

    @churik
    Copy link
    Member

    churik commented Dec 2, 2024

    @richard-ramos if you can upgrade version on mobile client to include your changes, I'd appreciate that

    @richard-ramos
    Copy link
    Member Author

    Done, in last commit i updated the status-go version to the commit from develop that includes my changes

    @churik
    Copy link
    Member

    churik commented Dec 2, 2024

    thanks! it seems that your commit is already included to current mobile version in nightly, tests confirmed that, so I'm closing current PR and initial issue

    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.

    6 participants