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

throw errors on dangerous behaviours #9032

Merged
merged 1 commit into from
Sep 25, 2019
Merged

Conversation

yenda
Copy link
Contributor

@yenda yenda commented Sep 24, 2019

This PR doesn't fix anything but instead will help solve a few pending bugs. (it will change the way these bugs manifest and decrease their severity, accounts shouldn't be toasted anymore and instead the app crashes and the issue is logged)

  • if multiaccount settings are saved on top of an empty map or nil,
    this means something went wrong, the state of the app is unstable,
    and actually saving will result in loss of data. It should never
    happen, but if it does, throw and error and abort.
  • sometimes two fxs are merged when they shouldn't, this is caused by
    bugs and should never happen, but if it does, throw an error with arguments
    for both effects to help localize the error

status: ready

@yenda yenda requested a review from a team as a code owner September 24, 2019 20:54
@yenda yenda self-assigned this Sep 24, 2019
@auto-assign auto-assign bot removed the request for review from a team September 24, 2019 20:54
@status-github-bot
Copy link

status-github-bot bot commented Sep 24, 2019

Pull Request Checklist

  • Docs: Updated the documentation, if affected
  • Docs: Added or updated inline comments explaining intention of the code
  • Tests: Ensured that all new UI elements have been assigned accessibility IDs
  • Tests: Signaled need for E2E tests with label, if applicable
  • Tests: Briefly described what was tested and what platforms were used
  • UI: In case of UI changes, ensured that UI matches Figma
  • UI: In case of UI changes, requested review from a Core UI designer
  • UI: In case of UI changes, included screenshots of implementation

@status-im-auto
Copy link
Member

status-im-auto commented Sep 24, 2019

Jenkins Builds

Click to see older builds (12)
Commit #️⃣ Finished (UTC) Duration Platform Result
166b7a6 #1 2019-09-24 21:03:07 ~8 min ios 📄 log
166b7a6 #1 2019-09-24 21:06:07 ~11 min macos 📄 log
166b7a6 #1 2019-09-24 21:06:51 ~11 min android-e2e 📄 log
166b7a6 #1 2019-09-24 21:08:54 ~13 min windows 📄 log
166b7a6 #1 2019-09-24 21:13:04 ~18 min android 📄 log
166b7a6 #1 2019-09-24 21:13:19 ~18 min linux 📄 log
✔️ 577cbb7 #2 2019-09-25 06:54:58 ~8 min ios 📦 ipa
✔️ 577cbb7 #2 2019-09-25 06:59:08 ~12 min macos 📦 dmg
✔️ 577cbb7 #2 2019-09-25 06:59:57 ~13 min android 📦 apk
✔️ 577cbb7 #2 2019-09-25 07:00:02 ~13 min android-e2e 📦 apk
✔️ 577cbb7 #2 2019-09-25 07:00:49 ~14 min linux 📦 App
✔️ 577cbb7 #2 2019-09-25 07:01:38 ~15 min windows 📦 exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 2360126 #3 2019-09-25 08:42:41 ~8 min ios 📦 ipa
✔️ 2360126 #3 2019-09-25 08:46:07 ~12 min macos 📦 dmg
✔️ 2360126 #3 2019-09-25 08:46:22 ~12 min android-e2e 📦 apk
✔️ 2360126 #3 2019-09-25 08:50:43 ~16 min windows 📦 exe
✔️ 2360126 #3 2019-09-25 08:51:31 ~17 min android 📦 apk
✔️ 2360126 #3 2019-09-25 08:52:01 ~18 min linux 📦 App
✔️ 6662895 #4 2019-09-25 13:53:10 ~8 min ios 📦 ipa
✔️ 6662895 #4 2019-09-25 13:57:00 ~12 min macos 📦 dmg
✔️ 6662895 #4 2019-09-25 13:58:22 ~13 min linux 📦 App
✔️ 6662895 #4 2019-09-25 13:58:26 ~14 min android-e2e 📦 apk
✔️ 6662895 #5 2019-09-25 15:22:53 ~12 min windows 📦 exe
✔️ 6662895 #5 2019-09-25 15:27:39 ~18 min android 📦 apk

@yenda yenda force-pushed the fix/throw-errors-unstable-state branch from 166b7a6 to 577cbb7 Compare September 25, 2019 06:46
@yenda
Copy link
Contributor Author

yenda commented Sep 25, 2019

tested on iPhone, it doesn't crash the app with #8930 but it does prevent account toasting

@yenda yenda force-pushed the fix/throw-errors-unstable-state branch 2 times, most recently from 2360126 to 6662895 Compare September 25, 2019 13:44
@statustestbot
Copy link

100% of end-end tests have passed

Total executed tests: 47
Failed tests: 0
Passed tests: 47

Passed tests (47)

Click to expand
1. test_block_user_from_public_chat
Device sessions

2. test_filters_from_daap
Device sessions

3. test_copy_and_paste_messages
Device sessions

4. test_send_transaction_from_daap
Device sessions

5. test_deploy_contract_from_daap
Device sessions

6. test_open_transaction_on_etherscan
Device sessions

7. test_public_chat_messaging
Device sessions

8. test_long_press_to_delete_1_1_chat
Device sessions

9. test_password_in_logcat_sign_in
Device sessions

10. test_text_message_1_1_chat
Device sessions

11. test_add_to_contacts
Device sessions

12. test_sign_typed_message
Device sessions

13. test_unread_messages_counter_1_1_chat
Device sessions

14. test_ens_in_public_chat
Device sessions

15. test_logcat_send_transaction_from_daap
Device sessions

16. test_send_message_in_group_chat
Device sessions

17. test_logcat_send_transaction_from_wallet
Device sessions

18. test_send_token_with_7_decimals
Device sessions

19. test_offline_messaging_1_1_chat
Device sessions

20. test_modify_transaction_fee_values
Device sessions

21. test_send_eth_from_wallet_to_address
Device sessions

22. test_add_account_to_multiaccount_instance
Device sessions

23. test_manage_assets
Device sessions

24. test_long_press_to_delete_public_chat
Device sessions

25. test_send_emoji
Device sessions

26. test_search_chat_on_home
Device sessions

27. test_logcat_recovering_account
Device sessions

28. test_can_add_existing_ens
Device sessions

29. test_messaging_in_different_networks
Device sessions

30. test_logcat_backup_recovery_phrase
Device sessions

31. test_logcat_sign_message_from_daap
Device sessions

32. test_switch_users_and_add_new_account
Device sessions

33. test_send_stt_from_wallet
Device sessions

34. test_login_with_new_account
Device sessions

35. test_start_chat_with_ens
Device sessions

36. test_add_contact_from_public_chat
Device sessions

37. test_send_two_transactions_one_after_another_in_dapp
Device sessions

38. test_password_in_logcat_creating_account
Device sessions

39. test_backup_recovery_phrase
Device sessions

40. test_offline_status
Device sessions

41. test_open_google_com_via_open_dapp
Device sessions

42. test_unread_messages_counter_public_chat
Device sessions

43. test_sign_message_from_daap
Device sessions

44. test_user_can_remove_profile_picture
Device sessions

45. test_share_contact_code_and_wallet_address
Device sessions

46. test_refresh_button_browsing_app_webview
Device sessions

47. test_backup_recovery_phrase_warning_from_wallet
Device sessions

- if multiaccount settings are saved on top of an empty map or nil,
this means something went wrong, the state of the app is unstable,
and actually saving will result in loss of data. It should never
happen, but if it does, throw and error and abort.
- sometimes two fxs are merged when they shouldn't, this is caused by
bugs and should never happen, but if it does, throw an error with arguments
for both effects to help localize the error

Signed-off-by: yenda <eric@status.im>
@yenda yenda force-pushed the fix/throw-errors-unstable-state branch from 6662895 to c047b58 Compare September 25, 2019 17:34
@yenda yenda merged commit c047b58 into develop Sep 25, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix/throw-errors-unstable-state branch September 25, 2019 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants