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

WC: Proper handling of disconnection, both from the dapp itself and from the list of connected dapps #20817

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

alwx
Copy link
Contributor

@alwx alwx commented Jul 19, 2024

fixes #20797
fixes #20798

Platforms

  • Android
  • iOS

status: ready

@status-im-auto
Copy link
Member

status-im-auto commented Jul 19, 2024

Jenkins Builds

Click to see older builds (12)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 0feb2af #2 2024-07-19 09:46:03 ~4 min tests 📄log
✔️ 0feb2af #2 2024-07-19 09:48:38 ~7 min android 🤖apk 📲
✔️ 0feb2af #2 2024-07-19 09:49:03 ~7 min android-e2e 🤖apk 📲
✔️ 0feb2af #2 2024-07-19 09:55:36 ~14 min ios 📱ipa 📲
✔️ 30126a4 #3 2024-07-19 11:24:09 ~5 min tests 📄log
✔️ 30126a4 #3 2024-07-19 11:27:43 ~8 min android-e2e 🤖apk 📲
✔️ 30126a4 #3 2024-07-19 11:27:53 ~8 min android 🤖apk 📲
✔️ 30126a4 #3 2024-07-19 11:28:16 ~9 min ios 📱ipa 📲
✔️ 60df1e4 #4 2024-07-22 12:38:57 ~5 min tests 📄log
✔️ 60df1e4 #4 2024-07-22 12:41:41 ~8 min android-e2e 🤖apk 📲
✔️ 60df1e4 #4 2024-07-22 12:42:44 ~9 min android 🤖apk 📲
✔️ 60df1e4 #4 2024-07-22 12:44:48 ~11 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 62e125e #5 2024-07-22 13:07:22 ~4 min tests 📄log
✔️ 790ed40 #6 2024-07-22 13:13:27 ~5 min tests 📄log
✔️ 790ed40 #6 2024-07-22 13:16:08 ~8 min android-e2e 🤖apk 📲
✔️ 790ed40 #6 2024-07-22 13:16:55 ~8 min android 🤖apk 📲
✔️ 790ed40 #6 2024-07-22 13:18:37 ~10 min ios 📱ipa 📲

Copy link
Contributor

@shivekkhurana shivekkhurana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GG.

@status-im-auto
Copy link
Member

71% of end-end tests have passed

Total executed tests: 7
Failed tests: 1
Expected to fail tests: 1
Passed tests: 5
IDs of failed tests: 727230 
IDs of expected to fail tests: 727232 

Failed tests (1)

Click to expand
  • Rerun failed tests

  • Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    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.00679 ETH`

    critical/test_wallet.py:184: in test_wallet_send_asset_from_drawer
        self.errors.verify_no_errors()
    base_test_case.py:191: 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.493 but expected to be 0.4931
    



    Expected to fail tests (1)

    Click to expand

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_watch_only_account, id: 727232

    Device 1: Find EditBox by accessibility id: add-address-to-watch
    Device 1: Type 0x8d2413447ff297d30bdc475f6d5cb00254685aae to EditBox

    critical/test_wallet.py:249: in test_wallet_add_remove_watch_only_account
        self.wallet_view.add_watch_only_account(address=address_to_watch, account_name=new_account_name)
    ../views/wallet_view.py:163: in add_watch_only_account
        self.account_has_activity_label.wait_for_visibility_of_element()
    ../views/base_element.py:147: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 1: Text by accessibility id:`account-has-activity` is not found on the screen after wait_for_visibility_of_element 
    

    [[Missing networks in account address, https://github.com//issues/20166]]

    Device sessions

    Passed tests (5)

    Click to expand

    Class TestWalletMultipleDevice:

    1. 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_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    Copy link
    Member

    @clauxx clauxx left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    ah, so we were using the wrong topic. Amazing API design from them as always. Great fix @alwx!

    @alwx
    Copy link
    Contributor Author

    alwx commented Jul 19, 2024

    @clauxx yes, there is topic and pairingTopic and even they sometimes confuse them in the docs :D

    @qoqobolo qoqobolo self-assigned this Jul 19, 2024
    @status-im-auto
    Copy link
    Member

    0% of end-end tests have passed

    Total executed tests: 1
    Failed tests: 1
    Expected to fail tests: 0
    Passed tests: 0
    
    IDs of failed tests: 727230 
    

    Failed tests (1)

    Click to expand
  • Rerun failed tests

  • Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    Device 2: Tap on found: Button
    Device 2: Find `ChatsTab` by `accessibility id`: `chats-stack-tab`

    critical/test_wallet.py:163: in test_wallet_send_asset_from_drawer
        self.wallet_2.chats_tab.click()
    ../views/base_element.py:90: in click
        element = self.find_element()
    ../views/base_element.py:79: in find_element
        raise NoSuchElementException(
     Device 2: ChatsTab by accessibility id: `chats-stack-tab` 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
    



    @qoqobolo
    Copy link
    Contributor

    Hey @alwx , thanks for the fixes!

    I'm finishing work for today, will continue on Monday, but so far I've faced this issue with OpenSea:

    ISSUE 1: Disconnection of the OpenSea dapp in Status doesn't result in disconnection on the Opesea side

    Steps:

    1. Connect to https://opensea.io/
    2. Press Disconnect in Status

    Expected result: the wallet is disconnected on OpenSea
    Actual result: the wallet stays connected, you need to log out manually

    @qoqobolo
    Copy link
    Contributor

    Hey @alwx , thanks for the fixes!

    I'm finishing work for today, will continue on Monday, but so far I've faced this issue with OpenSea:

    ISSUE 1: Disconnection of the OpenSea dapp in Status doesn't result in disconnection on the Opesea side

    Steps:

    1. Connect to https://opensea.io/
    2. Press Disconnect in Status

    Expected result: the wallet is disconnected on OpenSea Actual result: the wallet stays connected, you need to log out manually

    Same situation for https://dydx.trade/ - the wallet is displayed as connected after disconnection on the Status side.

    It seems this issue is relevant for dapps where a message signature is required when connecting.

    @alwx
    Copy link
    Contributor Author

    alwx commented Jul 22, 2024

    It does seem like they don't handle the disconnect event properly.
    This is what happens when I try it with opensea:

    • I see the toast in the Status app saying that the disconnection was successful
    • OpenSea doesn't show anything BUT in 10 seconds or so it starts experiencing issues with fetching my balance
    • if I refresh the page on OpenSea I see the following:
    Screenshot 2024-07-22 at 13 29 09

    So it does look like we disconnected from OpenSea but they didn't process it correctly despite us sending the "disconnect" event to them.

    @qoqobolo

    @qoqobolo
    Copy link
    Contributor

    @alwx yep, looks like this. And I suspect there's nothing we can do about it, right?

    @alwx
    Copy link
    Contributor Author

    alwx commented Jul 22, 2024

    Also, I see following errors in the devconsole of OpenSea:
    Screenshot 2024-07-22 at 13 32 32

    @alwx
    Copy link
    Contributor Author

    alwx commented Jul 22, 2024

    @qoqobolo sadly, no. Once we sent the disconnect event, we cannot control the process anymore — we have no connection to the dapp itself and no way of telling them to really disconnect.

    @qoqobolo
    Copy link
    Contributor

    @alwx gotcha.
    Let's merge this PR then since everything except that case looks good to me. Thanks for your work!

    @alwx alwx merged commit 08b65cb into develop Jul 22, 2024
    6 checks passed
    @alwx alwx deleted the bugfix/20797 branch July 22, 2024 13:20
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Status: DONE
    6 participants