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

Get rid of StatusService. #7334

Merged
merged 1 commit into from Jan 29, 2019

Conversation

7 participants
@mandrigin
Copy link
Member

mandrigin commented Jan 24, 2019

Android 9 somehow changed the restrictions of starting background services in Activity#onResume, it isn't allowed anymore. I'm not exactly sure if that is intended or a bug.

UPD: it's an Android bug:

This change delays starting the service up until the app is in foreground, by using lifecycle listeners (see this article to read more on them).

That is what I used as an example of this workaround: mapbox/mapbox-events-android#157

Okay, StatusService was only used as a weird layer between status-go to pass signalEvent:. I simplified it in a way that is still compatible with old status-go (no class rename), but it works completely differently.

In a nutshell, we just use a singleton class that either gets initialised when the StatusModule is there or when JNI is looking up for an instance. Then it just passes all the signalEvent: calls to StatusModule.

That way we don't need for service to initialise, so I removed all mentions of it and Android works roughly the same as iOS now.

fixes #7198
fixes #7281

status: ready

@status-github-bot

This comment has been minimized.

Copy link

status-github-bot bot commented Jan 24, 2019

Pull Request Checklist

  • Have you updated the documentation, if impacted (e.g. docs.status.im)?

@status-github-bot status-github-bot bot added this to REVIEW in Pipeline for QA Jan 24, 2019

@mandrigin mandrigin self-assigned this Jan 24, 2019

@status-im-auto

This comment has been minimized.

Copy link
Member

status-im-auto commented Jan 24, 2019

Jenkins Builds

Click to see older builds (42)
Commit #️⃣ Finished (UTC) Duration Platform Result
fe1c388 #1 2019-01-24 13:25:15 ~54 sec ios-e2e 📄 build log
✔️ fe1c388 #1 2019-01-24 13:39:44 ~15 min ios 📦 package
✔️ fe1c388 #1 2019-01-24 13:39:49 ~15 min macos 📦 package
✔️ fe1c388 #1 2019-01-24 13:42:59 ~18 min android-e2e 📦 package
✔️ fe1c388 #1 2019-01-24 13:45:20 ~21 min android 📦 package
✔️ fe1c388 #1 2019-01-24 13:45:38 ~21 min windows 📦 package
✔️ fe1c388 #2 2019-01-24 13:46:20 ~18 min ios-e2e 📦 package
✔️ fe1c388 #1 2019-01-24 13:48:05 ~23 min linux 📦 package
✔️ 6e4d3c9 #2 2019-01-24 14:22:04 ~13 min macos 📦 package
✔️ 6e4d3c9 #3 2019-01-24 14:22:16 ~14 min ios-e2e 📦 package
✔️ 6e4d3c9 #2 2019-01-24 14:23:44 ~15 min ios 📦 package
✔️ 6e4d3c9 #2 2019-01-24 14:29:59 ~21 min windows 📦 package
✔️ 6e4d3c9 #2 2019-01-24 14:30:25 ~22 min linux 📦 package
✔️ 6e4d3c9 #2 2019-01-24 14:37:13 ~29 min android-e2e 📦 package
✔️ 6e4d3c9 #2 2019-01-24 14:39:09 ~31 min android 📦 package
✔️ 6e4d3c9 #3 2019-01-25 12:08:47 ~25 min android 📦 package
b471217 #4 2019-01-25 14:40:04 ~18 sec ios-e2e 📄 build log
b471217 #3 2019-01-25 14:40:06 ~19 sec ios 📄 build log
b471217 #3 2019-01-25 14:40:12 ~22 sec windows 📄 build log
b471217 #3 2019-01-25 14:40:12 ~24 sec linux 📄 build log
b471217 #3 2019-01-25 14:40:13 ~29 sec android-e2e 📄 build log
b471217 #4 2019-01-25 14:40:17 ~32 sec android 📄 build log
b471217 #3 2019-01-25 14:40:20 ~31 sec macos 📄 build log
✔️ 72b6ce5 #5 2019-01-25 14:57:52 ~15 min ios-e2e 📦 package
✔️ 72b6ce5 #4 2019-01-25 14:59:02 ~16 min ios 📦 package
✔️ 72b6ce5 #4 2019-01-25 14:59:42 ~17 min macos 📦 package
✔️ 59485ee #6 2019-01-25 15:07:49 ~18 min android 📦 package
✔️ 59485ee #5 2019-01-25 15:09:03 ~19 min android-e2e 📦 package
✔️ 59485ee #5 2019-01-25 15:11:13 ~21 min windows 📦 package
✔️ 59485ee #6 2019-01-25 15:12:35 ~22 min ios-e2e 📦 package
✔️ 59485ee #5 2019-01-25 15:13:24 ~23 min macos 📦 package
✔️ 59485ee #5 2019-01-25 15:13:35 ~23 min ios 📦 package
✔️ 59485ee #5 2019-01-25 15:17:05 ~27 min linux 📦 package
398267e #6 2019-01-25 15:44:19 ~1 min ios 📄 build log
398267e #7 2019-01-25 15:44:19 ~1 min ios-e2e 📄 build log
✔️ 398267e #6 2019-01-25 15:56:47 ~13 min macos 📦 package
✔️ 398267e #7 2019-01-25 15:59:48 ~16 min android 📦 package
✔️ 398267e #6 2019-01-25 16:01:44 ~18 min windows 📦 package
✔️ 398267e #8 2019-01-25 16:02:46 ~14 min ios-e2e 📦 package
✔️ 398267e #7 2019-01-25 16:03:04 ~14 min ios 📦 package
✔️ 398267e #6 2019-01-25 16:04:26 ~21 min linux 📦 package
✔️ 398267e #6 2019-01-25 16:05:11 ~22 min android-e2e 📦 package
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ d688d2d #7 2019-01-28 10:52:08 ~14 min macos 📦 package
✔️ d688d2d #10 2019-01-28 10:53:27 ~15 min ios-e2e 📦 package
✔️ d688d2d #11 2019-01-28 10:58:27 ~14 min ios 📦 package
✔️ d688d2d #9 2019-01-28 10:59:32 ~21 min android 📦 package
✔️ d688d2d #7 2019-01-28 11:00:16 ~22 min windows 📦 package
✔️ d688d2d #8 2019-01-28 11:01:10 ~23 min android-e2e 📦 package
✔️ d688d2d #7 2019-01-28 11:01:50 ~23 min linux 📦 package
04579f1 #8 2019-01-29 11:01:42 ~1 min linux 📄 build log
✔️ 04579f1 #11 2019-01-29 11:15:49 ~15 min ios-e2e 📦 package
✔️ 04579f1 #8 2019-01-29 11:16:06 ~15 min macos 📦 package
✔️ 04579f1 #12 2019-01-29 11:16:53 ~16 min ios 📦 package
✔️ 04579f1 #10 2019-01-29 11:17:17 ~16 min android 📦 package
✔️ 04579f1 #9 2019-01-29 11:17:23 ~16 min android-e2e 📦 package
✔️ 04579f1 #8 2019-01-29 11:20:01 ~19 min windows 📦 package

@mandrigin mandrigin requested review from rasom and PombeirP Jan 24, 2019

@annadanchenko annadanchenko self-assigned this Jan 24, 2019


defaultConfig {
minSdkVersion 18
targetSdkVersion 26
minSdkVersion 23

This comment has been minimized.

@PombeirP

PombeirP Jan 24, 2019

Member

Does this mean that the lowest Android version we support is 6.0?

This comment has been minimized.

@mandrigin

mandrigin Jan 24, 2019

Author Member

The app itself already requires minSdkVersion 23, so to make react-native-status do that, it's no problem.

@status-github-bot status-github-bot bot moved this from REVIEW to TO TEST in Pipeline for QA Jan 24, 2019

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 24, 2019

@Swader hey! since you were along the people who were able to reproduce this issue quite easily, would you mind checking if this PR actually solves it?

Keep in mind, that that will most probably overwrite your current version of the app. It is based on our nightlies, so it should be pretty solid, but you can always lose data with it... So, do it only if you have your account seed phrase backed up and keep in mind that you might lose your contacts there...

@statustestbot

This comment has been minimized.

Copy link

statustestbot commented Jan 24, 2019

100% of end-end tests have passed

Total executed tests: 58
Failed tests: 0
Passed tests: 58

Passed tests (58)

Click to expand
1. test_create_account
Device sessions

2. test_user_can_switch_network
Device sessions

3. test_filters_from_daap
Device sessions

4. test_copy_and_paste_messages
Device sessions

5. test_send_transaction_from_daap
Device sessions

6. test_request_and_receive_tokens_in_1_1_chat
Device sessions

7. test_delete_cut_and_paste_messages
Device sessions

8. test_deploy_contract_from_daap
Device sessions

9. test_offline_login
Device sessions

10. test_pass_phrase_validation
Device sessions

11. test_public_chat_messaging
Device sessions

12. test_password_in_logcat_sign_in
Device sessions

13. test_set_profile_picture
Device sessions

14. test_text_message_1_1_chat
Device sessions

15. test_add_to_contacts
Device sessions

16. test_unread_messages_counter_1_1_chat
Device sessions

17. test_logcat_send_transaction_from_daap
Device sessions

18. test_onboarding_screen_when_requesting_tokens_for_new_account
Device sessions

19. test_logcat_send_transaction_from_wallet
Device sessions

20. test_send_token_with_7_decimals
Device sessions

21. test_modify_transaction_fee_values
Device sessions

22. test_token_with_more_than_allowed_decimals
Device sessions

23. test_send_eth_from_wallet_to_address
Device sessions

24. test_send_transaction_details_in_1_1_chat
Device sessions

25. test_manage_assets
Device sessions

26. test_wallet_set_up
Device sessions

27. test_logcat_send_transaction_in_1_1_chat
Device sessions

28. test_request_and_receive_eth_in_1_1_chat
Device sessions

29. test_swipe_to_delete_public_chat
Device sessions

30. test_passphrase_whitespaces_ignored_while_recovering_access
Device sessions

31. test_send_emoji
Device sessions

32. test_add_contact_by_pasting_public_key
Device sessions

33. test_logcat_recovering_account
Device sessions

34. test_messaging_in_different_networks
Device sessions

35. test_send_tokens_in_1_1_chat
Device sessions

36. test_network_mismatch_for_send_request_commands
Device sessions

37. test_logcat_sign_message_from_daap
Device sessions

38. test_swipe_to_delete_1_1_chat
Device sessions

39. test_switch_users_and_add_new_account
Device sessions

40. test_send_stt_from_wallet
Device sessions

41. test_send_eth_in_1_1_chat
Device sessions

42. test_login_with_new_account
Device sessions

43. test_send_eth_from_wallet_to_contact
Device sessions

44. test_add_contact_from_public_chat
Device sessions

45. test_send_request_not_enabled_tokens
Device sessions

46. test_send_message_to_newly_added_contact
Device sessions

47. test_password_in_logcat_creating_account
Device sessions

48. test_backup_recovery_phrase
Device sessions

49. test_offline_status
Device sessions

50. test_open_google_com_via_open_dapp
Device sessions

51. test_unread_messages_counter_public_chat
Device sessions

52. test_sign_message_from_daap
Device sessions

53. test_user_can_remove_profile_picture
Device sessions

54. test_share_contact_code_and_wallet_address
Device sessions

55. test_request_eth_in_wallet
Device sessions

56. test_refresh_button_browsing_app_webview
Device sessions

57. test_backup_recovery_phrase_warning_from_wallet
Device sessions

58. test_recover_account
Device sessions

@annadanchenko annadanchenko moved this from TO TEST to IN TESTING in Pipeline for QA Jan 24, 2019

@Swader

This comment has been minimized.

Copy link
Contributor

Swader commented Jan 25, 2019

@mandrigin I would love to but need help on how to do this as I don't know how to build and test a PR version of Status for Android. Any guide I can reference?

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

@Swader if you are okay with all the precautions, then you can just download and install this APK (the latest one for android on the table of builds:
https://status-im-prs.ams3.digitaloceanspaces.com/StatusIm-190124-140803-6e4d3c-pr.apk

But again, I want to reiterate that:

Keep in mind, that that will most probably overwrite your current version of the app. It is based on our nightlies, so it should be pretty solid, but you can always lose data with it... So, do it only if you have your account seed phrase backed up and keep in mind that you might lose your contacts there...

Or, if you are using nightlies, maybe you can just wait for the next nightly and this fix will be included in it.

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

Unfortunately, right now it is impossible to install PR builds aside the release, but this PR will fix it: #7287

@Swader

This comment has been minimized.

Copy link
Contributor

Swader commented Jan 25, 2019

Android just gives me "app not installed" after downloading and clicking Install and confirming an update process. No other error or explanation.

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

Oh, thanks to Android for not being helpful.
Are you currently using a nightly or a google play release?

@Swader

This comment has been minimized.

Copy link
Contributor

Swader commented Jan 25, 2019

I am currently on last night's nightly, installed without a problem just an hour ago.

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

@Swader any chance you have adb installed on your computer?

@Swader

This comment has been minimized.

Copy link
Contributor

Swader commented Jan 25, 2019

I do now. What do I need to do?

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

@Swader

  1. download the file to your computer:

https://status-im-prs.ams3.digitaloceanspaces.com/StatusIm-190124-140803-6e4d3c-pr.apk

  1. open terminal/console

  2. connect your phone with a cable to the computer, make sure that adb list shows it

  3. to to the dir with this file

  4. do adb install StatusIm-190124-140803-6e4d3c-pr.apk

@Swader

This comment has been minimized.

Copy link
Contributor

Swader commented Jan 25, 2019

Failure [INSTALL_FAILED_VERSION_DOWNGRADE]

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

@Swader ah, not now it's more useful :-) It just claims that your nightly (from today) is more fresh than this builds (from yesterday). Let me rebuild it for you, then it should be fine.

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

@Swader

This comment has been minimized.

Copy link
Contributor

Swader commented Jan 25, 2019

No effect. Or should I say same effect, different message.

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

@Swader thats... interesting. Can you tell me the exact steps you used to reproduce it and the model/maker of your Android device as well as if the firmware installed (stock or some open-source installed).

Also, adb logcat output would be useful too.

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

adb logcat's output should be acquired like that: https://sites.google.com/site/androidhowto/how-to-1/save-logcat-to-a-text-file

adb logcat -d > logcat.txt

Resources and How-to's for Google's Android SDK
@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

it really looks like that this is an Android 9 bug, many people are having this issue: https://issuetracker.google.com/issues/113122354

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

@statustestbot

This comment has been minimized.

Copy link

statustestbot commented Jan 25, 2019

100% of end-end tests have passed

Total executed tests: 58
Failed tests: 0
Passed tests: 58

Passed tests (58)

Click to expand
1. test_create_account
Device sessions

2. test_user_can_switch_network
Device sessions

3. test_filters_from_daap
Device sessions

4. test_copy_and_paste_messages
Device sessions

5. test_send_transaction_from_daap
Device sessions

6. test_request_and_receive_tokens_in_1_1_chat
Device sessions

7. test_delete_cut_and_paste_messages
Device sessions

8. test_deploy_contract_from_daap
Device sessions

9. test_offline_login
Device sessions

10. test_pass_phrase_validation
Device sessions

11. test_public_chat_messaging
Device sessions

12. test_password_in_logcat_sign_in
Device sessions

13. test_set_profile_picture
Device sessions

14. test_text_message_1_1_chat
Device sessions

15. test_add_to_contacts
Device sessions

16. test_unread_messages_counter_1_1_chat
Device sessions

17. test_logcat_send_transaction_from_daap
Device sessions

18. test_onboarding_screen_when_requesting_tokens_for_new_account
Device sessions

19. test_logcat_send_transaction_from_wallet
Device sessions

20. test_send_token_with_7_decimals
Device sessions

21. test_modify_transaction_fee_values
Device sessions

22. test_token_with_more_than_allowed_decimals
Device sessions

23. test_send_eth_from_wallet_to_address
Device sessions

24. test_send_transaction_details_in_1_1_chat
Device sessions

25. test_manage_assets
Device sessions

26. test_wallet_set_up
Device sessions

27. test_logcat_send_transaction_in_1_1_chat
Device sessions

28. test_request_and_receive_eth_in_1_1_chat
Device sessions

29. test_swipe_to_delete_public_chat
Device sessions

30. test_passphrase_whitespaces_ignored_while_recovering_access
Device sessions

31. test_send_emoji
Device sessions

32. test_add_contact_by_pasting_public_key
Device sessions

33. test_logcat_recovering_account
Device sessions

34. test_messaging_in_different_networks
Device sessions

35. test_send_tokens_in_1_1_chat
Device sessions

36. test_network_mismatch_for_send_request_commands
Device sessions

37. test_logcat_sign_message_from_daap
Device sessions

38. test_swipe_to_delete_1_1_chat
Device sessions

39. test_switch_users_and_add_new_account
Device sessions

40. test_send_stt_from_wallet
Device sessions

41. test_send_eth_in_1_1_chat
Device sessions

42. test_login_with_new_account
Device sessions

43. test_send_eth_from_wallet_to_contact
Device sessions

44. test_add_contact_from_public_chat
Device sessions

45. test_send_request_not_enabled_tokens
Device sessions

46. test_send_message_to_newly_added_contact
Device sessions

47. test_password_in_logcat_creating_account
Device sessions

48. test_backup_recovery_phrase
Device sessions

49. test_offline_status
Device sessions

50. test_open_google_com_via_open_dapp
Device sessions

51. test_unread_messages_counter_public_chat
Device sessions

52. test_sign_message_from_daap
Device sessions

53. test_user_can_remove_profile_picture
Device sessions

54. test_share_contact_code_and_wallet_address
Device sessions

55. test_request_eth_in_wallet
Device sessions

56. test_refresh_button_browsing_app_webview
Device sessions

57. test_backup_recovery_phrase_warning_from_wallet
Device sessions

58. test_recover_account
Device sessions

@mandrigin mandrigin force-pushed the bugfix/7198-crash-android- branch from b471217 to 72b6ce5 Jan 25, 2019

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

@annadanchenko @rasom @PombeirP I ended up getting rid of .StatuService whatsoever. It obviously changes everything here, so a re-review and re-test is needed :-)

@mandrigin mandrigin changed the title [WIP] Delay StatusService launch until the app is up and running on Android 9. Delay StatusService launch until the app is up and running on Android 9. Jan 25, 2019

@mandrigin mandrigin changed the title Delay StatusService launch until the app is up and running on Android 9. [WIP] Get rid of StatusService. Jan 25, 2019

@mandrigin mandrigin changed the title [WIP] Get rid of StatusService. Get rid of StatusService. Jan 25, 2019

@PombeirP PombeirP dismissed stale reviews from rasom and themself Jan 25, 2019

Approach to fix has changed

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

it should also fix #7281

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

@Swader can you try this build and check if you can reproduce the issue?

https://status-im-prs.ams3.digitaloceanspaces.com/StatusIm-190125-144936-59485e-pr.apk

@Swader

This comment has been minimized.

Copy link
Contributor

Swader commented Jan 25, 2019

OnePlus 6T, stock.

Reproduce: Go anywhere in the app (in this case localethereum) that isn't the home screen and then let the phone go to sleep. Wake 30 seconds later and it will always appear. Relevant: #7198

Logcat:
logcat3.zip

Testing new build in a few mins.

@Swader

This comment has been minimized.

Copy link
Contributor

Swader commented Jan 25, 2019

Problem resolved, thank you :)
I'll try and reproduce but right now, not succeeding. Well done!

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

@Swader awesome!

Btw, looking on your logcat. I don't know what Google did with Android 9.0 but services are really broken:

  1. Exception from Gitter.im: java.lang.RuntimeException: Unable to resume activity {im.gitter.gitter/im.gitter.gitter.activities.MainActivity}: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=im.gitter.gitter/.content.RestService (has extras) }: app is in background uid UidRecord{45aaa01 u0a136 TPSL bg:+23m25s654ms idle change:idle procs:1 seq(0,0,0)}

  2. Exception from something from Netgear: 01-21 11:30:57.578 31694 31694 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {com.netgear.android/com.netgear.android.activity.MainScreenActivity}: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.netgear.android.AudioStreamService.ACTION_BACKGROUND cmp=com.netgear.android/.stream.AudioStreamService (has extras) }: app is in background uid UidRecord{35e788e u0a117 TPSL bg:+10m10s437ms idle change:idle procs:1 seq(0,0,0)}

  3. Us (Status.im) 01-22 18:55:01.301 14242 14242 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {im.status.ethereum/im.status.ethereum.MainActivity}: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=im.status.ethereum/.module.StatusService }: app is in background uid UidRecord{cca0891 u0a124 TPSL bg:+8m55s99ms idle change:cached procs:1 seq(0,0,0)}

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

@Swader thanks a lot for testing the app!

@mandrigin mandrigin force-pushed the bugfix/7198-crash-android- branch from 59485ee to 398267e Jan 25, 2019

@mandrigin

This comment has been minimized.

Copy link
Member Author

mandrigin commented Jan 25, 2019

history rewrite to sign the commit and get autotests to run :)

@statustestbot

This comment has been minimized.

Copy link

statustestbot commented Jan 25, 2019

100% of end-end tests have passed

Total executed tests: 58
Failed tests: 0
Passed tests: 58

Passed tests (58)

Click to expand
1. test_create_account
Device sessions

2. test_user_can_switch_network
Device sessions

3. test_filters_from_daap
Device sessions

4. test_copy_and_paste_messages
Device sessions

5. test_send_transaction_from_daap
Device sessions

6. test_request_and_receive_tokens_in_1_1_chat
Device sessions

7. test_delete_cut_and_paste_messages
Device sessions

8. test_deploy_contract_from_daap
Device sessions

9. test_offline_login
Device sessions

10. test_pass_phrase_validation
Device sessions

11. test_public_chat_messaging
Device sessions

12. test_password_in_logcat_sign_in
Device sessions

13. test_set_profile_picture
Device sessions

14. test_text_message_1_1_chat
Device sessions

15. test_add_to_contacts
Device sessions

16. test_unread_messages_counter_1_1_chat
Device sessions

17. test_logcat_send_transaction_from_daap
Device sessions

18. test_onboarding_screen_when_requesting_tokens_for_new_account
Device sessions

19. test_logcat_send_transaction_from_wallet
Device sessions

20. test_send_token_with_7_decimals
Device sessions

21. test_modify_transaction_fee_values
Device sessions

22. test_token_with_more_than_allowed_decimals
Device sessions

23. test_send_eth_from_wallet_to_address
Device sessions

24. test_send_transaction_details_in_1_1_chat
Device sessions

25. test_manage_assets
Device sessions

26. test_wallet_set_up
Device sessions

27. test_logcat_send_transaction_in_1_1_chat
Device sessions

28. test_request_and_receive_eth_in_1_1_chat
Device sessions

29. test_swipe_to_delete_public_chat
Device sessions

30. test_passphrase_whitespaces_ignored_while_recovering_access
Device sessions

31. test_send_emoji
Device sessions

32. test_add_contact_by_pasting_public_key
Device sessions

33. test_logcat_recovering_account
Device sessions

34. test_messaging_in_different_networks
Device sessions

35. test_send_tokens_in_1_1_chat
Device sessions

36. test_network_mismatch_for_send_request_commands
Device sessions

37. test_logcat_sign_message_from_daap
Device sessions

38. test_swipe_to_delete_1_1_chat
Device sessions

39. test_switch_users_and_add_new_account
Device sessions

40. test_send_stt_from_wallet
Device sessions

41. test_send_eth_in_1_1_chat
Device sessions

42. test_login_with_new_account
Device sessions

43. test_send_eth_from_wallet_to_contact
Device sessions

44. test_add_contact_from_public_chat
Device sessions

45. test_send_request_not_enabled_tokens
Device sessions

46. test_send_message_to_newly_added_contact
Device sessions

47. test_password_in_logcat_creating_account
Device sessions

48. test_backup_recovery_phrase
Device sessions

49. test_offline_status
Device sessions

50. test_open_google_com_via_open_dapp
Device sessions

51. test_unread_messages_counter_public_chat
Device sessions

52. test_sign_message_from_daap
Device sessions

53. test_user_can_remove_profile_picture
Device sessions

54. test_share_contact_code_and_wallet_address
Device sessions

55. test_request_eth_in_wallet
Device sessions

56. test_refresh_button_browsing_app_webview
Device sessions

57. test_backup_recovery_phrase_warning_from_wallet
Device sessions

58. test_recover_account
Device sessions

@annadanchenko annadanchenko moved this from TO TEST to IN TESTING in Pipeline for QA Jan 25, 2019

@rasom

rasom approved these changes Jan 28, 2019

Copy link
Member

rasom left a comment

12m

@PombeirP
Copy link
Member

PombeirP left a comment

Great cleanup! Only a couple minor ortho fixes

@annadanchenko

This comment has been minimized.

Copy link
Member

annadanchenko commented Jan 28, 2019

Update: can reproduce on nightly, so not introduced by this PR

@mandrigin sometimes there is an error or crash upon logout (investigating exact case when it happens and trying to reproduce also on nightly), account has public, group and 1:1 chats and performed some transactions. Pre-selected mailserver is used (mail-03.ac-cn-hongkong-c.eth.beta), develop mode is off.

these steps can lead to the issue:

preselect mailserver and logout/login again

  1. join some public chat with messages
  2. log out
  3. log in (so it's not automatic)
  4. open chat you've just joined
  5. as soon as you see green Connected line go to profile and logout
01-28 12:03:19.204 17622 18304 D StatusModule: stopNode
01-28 12:03:19.206 17622 17663 D StatusService: [signalEvent] event: {"type":"discovery.stopped","event":null}
01-28 12:03:19.206 17622 17663 D StatusService: [signalEvent] passing event to the listener: {"type":"discovery.stopped","event":null}
01-28 12:03:19.206 17622 17663 D StatusModule: [handleEvent] event: {"type":"discovery.stopped","event":null}
01-28 12:03:19.206 17622 17669 D ReactNativeJS: DEBUG [status-im.utils.handlers:34] - Handling re-frame event:  :accounts.login.callback/get-user-password-success
01-28 12:03:19.211 17622 17669 D ReactNativeJS: DEBUG [status-im.utils.handlers:34] - Handling re-frame event:  :signals/signal-received
01-28 12:03:19.213 17622 17669 D ReactNativeJS: DEBUG [status-im.events:808] - :event-str {"type":"discovery.stopped","event":null}
01-28 12:03:19.219 17622 17669 D ReactNativeJS: DEBUG [status-im.utils.handlers:34] - Handling re-frame event:  :keychain.callback/can-save-user-password?-success
01-28 12:03:19.221 17622 18195 D StatusService: [signalEvent] event: {"type":"node.stopped","event":null}
01-28 12:03:19.221 17622 18195 D StatusService: [signalEvent] passing event to the listener: {"type":"node.stopped","event":null}
01-28 12:03:19.221 17622 18195 D StatusModule: [handleEvent] event: {"type":"node.stopped","event":null}
01-28 12:03:19.224 17622 17669 I ReactNativeJS: PRETTY PRINTED EXCEPTION
01-28 12:03:19.224 17622 17669 I ReactNativeJS: 
01-28 12:03:19.224 17622 17669 I ReactNativeJS: ***
01-28 12:03:19.224 17622 17669 I ReactNativeJS: NAME: "Error"
01-28 12:03:19.224 17622 17669 I ReactNativeJS: MESSAGE: fx/defn expects a map of cofx as first argument got {:event [:accounts.login.callback/get-user-password-success nil], :db nil, :now 1548673399206} in function function (e) {switch(arguments.length){case 1:return status_im.accounts.login.core.open_login_callback.cljs$core$IFn$_invoke$arity$1(arguments[0]);case 2:return status_im.accounts.login.core.open_login_callback.cljs$core$IFn$_invoke$arity$2(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join(""))}}
01-28 12:03:19.224 17622 17669 I ReactNativeJS: 
01-28 12:03:19.224 17622 17669 I ReactNativeJS: cljs$core$IFn$_invoke$arity$2@index.android.bundle:12:6630778
01-28 12:03:19.224 17622 17669 I ReactNativeJS: index.android.bundle:12:7886655
01-28 12:03:19.224 17622 17669 I ReactNativeJS: index.android.bundle:12:1739573
01-28 12:03:19.224 17622 17669 I ReactNativeJS: invoke_interceptor_fn@index.android.bundle:12:1669879
01-28 12:03:19.224 17622 17669 I ReactNativeJS: invoke_interceptors@index.android.bundle:12:1670180
01-28 12:03:19.224 17622 17669 I ReactNativeJS: execute@index.android.bundle:12:1672629
01-28 12:03:19.224 17622 17669 I ReactNativeJS: handle@index.android.bundle:12:1681042
01-28 12:03:19.224 17622 17669 I ReactNativeJS: re_frame$router$IEventQueue$_process_1st_event_in_queue$arity$1@index.android.bundle:12:1708127
01-28 12:03:19.224 17622 17669 I ReactNativeJS: re_frame$router$IEventQueue$_run_queue$arity$1@index.android.bundle:12:1693112
01-28 12:03:19.224 17622 17669 I ReactNativeJS: index.android.bundle:12:1696292
01-28 12:03:19.224 17622 17669 I ReactNativeJS: re_frame$router$IEventQueue$_fsm_trigger$arity$3@index.android.bundle:12:1700503
01-28 12:03:19.224 17622 17669 I ReactNativeJS: index.android.bundle:12:1694414
01-28 12:03:19.224 17622 17669 I ReactNativeJS: index.android.bundle:24:1801
01-28 12:03:19.224 17622 17669 I ReactNativeJS: k@index.android.bundle:24:643
01-28 12:03:19.224 17622 17669 I ReactNativeJS: q@index.android.bundle:24:1007
01-28 12:03:19.224 17622 17669 I ReactNativeJS: callImmediates@index.android.bundle:24:3202
01-28 12:03:19.224 17622 17669 I ReactNativeJS: value@index.android.bundle:19:2904
01-28 12:03:19.224 17622 17669 I ReactNativeJS: index.android.bundle:19:1377
01-28 12:03:19.224 17622 17669 I ReactNativeJS: value@index.android.bundle:19:2621
01-28 12:03:19.224 17622 17669 I ReactNativeJS: value@index.android.bundle:19:1347
01-28 12:03:19.224 17622 17669 I ReactNativeJS: [native code]
01-28 12:03:19.224 17622 17669 I ReactNativeJS: value@index.android.bundle:19:1282
01-28 12:03:19.224 17622 17669 I ReactNativeJS: [native code]
01-28 12:03:19.224 17622 17669 I ReactNativeJS: 
01-28 12:03:19.224 17622 17669 I ReactNativeJS: ***
01-28 12:03:19.226 17622 17669 I ReactNativeJS: PRETTY PRINTED EXCEPTION

Status.log
geth.log

Another set of smaller logs after issue is reproduced:
logcat.log
geth.log
Status.log

@annadanchenko annadanchenko moved this from IN TESTING to MERGE in Pipeline for QA Jan 28, 2019

@mandrigin mandrigin force-pushed the bugfix/7198-crash-android- branch from d688d2d to 04579f1 Jan 29, 2019

Get rid of StatusService.
StatusService was only used to handle `signalEvent:` from status-go.
This commit simplifies this interaction and getting rid of the service
and all the problems that come with it.

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>

@mandrigin mandrigin force-pushed the bugfix/7198-crash-android- branch from 04579f1 to fafecfe Jan 29, 2019

@mandrigin mandrigin merged commit fafecfe into develop Jan 29, 2019

1 check passed

GPG All commits have a verified GPG signature

Pipeline for QA automation moved this from MERGE to DONE Jan 29, 2019

@delete-merged-branch delete-merged-branch bot deleted the bugfix/7198-crash-android- branch Jan 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment