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

support PUK and seed recovery during onboarding #12955

Merged
merged 1 commit into from
Dec 27, 2021
Merged

support PUK and seed recovery during onboarding #12955

merged 1 commit into from
Dec 27, 2021

Conversation

bitgamma
Copy link
Member

Fixes #12938.

Note for QA: please test for regressions in other scenarios where puk/reset recovery is used

@status-im-auto
Copy link
Member

status-im-auto commented Dec 27, 2021

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
cdf8b9f #1 2021-12-27 08:42:17 ~2 min ios 📄log
✔️ cdf8b9f #1 2021-12-27 09:05:04 ~25 min android 📦apk 📲
✔️ cdf8b9f #1 2021-12-27 09:05:05 ~25 min android-e2e 📦apk 📲

@status-im-auto
Copy link
Member

78% of end-end tests have passed

Total executed tests: 68
Failed tests: 15
Passed tests: 53
IDs of failed tests: 6305,5309,5387,5675,695843,5310,5762,6228,6253,6279,5379,6263,6646,6249,6293 

Failed tests (15)

Click to expand
  • Rerun tests

  • 1. test_image_in_one_to_one_send_save_reply_timeline, id: 6305

    Device 2: Find 'Button' by 'xpath': `//*[@text="Hey hey hey"]`
    Device 2: Find 'Button' by 'xpath': `//*[@text="Hey hey hey"]`

    Device 2: Button by xpath: `//*[@text="Hey hey hey"]` is not found on the screen

    Device sessions

    2. test_request_stt_from_dapp, id: 5309

    Device 1: Tap on found: Button
    Device 1: Waiting 400s for STT updated balance

    Device 1: Balance STT 6274000.0 is not changed during 400 seconds!

    Device sessions

    3. test_delete_chats_via_delete_button_rejoin, id: 5387

    ## Public chat 'public-delete-long-press' is created successfully!
    Device 1: Looking for a message by text: test message:vtkafygwya

    Messages are not fetched when rejoining public chat after deleting

    Device sessions

    4. test_redirect_to_public_chat_tapping_tag_message_fetch_more_history, id: 5675

    Device 1: 'Text' is '#spectentur'
    # STEP: Check that can fetch previous history

    Device 1: "Dec 26, 2021" is not shown

    Device sessions

    5. test_edit_delete_message_in_one_to_one_and_public_chats, id: 695843

    Device 1: Looking for a message by text: Message AFTER edit 2
    Device 2: Looking for a message by text: Message AFTER edit 2

    No mark in message bubble about this message was edited Message is not edited.

    Device sessions

    6. test_offline_is_shown_messaging_1_1_chat_sent_delivered, id: 5310

    Device 1: Looking for chat: 'Selfreliant Steel Rhodesianridgeback'
    Device 1: Wait for element 'Button' for max 60s and click when it is available

    Device 1: Button by accessibility id:`notifications-unread-badge` is not found on the screen

    Device sessions

    7. test_pair_devices_sync_one_to_one_contacts_nicknames_public_chat, id: 5762

    Device 1: Looking for a message by text: I am blocked user
    Device 1: Find 'ChatElementByText' by 'xpath': `//*[starts-with(@text,'I am blocked user')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']`

    Device 1: ChatElementByText by xpath:`//*[starts-with(@text,'I am blocked user')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen

    Device sessions

    8. test_mobile_data_usage_complex_settings, id: 6228

    Device 1: Find 'Button' by 'xpath': `//*[@text="Use mobile data"]/following-sibling::android.widget.Switch[1]`
    Device 1: Find 'Button' by 'xpath': `//*[@text="Ask me when on mobile network"]/following-sibling::android.widget.Switch[1]`

    Not connected to history node after enabling fetching on mobile data Chat history was not fetched with mobile data fetching ON

    Device sessions

    9. test_send_eth_in_1_1_chat_transaction_push, id: 6253

    Transaction #5, amount is 0.002221474
    {'blockNumber': '11672222', 'timeStamp': '1640209789', 'hash': '0x9a2adb4a668f6f3a9b7836068760b2c236be6e553fadb8f337758e14b2614a99', 'nonce': '1654', 'blockHash': '0x7791cc583b26299b209d4626c82add2f18242072a2f2dea1cba2603cd7ccf1ad', 'transactionIndex': '1', 'from': '0xa456a6bde144695879a754b19dd13e9f75ea43f2', 'to': '0xb978cfe9882774bb84335d2cd445ca958e7d7805', 'value': '2221474000000000', 'gas': '21000', 'gasPrice': '1513660804', 'isError': '0', 'txreceipt_status': '1', 'input': '0x', 'contractAddress': '', 'cumulativeGasUsed': '127123', 'gasUsed': '21000', 'confirmations': '28079'}

    Transaction with amount 0.0027103919 is not found in list of ETH transactions, address is a456a6bde144695879a754b19dd13e9f75ea43f2 during 300s

    Device sessions

    10. test_send_eth_to_ens_in_chat, id: 6279

    Transaction #5, amount is 0.0023151758
    {'blockNumber': '11676740', 'timeStamp': '1640272802', 'hash': '0xa03d1d325fb47553273eb1c128d1df718bd4eae730f32ede100f5d99033c176e', 'nonce': '6922', 'blockHash': '0x35414febbadf18bf4d16bdbefaa28d958761e07bebcfc0f9c0ac220a70e13b2e', 'transactionIndex': '2', 'from': '0xf7cb60839c0de25e37be0391c33bb34a8f0f8414', 'to': '0x84c3646047fa3465c91cc91cba4e59f5cb474c8f', 'value': '2315175800000000', 'gas': '21000', 'gasPrice': '2807350918', 'isError': '0', 'txreceipt_status': '1', 'input': '0x', 'contractAddress': '', 'cumulativeGasUsed': '96971', 'gasUsed': '21000', 'confirmations': '23565'}

    Transaction with amount 0.002710461 is not found in list of ETH transactions, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414 during 300s

    Device sessions

    11. test_home_view, id: 5379

    Device 1: Tap on found: Button
    Device 1: Find 'Button' by 'xpath': `//*[@text="#status"]`

    Device 1: Button by xpath: `//*[@text="#status"]` is not found on the screen

    Device sessions

    12. test_request_and_receive_stt_in_1_1_chat_offline, id: 6263

    Transaction #5, amount is 0.0022213458
    {'blockNumber': '11672189', 'timeStamp': '1640209477', 'hash': '0xc4717e985373e223aef56baec19c29de6a06e59bfe11cfd6ed94d9180b6653cc', 'nonce': '4291', 'blockHash': '0xa9b6b9f518aa9ba9465ecffe6fbdc8e1869bb5472abf7fc839e4261eadb58393', 'from': '0x002881321fd06d77ba2deed035140631f49506be', 'contractAddress': '0xc55cf4b03948d7ebc8b9e8bad92643703811d162', 'to': '0x2ed143d1725dea7d0e627dd3b8976f4c9cc0c82a', 'value': '2221345800000000', 'tokenName': 'Status Test Token', 'tokenSymbol': 'STT', 'tokenDecimal': '18', 'transactionIndex': '3', 'gas': '141028', 'gasPrice': '2213232030', 'gasUsed': '117524', 'cumulativeGasUsed': '478527', 'input': 'deprecated', 'confirmations': '28105'}

    Transaction with amount 0.002710264 is not found in list of token transactions, address is 002881321fd06d77ba2deed035140631f49506be during 300s

    Device sessions

    13. test_set_profile_picture, id: 6646

    Device 2: Looking for a message by text: Text message
    Device 2: Find 'MemberPhoto' by 'xpath': `//*[starts-with(@text,'Text message')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='member-photo']`

    Device 1: Profile picture was not updated in chat after making photo

    Device sessions

    14. test_keycard_request_stt_from_daap, id: 6249

    Device 1: Tap on found: Button
    Device 1: Waiting 400s for STT updated balance

    Device 1: Balance STT 6274000.0 is not changed during 400 seconds!

    Device sessions

    15. test_keycard_send_eth_in_1_1_chat, id: 6293

    Device 1: Find 'SignWithKeycardButton' by 'xpath': `//*[contains(@text,'Sign with')]`
    Device 1: Enter default pin 111111

    Device 1: Transaction failed; also Unexpected Alert is shown: 'replacement transaction underpriced'

    Device sessions

    Passed tests (53)

    Click to expand

    1. test_add_account_to_multiaccount_instance_generate_new, id: 6224
    Device sessions

    2. test_can_add_existing_ens_on_mainnet, id: 5502
    Device sessions

    3. test_keycard_can_see_all_transactions_in_history, id: 6291
    Device sessions

    4. test_sign_message_and_2tx_in_batch_and_transactions_filters_from_daap, id: 5342
    Device sessions

    5. test_add_and_delete_watch_only_account_to_multiaccount_instance, id: 6244
    Device sessions

    6. test_open_blocked_secure_not_secure_inlalid_offline_urls, id: 6210
    Device sessions

    7. test_open_public_chat_using_deep_link, id: 5396
    Device sessions

    8. test_offline_add_new_group_chat_member, id: 3998
    Device sessions

    9. test_send_non_english_message_to_newly_added_contact_on_different_networks, id: 5315
    Device sessions

    10. test_can_see_balance_and_all_transactions_history_on_cellular, id: 5314
    Device sessions

    11. test_insufficient_funds_wallet_positive_balance, id: 5412
    Device sessions

    12. test_delete_close_all_tabs, id: 5390
    Device sessions

    13. test_create_new_group_chat_messaging_pn_delivered, id: 3994
    Device sessions

    14. test_send_token_with_7_decimals, id: 5350
    Device sessions

    15. test_send_transaction_set_recipient_options, id: 6328
    Device sessions

    16. test_keycard_sign_message_and_transactions_from_daap, id: 6251
    Device sessions

    17. test_recover_account_from_new_user_seedphrase, id: 6296
    Device sessions

    18. test_keycard_can_recover_keycard_account_card_pairing, id: 5758
    Device sessions

    19. test_block_user_from_public_chat, id: 5786
    Device sessions

    20. test_send_audio_message_with_push_notification_check, id: 6316
    Device sessions

    21. test_restore_account_migrate_multiaccount_to_keycard, id: 6645
    Device sessions

    22. test_ens_mentions_pn_and_nickname_in_public_and_1_1_chats, id: 6226
    Device sessions

    23. test_keycard_send_eth_from_wallet_to_address, id: 6289
    Device sessions

    24. test_keycard_create_login_restore_unlock_same_seed, id: 5689
    Device sessions

    25. test_add_account_to_wallet_private_key_and_seed_phrase, id: 6272
    Device sessions

    26. test_long_press_to_delete_chat, id: 5319
    Device sessions

    27. test_copy_and_paste_messages, id: 5317
    Device sessions

    28. test_open_transaction_on_etherscan_copy_tx_hash, id: 5384
    Device sessions

    29. test_unread_messages_counter_public_chat, id: 5360
    Device sessions

    30. test_send_eth_from_wallet_to_address_incorrect_password, id: 5308
    Device sessions

    31. test_start_chat_with_ens_mention_in_one_to_one, id: 5403
    Device sessions

    32. test_decline_transactions_in_1_1_chat_push_notification_changing_state, id: 6265
    Device sessions

    33. test_install_pack_and_send_sticker, id: 5782
    Device sessions

    34. test_switch_users_special_char_password_and_add_new_account_logcat, id: 5356
    Device sessions

    35. test_manage_assets, id: 5341
    Device sessions

    36. test_browser_managing_bookmarks, id: 6633
    Device sessions

    37. test_open_chat_by_pasting_chat_key_check_invalid_chat_key_cases, id: 5304
    Device sessions

    38. test_can_use_purchased_stickers_on_recovered_account, id: 5783
    Device sessions

    39. test_dapps_permissions, id: 5738
    Device sessions

    40. test_account_recovery_with_uppercase_whitespaces_seed_phrase_special_char_passw_logcat, id: 5394
    Device sessions

    41. test_share_copy_contact_code_and_wallet_address, id: 5323
    Device sessions

    42. test_wallet_set_up, id: 5335
    Device sessions

    43. test_send_transaction_with_custom_token, id: 6208
    Device sessions

    44. test_logcat_backup_recovery_phrase, id: 5419
    Device sessions

    45. test_collectible_from_wallet, id: 5346
    Device sessions

    46. test_add_and_remove_mention_contact_with_nickname_from_public_chat, id: 5332
    Device sessions

    47. test_restore_account_from_mnemonic_to_keycard, id: 6240
    Device sessions

    48. test_pass_phrase_validation, id: 5363
    Device sessions

    49. test_user_can_see_collectibles_on_rinkeby_after_account_recovering, id: 5381
    Device sessions

    50. test_send_and_open_links_with_previews, id: 5373
    Device sessions

    51. test_reactions_to_message_in_chats, id: 6315
    Device sessions

    52. test_fetching_balance_after_offline, id: 6237
    Device sessions

    53. test_push_notification_1_1_chat_no_pn_activity_center, id: 6283
    Device sessions

    @qoqobolo
    Copy link
    Contributor

    @bitgamma thanks for this fix!
    The issue itself is fixed, however, I noticed a redirect to a probably unexpected screen during a card resetting

    Steps:

    1. Create or recover a Keycard multi-account
    2. Re-install Status or open it on another device
    3. Accept Status Terms of Use > Get started > Access existing keys > Recover with Keycard > Begin recovery
    4. Enter invalid 6-digit passcode 3 times
    5. On the Keycard is frozen screen tap Reset with the mnemonic
    6. Enter seed phrase > Begin setup > Create a 6-digit passcode and confirm it

    Actual result:
    The Keycard access is reset pop-up is shown, but the user is redirected to the Get your keys screen, so they will have to onboard from the beginning despite the fact that the seed phrase has already been entered and a password has been created

    Expected result:
    The user is redirected to the login screen (unless there are other reasons to keep the current way)

    video_2021-12-27_12-59-37.mp4

    @bitgamma
    Copy link
    Member Author

    bitgamma commented Dec 27, 2021

    @qoqobolo that was actually on purpouse. Thing is that the recovery with workflow procedure overwrites all flow information so we don't know what the user was doing. Making the onboarding finishing would be possible, but it would make the already intricate logic even more intricate (short of doing some big refactoring). Since this seems to be a very edge case, bringing the user to the start so they can do whatever they wanted to do seemed the best thing option. What do you think?

    @qoqobolo
    Copy link
    Contributor

    @bitgamma yeah, I suspected that this was done on purpose, there's no doubt now :) Thanks for the explanation!
    PR can be merged (the failed tests are not related to PR).

    @status-im-auto
    Copy link
    Member

    13% of end-end tests have passed

    Total executed tests: 15
    Failed tests: 13
    Passed tests: 2
    
    IDs of failed tests: 6293,6249,695843,6228,6279,6253,5310,5675,6305,5762,5379,5387,5309 
    

    Failed tests (13)

    Click to expand
  • Rerun tests

  • 1. test_keycard_send_eth_in_1_1_chat, id: 6293

    Transaction #5, amount is 0.0023151758
    {'blockNumber': '11676740', 'timeStamp': '1640272802', 'hash': '0xa03d1d325fb47553273eb1c128d1df718bd4eae730f32ede100f5d99033c176e', 'nonce': '6922', 'blockHash': '0x35414febbadf18bf4d16bdbefaa28d958761e07bebcfc0f9c0ac220a70e13b2e', 'transactionIndex': '2', 'from': '0xf7cb60839c0de25e37be0391c33bb34a8f0f8414', 'to': '0x84c3646047fa3465c91cc91cba4e59f5cb474c8f', 'value': '2315175800000000', 'gas': '21000', 'gasPrice': '2807350918', 'isError': '0', 'txreceipt_status': '1', 'input': '0x', 'contractAddress': '', 'cumulativeGasUsed': '96971', 'gasUsed': '21000', 'confirmations': '24000'}

    Transaction with amount 0.0027142418 is not found in list of ETH transactions, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414 during 300s

    Device sessions

    2. test_keycard_request_stt_from_daap, id: 6249

    Device 1: Tap on found: Button
    Device 1: Waiting 400s for STT updated balance

    Device 1: Balance STT 6274000.0 is not changed during 400 seconds!

    Device sessions

    3. test_edit_delete_message_in_one_to_one_and_public_chats, id: 695843

    Device 1: Looking for a message by text: Message AFTER edit 2
    Device 2: Looking for a message by text: Message AFTER edit 2

    No mark in message bubble about this message was edited Message is not edited.

    Device sessions

    4. test_mobile_data_usage_complex_settings, id: 6228

    Device 1: Find 'Button' by 'xpath': `//*[@text="Use mobile data"]/following-sibling::android.widget.Switch[1]`
    Device 1: Find 'Button' by 'xpath': `//*[@text="Ask me when on mobile network"]/following-sibling::android.widget.Switch[1]`

    Not connected to history node after enabling fetching on mobile data Chat history was not fetched with mobile data fetching ON

    Device sessions

    5. test_send_eth_to_ens_in_chat, id: 6279

    Transaction #5, amount is 0.0023151758
    {'blockNumber': '11676740', 'timeStamp': '1640272802', 'hash': '0xa03d1d325fb47553273eb1c128d1df718bd4eae730f32ede100f5d99033c176e', 'nonce': '6922', 'blockHash': '0x35414febbadf18bf4d16bdbefaa28d958761e07bebcfc0f9c0ac220a70e13b2e', 'transactionIndex': '2', 'from': '0xf7cb60839c0de25e37be0391c33bb34a8f0f8414', 'to': '0x84c3646047fa3465c91cc91cba4e59f5cb474c8f', 'value': '2315175800000000', 'gas': '21000', 'gasPrice': '2807350918', 'isError': '0', 'txreceipt_status': '1', 'input': '0x', 'contractAddress': '', 'cumulativeGasUsed': '96971', 'gasUsed': '21000', 'confirmations': '23956'}

    Transaction with amount 0.002714251 is not found in list of ETH transactions, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414 during 300s

    Device sessions

    6. test_send_eth_in_1_1_chat_transaction_push, id: 6253

    Transaction #5, amount is 0.002221474
    {'blockNumber': '11672222', 'timeStamp': '1640209789', 'hash': '0x9a2adb4a668f6f3a9b7836068760b2c236be6e553fadb8f337758e14b2614a99', 'nonce': '1654', 'blockHash': '0x7791cc583b26299b209d4626c82add2f18242072a2f2dea1cba2603cd7ccf1ad', 'transactionIndex': '1', 'from': '0xa456a6bde144695879a754b19dd13e9f75ea43f2', 'to': '0xb978cfe9882774bb84335d2cd445ca958e7d7805', 'value': '2221474000000000', 'gas': '21000', 'gasPrice': '1513660804', 'isError': '0', 'txreceipt_status': '1', 'input': '0x', 'contractAddress': '', 'cumulativeGasUsed': '127123', 'gasUsed': '21000', 'confirmations': '28507'}

    Transaction with amount 0.0027141718 is not found in list of ETH transactions, address is a456a6bde144695879a754b19dd13e9f75ea43f2 during 300s

    Device sessions

    7. test_offline_is_shown_messaging_1_1_chat_sent_delivered, id: 5310

    Device 1: Looking for chat: 'Robust Simple Raptors'
    Device 1: Wait for element 'Button' for max 60s and click when it is available

    Device 1: Button by accessibility id:`notifications-unread-badge` is not found on the screen

    Device sessions

    8. test_redirect_to_public_chat_tapping_tag_message_fetch_more_history, id: 5675

    Device 1: 'Text' is '#spectentur'
    # STEP: Check that can fetch previous history

    Device 1: "Dec 26, 2021" is not shown

    Device sessions

    9. test_image_in_one_to_one_send_save_reply_timeline, id: 6305

    Device 2: Find 'Button' by 'xpath': `//*[@text="Hey hey hey"]`
    Device 2: Find 'Button' by 'xpath': `//*[@text="Hey hey hey"]`

    Device 2: Button by xpath: `//*[@text="Hey hey hey"]` is not found on the screen

    Device sessions

    10. test_pair_devices_sync_one_to_one_contacts_nicknames_public_chat, id: 5762

    Device 1: Looking for a message by text: I am blocked user
    Device 1: Find 'ChatElementByText' by 'xpath': `//*[starts-with(@text,'I am blocked user')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']`

    Device 1: ChatElementByText by xpath:`//*[starts-with(@text,'I am blocked user')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen

    Device sessions

    11. test_home_view, id: 5379

    Device 1: Tap on found: Button
    Device 1: Find 'Button' by 'xpath': `//*[@text="#status"]`

    Device 1: Button by xpath: `//*[@text="#status"]` is not found on the screen

    Device sessions

    12. test_delete_chats_via_delete_button_rejoin, id: 5387

    ## Public chat 'public-delete-long-press' is created successfully!
    Device 1: Looking for a message by text: test message:icoirknesx

    Messages are not fetched when rejoining public chat after deleting

    Device sessions

    13. test_request_stt_from_dapp, id: 5309

    Device 1: Tap on found: Button
    Device 1: Waiting 400s for STT updated balance

    Device 1: Balance STT 6274000.0 is not changed during 400 seconds!

    Device sessions

    Passed tests (2)

    Click to expand

    1. test_request_and_receive_stt_in_1_1_chat_offline, id: 6263
    Device sessions

    2. test_set_profile_picture, id: 6646
    Device sessions

    @bitgamma bitgamma merged commit e45f959 into develop Dec 27, 2021
    @bitgamma bitgamma deleted the fix/12938 branch December 27, 2021 17:35
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    No open projects
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    Unable to reset Keycard if it was frozen during account recovery (Keycard pairing)
    4 participants