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

bug #4876 - cleaning up failed transactions and added stricter check … #4885

Merged
merged 1 commit into from
Jun 22, 2018

Conversation

goranjovic
Copy link
Contributor

@goranjovic goranjovic commented Jun 21, 2018

fixes #4876

Summary:

We check if there is a current transaction when we do wallet onboarding because it tells us the difference between wallet onboarding directly vs onboarding triggered by /send commands. The cause of the problem was that failed transactions were not cleaned up and remained "current", which means that if the user did have a failed transaction before finishing onboarding, we'd get this error

The solution in this PR is to clean up the current transaction when failed and also to add more defensive checks in onboarding, just in case.

EDIT: This PR now also marks successful transactions as not in progress and not from chat any more (if they were). This should prevent them from triggering the same behavior as the one with failed ones described above.

Steps to test:

see #4876

status: ready

@goranjovic goranjovic self-assigned this Jun 21, 2018
Copy link
Contributor

@mandrigin mandrigin left a comment

Choose a reason for hiding this comment

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

👍

@mandrigin mandrigin requested a review from janherich June 21, 2018 09:52
@status-comment-bot
Copy link

status-comment-bot commented Jun 21, 2018

@annadanchenko annadanchenko self-assigned this Jun 21, 2018
@annadanchenko
Copy link

annadanchenko commented Jun 21, 2018

  1. If use scenario described in Error: Doesn't support name and white screen if open Wallet 1st time after opening transaction screen from Dapp #4876 (so invoke Sign transaction from DApp) then issue does not happen anymore
  2. If invoke successful transaction from the DApp (e.g. request STT from Test Dapp on ropsten) then similar issue happens, TF see from 02:21 https://app.testfairy.com/projects/4803622-status/builds/8502038/sessions/4394533165/?accessToken=V1f/U4Y/HK5SW5cl5QcZUwgDZ0Q

Exact steps:

  1. Install status and create account
  2. switch to ropsten
  3. request test eth from faucet
  4. open Test DApp and wait ~1 min to get test eth, do nothing
  5. after ~ 1min open Assets -> Request STT
  6. Sign transaction
  7. Close Dapp
  8. Tap on Wallet, confirm that 3 words are written down and proceed
    Currently, instead of the main wallet screen there is error:

02:38 E/ReactNativeJS: Error: Doesn't support name:
02:38 E/ReactNativeJS:
02:38 E/ReactNativeJS: This error is located at:
02:38 E/ReactNativeJS: in asset-selector
02:38 E/ReactNativeJS: in reagent134
02:38 E/ReactNativeJS: in RCTView
02:38 E/ReactNativeJS: in RCTView
02:38 E/ReactNativeJS: in RCTScrollView
02:38 E/ReactNativeJS: in ScrollView
02:38 E/ReactNativeJS: in RCTView
02:38 E/ReactNativeJS: in RCTView
02:38 E/ReactNativeJS: in reagent11
02:38 E/ReactNativeJS: in reagent130
02:38 E/ReactNativeJS: in reagent129
02:38 E/ReactNativeJS: in send-transaction
02:38 E/ReactNativeJS: in reagent157
02:38 E/ReactNativeJS: in RCTView
02:38 E/ReactNativeJS: in main
02:38 E/ReactNativeJS: in root
02:38 E/ReactNativeJS: in reagent1
02:38 E/ReactNativeJS: in RCTView
02:38 E/ReactNativeJS: in RCTView
02:38 E/ReactNativeJS: in t

@statustestbot
Copy link

90% of end-end tests have passed

Total executed tests: 29
Failed tests: 3
Passed tests: 26

Failed tests (3)

Click to expand
1. test_username_and_profile_picture_in_chats

Tap on EditButton
Looking for EditPictureButton

E selenium.common.exceptions.NoSuchElementException: Message: 'EditPictureButton' is not found on screen, using: 'accessibility id:edit-profile-photo-button'

Device sessions:

2. test_incorrect_password

Tap on ProfileButton
Looking for UserNameText

E selenium.common.exceptions.NoSuchElementException: Message: 'UserNameText' is not found on screen, using: 'xpath://android.widget.ImageView[@content-desc="chat-icon"]/../../android.widget.TextView'

Device sessions:

3. test_profile_picture

Tap on EditButton
Looking for EditPictureButton

E selenium.common.exceptions.NoSuchElementException: Message: 'EditPictureButton' is not found on screen, using: 'accessibility id:edit-profile-photo-button'

Device sessions:

Passed tests (26)

Click to expand
1. test_sign_transaction_twice
Device sessions:

2. test_swipe_and_delete_1_1_chat
Device sessions:

3. test_one_to_one_chat_messages
Device sessions:

4. test_copy_and_paste_messages
Device sessions:

5. test_send_transaction_from_daap
Device sessions:

6. test_faucet_console_command
Device sessions:

7. test_send_eth_from_wallet_sign_now
Device sessions:

8. test_open_transaction_on_etherscan
Device sessions:

9. test_send_eth_to_request_from_wallet
Device sessions:

10. test_backup_seed_phrase_and_recover_account
Device sessions:

11. test_offline_messaging_1_1_chat
Device sessions:

12. test_contact_profile_view
Device sessions:

13. test_public_chat
Device sessions:

14. test_public_chat_management
Device sessions:

15. test_network_switch
Device sessions:

16. test_delete_1_1_chat
Device sessions:

17. test_wallet_error_messages
Device sessions:

18. test_transaction_send_command_one_to_one_chat
Device sessions:

19. test_browse_link_entering_url_in_dapp_view
Device sessions:

20. test_transaction_send_command_wrong_password
Device sessions:

21. test_send_eth_to_request_in_one_to_one_chat
Device sessions:

22. test_switch_users
Device sessions:

23. test_set_up_wallet
Device sessions:

24. test_send_stt_from_wallet_via_enter_recipient_address
Device sessions:

25. test_qr_code_and_its_value
Device sessions:

26. test_sign_message_from_daap
Device sessions:

@goranjovic goranjovic force-pushed the bug/dapp-then-onboarding-4876 branch 2 times, most recently from d7e29ba to d0afb49 Compare June 21, 2018 14:37
@status-comment-bot
Copy link

status-comment-bot commented Jun 21, 2018

@statustestbot
Copy link

82% of end-end tests have passed

Total executed tests: 28
Failed tests: 5
Passed tests: 23

Failed tests (5)

Click to expand
1. test_username_and_profile_picture_in_chats

Tap on EditButton
Looking for EditPictureButton

E selenium.common.exceptions.NoSuchElementException: Message: 'EditPictureButton' is not found on screen, using: 'accessibility id:edit-profile-photo-button'

Device sessions:

2. test_incorrect_password

Tap on ProfileButton
Looking for UserNameText

E selenium.common.exceptions.NoSuchElementException: Message: 'UserNameText' is not found on screen, using: 'xpath://android.widget.ImageView[@content-desc="chat-icon"]/../../android.widget.TextView'

Device sessions:

3. test_offline_messaging_1_1_chat
E AttributeError: 'NoneType' object has no attribute 'encode'

4. test_transaction_send_command_one_to_one_chat

Looking for full text: 'Delivered'
Looking for full text: 'Seen'

E selenium.common.exceptions.TimeoutException: Message: 'BaseElement' is not found on screen, using: 'xpath://*[@text="Sent"]', during '10' seconds

During handling of the above exception, another exception occurred:
E selenium.common.exceptions.TimeoutException: Message: 'BaseElement' is not found on screen, using: 'xpath://*[@text="Delivered"]', during '10' seconds

During handling of the above exception, another exception occurred:
E selenium.common.exceptions.TimeoutException: Message: 'BaseElement' is not found on screen, using: 'xpath://*[@text="Seen"]', during '3' seconds


Device sessions:

5. test_profile_picture

Tap on EditButton
Looking for EditPictureButton

E selenium.common.exceptions.NoSuchElementException: Message: 'EditPictureButton' is not found on screen, using: 'accessibility id:edit-profile-photo-button'

Device sessions:

Passed tests (23)

Click to expand
1. test_sign_transaction_twice
Device sessions:

2. test_swipe_and_delete_1_1_chat
Device sessions:

3. test_one_to_one_chat_messages
Device sessions:

4. test_copy_and_paste_messages
Device sessions:

5. test_send_transaction_from_daap
Device sessions:

6. test_faucet_console_command
Device sessions:

7. test_open_transaction_on_etherscan
Device sessions:

8. test_send_eth_to_request_from_wallet
Device sessions:

9. test_backup_seed_phrase_and_recover_account
Device sessions:

10. test_contact_profile_view
Device sessions:

11. test_public_chat
Device sessions:

12. test_public_chat_management
Device sessions:

13. test_network_switch
Device sessions:

14. test_delete_1_1_chat
Device sessions:

15. test_wallet_error_messages
Device sessions:

16. test_browse_link_entering_url_in_dapp_view
Device sessions:

17. test_transaction_send_command_wrong_password
Device sessions:

18. test_send_eth_to_request_in_one_to_one_chat
Device sessions:

19. test_switch_users
Device sessions:

20. test_set_up_wallet
Device sessions:

21. test_send_stt_from_wallet_via_enter_recipient_address
Device sessions:

22. test_qr_code_and_its_value
Device sessions:

23. test_sign_message_from_daap
Device sessions:

…ded stricter check for chat wallet onboarding

Signed-off-by: Julien Eluard <[email protected]>
@jeluard jeluard force-pushed the bug/dapp-then-onboarding-4876 branch from d0afb49 to ac2780e Compare June 22, 2018 06:30
@jeluard jeluard merged commit ac2780e into develop Jun 22, 2018
@jeluard jeluard deleted the bug/dapp-then-onboarding-4876 branch June 22, 2018 06:32
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
9 participants