status-im / status-mobile

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

Fix "Failed to get dApps" error when a session expired #21531

Closed clauxx closed 3 weeks ago

clauxx commented 3 weeks ago

fixes #21530

Summary

The topic wasn't passed correctly to "wallet_disconnectWalletConnectSession", where instead we were passing the entire session map. This caused the error toast to show up when updating the "disconnected" state (status-go db) of an expired session.

Steps to test

A bit difficult to test, since you need to have a session that just expired (while the app is closed) and then open the app.

status: ready

status-im-auto commented 3 weeks ago

Jenkins Builds

:grey_question: Commit :hash: Finished (UTC) Duration Platform Result
:heavy_check_mark: e6a79bae #2 2024-10-30 11:11:59 ~5 min tests :page_facing_up:log
:heavy_check_mark: e6a79bae #2 2024-10-30 11:13:34 ~6 min android-e2e :robot:apk :calling:
:heavy_check_mark: e6a79bae #2 2024-10-30 11:15:51 ~8 min android :robot:apk :calling:
:heavy_check_mark: e6a79bae #2 2024-10-30 11:17:30 ~10 min ios :iphone:ipa :calling:
:heavy_check_mark: c50a5315 #3 2024-10-30 11:55:53 ~8 min android-e2e :robot:apk :calling:
:heavy_check_mark: c50a5315 #3 2024-10-30 11:56:09 ~8 min android :robot:apk :calling:
:heavy_check_mark: c50a5315 #3 2024-10-30 11:57:26 ~10 min ios :iphone:ipa :calling:
:heavy_check_mark: c50a5315 #4 2024-10-30 12:38:30 ~5 min tests :page_facing_up:log
pavloburykh commented 3 weeks ago

@clauxx thanks for the PR. So far I have not faced the issue again. Let's merge and cherry pick it so we can keep an eye on this in the release.

status-im-auto commented 3 weeks ago

62% of end-end tests have passed

Total executed tests: 8
Failed tests: 3
Expected to fail tests: 0
Passed tests: 5
IDs of failed tests: 703133,727229,702843 

Failed tests (3)

Click to expand
  • Rerun failed tests

  • Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843

    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:350: 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 ```

    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133

    # STEP: Check that removed user is not shown in the list anymore
    Device 1: Wait for element `Button` for max 30s and click when it is available

    ``` critical/chats/test_public_chat_browsing.py:240: in test_restore_multiaccount_with_waku_backup_remove_switch self.sign_in.show_profiles_button.wait_and_click() ../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 1: Button by accessibility id:`show-profiles` is not found on the screen after wait_for_visibility_of_element ```

    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_eth, id: 727229

    Device 2: Find `Text` by `xpath`: `//android.view.ViewGroup[@content-desc='container']/android.widget.TextView[@text='Ether']/../android.widget.TextView[3]`
    Device 2: `Text` is `0.10139 ETH`

    ``` critical/test_wallet.py:158: in test_wallet_send_eth 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))])) Sender balance is not updated on Etherscan, it is 0.3793 but expected to be 0.3794 ```

    Passed tests (5)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestWalletOneDevice:

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

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230