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

Add dinamically toggling webview debug on android #11053

Merged
merged 1 commit into from
Oct 8, 2020

Conversation

Ferossgp
Copy link
Contributor

@Ferossgp Ferossgp commented Aug 7, 2020

This PR aims to fix some "develop in the dark" issues that Dapp developers have been having.

Effectively, because they can't download the production version of our app and debug their dapps, they develop in the dark. This PR should allow them to temporarily turn debug mode on and attach a remote Chrome / Safari to the dapp browser to make sure they can develop using the tools they usually use.

@Ferossgp Ferossgp requested a review from a team as a code owner August 7, 2020 12:40
@status-im-auto
Copy link
Member

status-im-auto commented Aug 7, 2020

Jenkins Builds

Click to see older builds (14)
Commit #️⃣ Finished (UTC) Duration Platform Result
0c45395 #1 2020-08-07 12:44:01 ~3 min android 📄log
0c45395 #1 2020-08-07 12:44:04 ~3 min android-e2e 📄log
✔️ 66167d1 #2 2020-08-07 13:00:47 ~12 min android-e2e 📦apk 📲
✔️ 66167d1 #2 2020-08-07 13:01:14 ~12 min android 📦apk 📲
✔️ 66167d1 #2 2020-08-07 13:02:03 ~13 min ios 📦ipa 📲
✔️ 3fe0fa1 #3 2020-08-07 14:34:34 ~12 min android-e2e 📦apk 📲
✔️ 3fe0fa1 #3 2020-08-07 14:34:36 ~12 min android 📦apk 📲
✔️ 3fe0fa1 #3 2020-08-07 14:40:08 ~17 min ios 📦ipa 📲
✔️ 2d9338f #4 2020-08-10 11:54:22 ~9 min android-e2e 📦apk 📲
✔️ 2d9338f #4 2020-08-10 11:54:31 ~10 min android 📦apk 📲
✔️ 2d9338f #4 2020-08-10 11:59:27 ~15 min ios 📦ipa 📲
5f6cead #5 2020-08-10 13:01:35 ~4 min ios 📄log
✔️ 5f6cead #5 2020-08-10 13:05:38 ~8 min android-e2e 📦apk 📲
✔️ 5f6cead #5 2020-08-10 13:11:53 ~14 min android 📦apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ c55b6d2 #6 2020-08-10 13:38:34 ~11 min android 📦apk 📲
✔️ c55b6d2 #6 2020-08-10 13:43:31 ~16 min ios 📦ipa 📲
✔️ c55b6d2 #6 2020-08-10 13:43:42 ~16 min android-e2e 📦apk 📲
✔️ ec4ffd6 #8 2020-09-18 10:33:20 ~8 min android 📦apk 📲
✔️ ec4ffd6 #8 2020-09-18 10:33:27 ~8 min android-e2e 📦apk 📲
✔️ ec4ffd6 #8 2020-09-18 10:39:01 ~14 min ios 📦ipa 📲

@Ferossgp Ferossgp force-pushed the feature/webview-debug branch 2 times, most recently from 66167d1 to 3fe0fa1 Compare August 7, 2020 14:22
@flexsurfer
Copy link
Member

could you please elaborate on what this PR about ? thanks

@Ferossgp
Copy link
Contributor Author

@flexsurfer This should be a one time toggle (to not persist) to enable webview debug in android. This is intended for use of DAPP devs to debug their apps in status. cc @andremedeiros

@Ferossgp Ferossgp requested a review from jakubgs as a code owner August 10, 2020 11:44
@Ferossgp Ferossgp force-pushed the feature/webview-debug branch 2 times, most recently from 5f6cead to c55b6d2 Compare August 10, 2020 13:27
@Ferossgp Ferossgp changed the title WIP: Test dinamically toggling webview debug Add dinamically toggling webview debug on android Aug 10, 2020
Copy link
Contributor

@corpetty corpetty left a comment

Choose a reason for hiding this comment

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

I couldn't find anything threatening in this. I am a bit curious of what information is/can be pushed to an attached browser console. In any event, it seems a user needs to be logged in to do this, so they can only show their own information.

@Ferossgp Ferossgp force-pushed the feature/webview-debug branch 2 times, most recently from ae33a88 to ec4ffd6 Compare September 18, 2020 10:24
@Ferossgp Ferossgp self-assigned this Sep 18, 2020
@status-im-auto
Copy link
Member

93% of end-end tests have passed

Total executed tests: 99
Failed tests: 7
Passed tests: 92
IDs of failed tests: 6293, 6295, 5309, 5390, 5786, 6279, 6263 

Failed tests (7)

Click to expand
1. test_keycard_send_eth_in_1_1_chat, id: 6293

Looking for a transaction with unique amount 0.0018105223 in list of ETH transactions, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414
Transaction with unique amount 0.0018105223 is found in list of transactions, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414

Transaction with amount 0.0018105223 was not confirmed, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414, still has 11 confirmations

Device sessions

2. test_keycard_send_eth_to_ens, id: 6295

Looking for a transaction with unique amount 0.001811459 in list of ETH transactions, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414
Transaction with unique amount 0.001811459 is found in list of transactions, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414

Transaction with amount 0.001811459 was not confirmed, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414, still has 7 confirmations

Device sessions

3. test_send_transaction_from_daap, id: 5309

Waiting 350 seconds for funds
Waiting 360 seconds for funds

Balance is not changed during 360 seconds, funds were not received!

Device sessions

4. test_long_press_delete_clear_all_dapps, id: 5390

Device 1: Type 'status.im' to EnterUrlEditbox
Device 1: Tap 'Confirm' on native keyboard

androidx.test.uiautomator.StaleObjectException

Device sessions

5. test_block_user_from_public_chat, id: 5786

Device 1: Looking for message with text 'Before block from 2'
Device 1: Tap on MemberPhoto

Device 1: 'ProfileBlockContactButton' is not found on the screen

Device sessions

6. test_send_eth_to_ens_in_chat, id: 6279

Looking for a transaction with unique amount 0.0018104348 in list of ETH transactions, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414
Transaction with unique amount 0.0018104348 is found in list of transactions, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414

Transaction with amount 0.0018104348 was not confirmed, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414, still has 13 confirmations

Device sessions

7. test_request_and_receive_stt_in_1_1_chat_offline, id: 6263

Looking for a transaction with unique amount 0.001810461 in list of token transactions, address is 549b9bcd069d720390a6819ff8b3d9dd252fa3be
Transaction with unique amount 0.001810461 is found in list of transactions, address is 549b9bcd069d720390a6819ff8b3d9dd252fa3be

Transaction with amount 0.001810461 was not confirmed, address is 549b9bcd069d720390a6819ff8b3d9dd252fa3be, still has 9 confirmations

Device sessions

Passed tests (92)

Click to expand
1. test_delete_chats_via_delete_button, id: 5387
Device sessions

2. test_can_see_all_transactions_in_history, id: 5314
Device sessions

3. test_install_pack_and_send_sticker, id: 5782
Device sessions

4. test_login_with_new_account, id: 5312
Device sessions

5. test_timestamp_in_chats, id: 5385
Device sessions

6. test_password_in_logcat_sign_in, id: 5415
Device sessions

7. test_logcat_recovering_account, id: 5366
Device sessions

8. test_public_chat_clear_history, id: 5386
Device sessions

9. test_need_help_section, id: 5391
Device sessions

10. test_send_and_open_links, id: 5373
Device sessions

11. test_mobile_data_usage_popup_stop_syncing, id: 6228
Device sessions

12. test_mobile_data_usage_settings, id: 6229
Device sessions

13. test_create_new_group_chat, id: 3994
Device sessions

14. test_user_can_switch_network, id: 5299
Device sessions

15. test_mobile_data_usage_popup_continue_syncing, id: 5741
Device sessions

16. test_home_view, id: 5379
Device sessions

17. test_open_google_com_via_open_dapp, id: 5320
Device sessions

18. test_share_contact_code_and_wallet_address, id: 5323
Device sessions

19. test_connection_is_secure, id: 5402
Device sessions

20. test_add_to_contacts, id: 5316
Device sessions

21. test_add_account_to_multiaccount_instance_private_key, id: 6272
Device sessions

22. test_refresh_button_browsing_app_webview, id: 5354
Device sessions

23. test_push_notification_1_1_chat, id: 6283
Device sessions

24. test_keycard_send_two_transactions_one_after_another_in_dapp, id: 6288
Device sessions

25. test_can_add_existing_ens, id: 5502
Device sessions

26. test_transaction_wrong_password_wallet, id: 5408
Device sessions

27. test_public_chat_messaging, id: 5313
Device sessions

28. test_unread_messages_counter_public_chat, id: 5360
Device sessions

29. test_keycard_send_eth_from_wallet_to_address, id: 6289
Device sessions

30. test_keycard_fetching_balance_after_offline, id: 6290
Device sessions

31. test_keycard_send_transaction_from_daap, id: 6249
Device sessions

32. test_text_message_1_1_chat, id: 5305
Device sessions

33. test_decline_transactions_in_1_1_chat_push_notification_changing_state, id: 6265
Device sessions

34. test_can_use_purchased_stickers_on_recovered_account, id: 5783
Device sessions

35. test_open_transaction_on_etherscan, id: 5384
Device sessions

36. test_send_audio_message_with_push_notification_check, id: 6316
Device sessions

37. test_onboarding_screen_when_requesting_tokens_for_recovered_account, id: 5677
Device sessions

38. test_contact_profile_view, id: 5382
Device sessions

39. test_ens_and_nickname_in_public_and_1_1_chats, id: 6226
Device sessions

40. test_offline_add_new_group_chat_member, id: 3998
Device sessions

41. test_logcat_backup_recovery_phrase, id: 5419
Device sessions

42. test_can_recover_keycard_account_card_pairing, id: 5758
Device sessions

43. test_start_chat_with_ens, id: 5403
Device sessions

44. test_add_account_to_multiaccount_instance_seed_phrase, id: 6271
Device sessions

45. test_open_blocked_site, id: 6210
Device sessions

46. test_open_chat_by_pasting_public_key, id: 5304
Device sessions

47. test_pair_devices_sync_one_to_one_contacts_public_chat, id: 5762
Device sessions

48. test_keycard_sign_message_from_daap, id: 6251
Device sessions

49. test_send_non_english_message_to_newly_added_contact, id: 5315
Device sessions

50. test_ens_username_recipient, id: 5406
Device sessions

51. test_fetch_more_history_in_empty_chat, id: 6205
Device sessions

52. test_open_public_chat_using_deep_link, id: 5396
Device sessions

53. test_switch_users_and_add_new_account, id: 5356
Device sessions

54. test_add_account_to_multiaccount_instance_generate_new, id: 6224
Device sessions

55. test_copy_contact_code_and_wallet_address, id: 5375
Device sessions

56. test_send_two_transactions_one_after_another_in_dapp, id: 5744
Device sessions

57. test_image_in_one_to_one_send_save_reply, id: 6305
Device sessions

58. test_add_new_keycard_account_and_login, id: 5689
Device sessions

59. test_copy_and_paste_messages, id: 5317
Device sessions

60. test_back_forward_buttons_browsing_website, id: 5321
Device sessions

61. test_password_in_logcat_creating_account, id: 5414
Device sessions

62. test_sign_message_from_daap, id: 5342
Device sessions

63. test_dapps_permissions, id: 5738
Device sessions

64. test_request_public_key_status_test_daap, id: 5397
Device sessions

65. test_long_press_to_delete_chat, id: 5319
Device sessions

66. test_log_level_and_fleet, id: 5368
Device sessions

67. test_reactions_to_message_in_chats, id: 6315
Device sessions

68. test_add_and_delete_watch_only_account_to_multiaccount_instance, id: 6244
Device sessions

69. test_recover_account_from_new_user_seedphrase, id: 6296
Device sessions

70. test_send_transaction_with_custom_token, id: 6208
Device sessions

71. test_send_eth_in_1_1_chat, id: 6253
Device sessions

72. test_send_two_transactions_in_batch_in_dapp, id: 5743
Device sessions

73. test_fetching_balance_after_offline, id: 6237
Device sessions

74. test_offline_status, id: 5326
Device sessions

75. test_wallet_set_up, id: 5335
Device sessions

76. test_manage_assets, id: 5341
Device sessions

77. test_offline_messaging_1_1_chat, id: 5310
Device sessions

78. test_account_recovery_with_uppercase_recovery_phrase, id: 5394
Device sessions

79. test_send_token_with_7_decimals, id: 5350
Device sessions

80. test_user_can_see_all_own_assets_after_account_recovering, id: 5381
Device sessions

81. test_pass_phrase_validation, id: 5363
Device sessions

82. test_keycard_can_see_all_transactions_in_history, id: 6291
Device sessions

83. test_keycard_send_two_transactions_in_batch_in_dapp, id: 6287
Device sessions

84. test_send_emoji, id: 5328
Device sessions

85. test_filters_from_daap, id: 5353
Device sessions

86. test_redirect_to_public_chat_tapping_tag_message, id: 5675
Device sessions

87. test_restore_account_from_mnemonic_to_keycard, id: 6240
Device sessions

88. test_add_and_remove_contact_with_nickname_from_public_chat, id: 5332
Device sessions

89. test_send_eth_from_wallet_to_address, id: 5308
Device sessions

90. test_messaging_in_different_networks, id: 5338
Device sessions

91. test_collectible_from_wallet_opens_in_browser_view, id: 5346
Device sessions

92. test_insufficient_funds_wallet_positive_balance, id: 5412
Device sessions

@status-im-auto
Copy link
Member

14% of end-end tests have passed

Total executed tests: 7
Failed tests: 6
Passed tests: 1
IDs of failed tests: 6293, 6295, 5309, 5786, 6279, 6263 

Failed tests (6)

Click to expand
1. test_keycard_send_eth_in_1_1_chat, id: 6293

Looking for a transaction with unique amount 0.0021121049 in list of ETH transactions, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414
Transaction with unique amount 0.0021121049 is found in list of transactions, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414

Transaction with amount 0.0021121049 was not confirmed, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414, still has 9 confirmations

Device sessions

2. test_keycard_send_eth_to_ens, id: 6295

Looking for a transaction with unique amount 0.002112719 in list of ETH transactions, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414
Transaction with unique amount 0.002112719 is found in list of transactions, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414

Transaction with amount 0.002112719 was not confirmed, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414, still has 10 confirmations

Device sessions

3. test_send_transaction_from_daap, id: 5309

Device 1: AssetText is 3865000 STT
Device 1: Waiting 300 seconds for STT to update

Device 1: Balance is not changed during 300 seconds!

Device sessions

4. test_block_user_from_public_chat, id: 5786

Device 1: Looking for message with text 'Before block from 2'
Device 1: Tap on MemberPhoto

Device 1: 'ProfileBlockContactButton' is not found on the screen

Device sessions

5. test_send_eth_to_ens_in_chat, id: 6279

Looking for a transaction with unique amount 0.00211264 in list of ETH transactions, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414
Transaction with unique amount 0.00211264 is found in list of transactions, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414

Transaction with amount 0.00211264 was not confirmed, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414, still has 7 confirmations

Device sessions

6. test_request_and_receive_stt_in_1_1_chat_offline, id: 6263

Looking for a transaction with unique amount 0.002112913 in list of token transactions, address is 549b9bcd069d720390a6819ff8b3d9dd252fa3be
Transaction with unique amount 0.002112913 is found in list of transactions, address is 549b9bcd069d720390a6819ff8b3d9dd252fa3be

Transaction with amount 0.002112913 was not confirmed, address is 549b9bcd069d720390a6819ff8b3d9dd252fa3be, still has 9 confirmations

Device sessions

Passed tests (1)

Click to expand
1. test_long_press_delete_clear_all_dapps, id: 5390
Device sessions

@status-im-auto
Copy link
Member

67% of end-end tests have passed

Total executed tests: 6
Failed tests: 2
Passed tests: 4
IDs of failed tests: 5786, 6263 

Failed tests (2)

Click to expand
1. test_block_user_from_public_chat, id: 5786

Device 1: Looking for message with text 'Before block from 2'
Device 1: Tap on MemberPhoto

Device 1: 'ProfileBlockContactButton' is not found on the screen

Device sessions

2. test_request_and_receive_stt_in_1_1_chat_offline, id: 6263

Device 2: Type 'qwerty' to PasswordInput
Device 2: Tap on SignInButton

Device 2: 'ConnectionStatusText' is still visible on the screen after 30 seconds

Device sessions

Passed tests (4)

Click to expand
1. test_keycard_send_eth_in_1_1_chat, id: 6293
Device sessions

2. test_keycard_send_eth_to_ens, id: 6295
Device sessions

3. test_send_transaction_from_daap, id: 5309
Device sessions

4. test_send_eth_to_ens_in_chat, id: 6279
Device sessions

@Serhy
Copy link
Contributor

Serhy commented Sep 22, 2020

That works on Android 8, Android 9 (real devices) with enabled debug mode.
Once disabled, - inspection halts.

But, once I perform the action in desktop debugger (Chrome in my case) - Status becomes unresponsive and eventually ends up with 'Status is unresponsive. Wait more/Close app'
So it's possible, at least for me now, to use it in Inspect mode and all interactions perform from device.
@Ferossgp is OK for this PR? Or it's on my side only it doesn't work in reverse mode (click/scroll action in desktop Chrome debugger -> no response but Status stuck).
In logcat there are hundreds of

09-22 18:30:38.822  7971  7971 F crashpad: cTckCNRg'6pz/gfB&GON>;1ozUw&$O:N{(kvn<^sAqvz$;PWnluQEiwU,g>~]KrKu*!p6TWcz@-JW_>CsaIW&llmjN?RsXy/$me/*f0&v01T<Kt,i*}qsA|BT`WJ(8Q6~FyRHe:0sQj30etc~i%L>cegkOxEQul\qr66{K!:Wn)c~hnMR:5s*<W+z&Ds^4F[6T(_aI*1"t-4JE@QS`/?=6fm>Ke%LL`c=+hM5l$D;Dy/=s.H#S=sTK\XJn\?XYg)Euxyg5JjmW'v&<XdQA84HWIR0&aKF_~*sKYW|Pz,3MZ[PK]o}Jjn.^Mu(E'x@@`-v0@\~R`;3q2GLE|/;JNS8~A3Z,w,rw?p,3.GV:<"LPMg*L-F:6hX_]M6J>m9v,VA5k9NP;*}T5|`M+T<]D6WpKh&b`}}ez+j$/=W&Z,UPielni+/^_V52#*.(wK\zJ4MHO7MfTE4?+@Lhg)B`rXTTc|F*[t+!LX*TRjUoi/j#|&g{Vv2{J5t3K-;Mu^)Fk"8

logs in that case

@Ferossgp
Copy link
Contributor Author

Ferossgp commented Oct 1, 2020

@Serhy I think that's ok for this case, as it still opens the ability for devs to debug apps in the Status

@Serhy
Copy link
Contributor

Serhy commented Oct 8, 2020

@Serhy I think that's ok for this case, as it still opens the ability for devs to debug apps in the Status

Thanks @Ferossgp let's merge then.

Optimistic update

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
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.

6 participants