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

[#15944] Set installation name on account creation and pairing #16307

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

rasom
Copy link
Contributor

@rasom rasom commented Jun 19, 2023

fix #15944

This line returns "localhost" https://github.com/status-im/status-go/blob/develop/server/device.go#L29, so instead we set installation name during account creation or pairing.

status: ready

@rasom rasom self-assigned this Jun 19, 2023
@rasom rasom force-pushed the fix/#15944-set-installation-name-android branch from 38b89e5 to b05e580 Compare June 19, 2023 11:00
@status-im-auto
Copy link
Member

status-im-auto commented Jun 19, 2023

Jenkins Builds

Click to see older builds (74)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 38b89e5 #1 2023-06-19 11:03:50 ~6 min ios 📱ipa 📲
b05e580 #2 2023-06-19 11:09:47 ~8 min tests 📄log
7303792 #3 2023-06-19 11:17:19 ~3 min tests 📄log
✔️ 7303792 #3 2023-06-19 11:19:53 ~5 min ios 📱ipa 📲
✔️ 7303792 #3 2023-06-19 11:20:02 ~5 min android 🤖apk 📲
✔️ 7303792 #3 2023-06-19 11:20:10 ~6 min android-e2e 🤖apk 📲
f8a328d #4 2023-06-19 11:41:07 ~3 min tests 📄log
✔️ f8a328d #4 2023-06-19 11:43:13 ~5 min ios 📱ipa 📲
✔️ f8a328d #4 2023-06-19 11:44:17 ~6 min android 🤖apk 📲
✔️ f8a328d #4 2023-06-19 11:44:26 ~6 min android-e2e 🤖apk 📲
333abd0 #5 2023-06-20 16:27:05 ~7 min tests 📄log
✔️ 333abd0 #5 2023-06-20 16:29:34 ~10 min android-e2e 🤖apk 📲
✔️ 333abd0 #5 2023-06-20 16:30:44 ~11 min android 🤖apk 📲
✔️ 333abd0 #5 2023-06-20 16:31:32 ~12 min ios 📱ipa 📲
e2f249a #6 2023-06-20 19:23:11 ~4 min tests 📄log
✔️ e2f249a #6 2023-06-20 19:26:17 ~7 min ios 📱ipa 📲
✔️ e2f249a #6 2023-06-20 19:27:12 ~8 min android-e2e 🤖apk 📲
✔️ e2f249a #6 2023-06-20 19:30:44 ~12 min android 🤖apk 📲
547f749 #7 2023-06-21 08:37:38 ~4 min tests 📄log
✔️ 547f749 #7 2023-06-21 08:41:28 ~8 min ios 📱ipa 📲
✔️ 547f749 #7 2023-06-21 08:42:42 ~9 min android 🤖apk 📲
✔️ 547f749 #7 2023-06-21 08:42:43 ~9 min android-e2e 🤖apk 📲
aa1f107 #8 2023-06-21 14:51:25 ~4 min tests 📄log
✔️ aa1f107 #8 2023-06-21 14:55:01 ~7 min ios 📱ipa 📲
✔️ aa1f107 #8 2023-06-21 14:55:57 ~8 min android-e2e 🤖apk 📲
✔️ aa1f107 #8 2023-06-21 14:56:01 ~8 min android 🤖apk 📲
1e92c18 #9 2023-06-26 07:27:32 ~30 sec android 📄log
1e92c18 #9 2023-06-26 07:27:40 ~33 sec tests 📄log
1e92c18 #9 2023-06-26 07:27:50 ~48 sec android-e2e 📄log
1e92c18 #9 2023-06-26 07:28:48 ~1 min ios 📄log
1905cd4 #10 2023-06-26 10:24:52 ~1 min ios 📄log
1905cd4 #10 2023-06-26 10:30:56 ~7 min android-e2e 📄log
1905cd4 #10 2023-06-26 10:31:23 ~7 min android 📄log
1905cd4 #10 2023-06-26 10:31:33 ~8 min tests 📄log
520dc45 #11 2023-06-26 10:39:03 ~31 sec tests 📄log
520dc45 #11 2023-06-26 10:39:32 ~59 sec android 📄log
520dc45 #11 2023-06-26 10:39:56 ~1 min android-e2e 📄log
520dc45 #11 2023-06-26 10:41:01 ~2 min ios 📄log
499d5f6 #12 2023-06-26 10:49:18 ~4 min tests 📄log
✔️ 499d5f6 #12 2023-06-26 10:52:20 ~7 min ios 📱ipa 📲
✔️ 499d5f6 #12 2023-06-26 10:53:13 ~8 min android 🤖apk 📲
✔️ 499d5f6 #12 2023-06-26 10:53:44 ~8 min android-e2e 🤖apk 📲
✔️ 2fe298c #13 2023-06-26 11:55:42 ~5 min android-e2e 🤖apk 📲
✔️ 2fe298c #13 2023-06-26 11:55:51 ~6 min ios 📱ipa 📲
2fe298c #13 2023-06-26 11:56:23 ~6 min tests 📄log
✔️ 2fe298c #13 2023-06-26 11:59:51 ~10 min android 🤖apk 📲
c7e8e51 #14 2023-06-26 12:35:10 ~4 min tests 📄log
✔️ c7e8e51 #14 2023-06-26 12:37:04 ~6 min android 🤖apk 📲
✔️ c7e8e51 #14 2023-06-26 12:37:24 ~6 min android-e2e 🤖apk 📲
✔️ c7e8e51 #14 2023-06-26 12:37:32 ~6 min ios 📱ipa 📲
9e5f985 #15 2023-06-26 13:02:08 ~6 min tests 📄log
✔️ 9e5f985 #15 2023-06-26 13:05:27 ~10 min ios 📱ipa 📲
✔️ 9e5f985 #15 2023-06-26 13:07:03 ~11 min android-e2e 🤖apk 📲
✔️ 9e5f985 #15 2023-06-26 13:07:59 ~12 min android 🤖apk 📲
d700ac5 #16 2023-06-26 13:43:11 ~2 min tests 📄log
✔️ d700ac5 #16 2023-06-26 13:48:01 ~7 min android-e2e 🤖apk 📲
✔️ d700ac5 #16 2023-06-26 13:48:56 ~8 min ios 📱ipa 📲
✔️ d700ac5 #16 2023-06-26 13:51:18 ~11 min android 🤖apk 📲
✔️ 3cd02c9 #18 2023-06-26 14:38:11 ~5 min ios 📱ipa 📲
✔️ 3cd02c9 #18 2023-06-26 14:41:20 ~8 min tests 📄log
✔️ 3cd02c9 #18 2023-06-26 14:42:16 ~9 min android-e2e 🤖apk 📲
✔️ 3cd02c9 #18 2023-06-26 14:42:17 ~9 min android 🤖apk 📲
✔️ 5b4e594 #19 2023-06-27 10:16:17 ~5 min android-e2e 🤖apk 📲
✔️ 5b4e594 #19 2023-06-27 10:16:24 ~5 min ios 📱ipa 📲
✔️ 5b4e594 #19 2023-06-27 10:16:41 ~6 min android 🤖apk 📲
✔️ 5b4e594 #19 2023-06-27 10:18:59 ~8 min tests 📄log
d0f5971 #20 2023-06-29 08:36:30 ~29 sec android-e2e 📄log
d0f5971 #20 2023-06-29 08:36:43 ~37 sec android 📄log
d0f5971 #20 2023-06-29 08:36:58 ~52 sec tests 📄log
d0f5971 #20 2023-06-29 08:37:33 ~1 min ios 📄log
✔️ 8fcdb67 #21 2023-06-29 08:52:00 ~7 min android 🤖apk 📲
✔️ 8fcdb67 #21 2023-06-29 08:52:33 ~8 min tests 📄log
✔️ 8fcdb67 #21 2023-06-29 08:52:38 ~8 min ios 📱ipa 📲
✔️ 8fcdb67 #21 2023-06-29 08:52:58 ~8 min android-e2e 🤖apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 0466a5b #22 2023-06-29 11:31:33 ~5 min ios 📱ipa 📲
✔️ 0466a5b #22 2023-06-29 11:40:22 ~14 min android 🤖apk 📲
✔️ 0466a5b #22 2023-06-29 11:41:16 ~15 min android-e2e 🤖apk 📲
✔️ 0466a5b #22 2023-06-29 11:44:55 ~19 min tests 📄log
✔️ b953ddb #23 2023-06-29 12:12:43 ~5 min android 🤖apk 📲
✔️ b953ddb #23 2023-06-29 12:12:53 ~6 min ios 📱ipa 📲
✔️ b953ddb #23 2023-06-29 12:14:08 ~7 min android-e2e 🤖apk 📲
✔️ b953ddb #23 2023-06-29 12:14:58 ~8 min tests 📄log

@rasom rasom force-pushed the fix/#15944-set-installation-name-android branch from b05e580 to 7303792 Compare June 19, 2023 11:13
@rasom rasom marked this pull request as ready for review June 19, 2023 11:36
@rasom rasom requested a review from jakubgs as a code owner June 19, 2023 11:36
@rasom rasom force-pushed the fix/#15944-set-installation-name-android branch from 7303792 to f8a328d Compare June 19, 2023 11:37
@rasom rasom requested review from cammellos, J-Son89 and ulisesmac and removed request for jakubgs June 19, 2023 11:39
@cammellos
Copy link
Contributor

@rasom I think it would be best if we set it on account creation (less RPC calls and less work for the clients) https://github.com/status-im/status-go/blob/develop/protocol/requests/create_account.go
what do you think?

@rasom
Copy link
Contributor Author

rasom commented Jun 19, 2023

@cammellos one PR is always better than two, but if you insist... :D

@cammellos
Copy link
Contributor

@cammellos one PR is always better than two, but if you insist... :D

I think it's better to have it in the account creation RPC, yes, it's 2 PRs that's true, but it keeps the logic together and avoid the extra RPC, so I think it's worth it :)
thank you

Copy link
Contributor

@ulisesmac ulisesmac left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@rasom rasom force-pushed the fix/#15944-set-installation-name-android branch from f8a328d to 333abd0 Compare June 20, 2023 16:19
@rasom rasom changed the title [#15944] Set installation name on android device [#15944] Set installation name on account creation Jun 20, 2023
@rasom
Copy link
Contributor Author

rasom commented Jun 21, 2023

ok so... currently it is fixed on android on a regular account creation. Now I need to figure how to pass that device name during pairing process

@rasom rasom force-pushed the fix/#15944-set-installation-name-android branch from e2f249a to 547f749 Compare June 21, 2023 08:32
@churik
Copy link
Member

churik commented Jun 23, 2023

@rasom ping QA when it is ready to be tested, thank you!

@rasom rasom force-pushed the fix/#15944-set-installation-name-android branch 6 times, most recently from d43af12 to 3cd02c9 Compare June 26, 2023 14:32
@rasom
Copy link
Contributor Author

rasom commented Jun 26, 2023

@churik should be ready now

@status-im-auto
Copy link
Member

70% of end-end tests have passed

Total executed tests: 33
Failed tests: 10
Passed tests: 23
IDs of failed tests: 702733,702732,703133,703086,702894,702745,702783,702855,702731,702958 

Failed tests (10)

Click to expand
  • Rerun failed tests

  • Class TestActivityMultipleDevicePR:

    1. test_activity_center_admin_notification_accept_swipe, id: 702958

    Device 1: Looking for activity center element: 'user2'
    Device 1: Find `Button` by `xpath`: `//*[contains(@text, 'user2')]/ancestor::*[@content-desc='activity']//*[@content-desc="activity-title"]`

    medium/test_activity_center.py:331: in test_activity_center_admin_notification_accept_swipe
        if reply_element.title.text != 'Join request':
    ../views/base_element.py:209: in text
        return self.find_element().text
    ../views/base_element.py:80: in find_element
        raise NoSuchElementException(
     Device 1: Button by xpath: `//*[contains(@text, 'user2')]/ancestor::*[@content-desc='activity']//*[@content-desc="activity-title"]` is not found on the screen
    



    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_text_message_delete_push_disappear, id: 702733

    Device 2: Tap on found: Button
    Device 1: Getting PN by 'DELETE ME'

    critical/chats/test_1_1_public_chats.py:1210: in test_1_1_chat_text_message_delete_push_disappear
        self.errors.verify_no_errors()
    base_test_case.py:182: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Message status was not changed to 'Delivered' after 60 s 
    

    [[Message is being in status 'Sending' for a long time: https://github.com//issues/15385]]

    Device sessions

    2. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745

    Device 2: Find MemberPhoto by xpath: //*[starts-with(@text,'profile_photo')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='user-avatar']
    Device 2: Image differs from template to 6.774303959865197 percents

    critical/chats/test_1_1_public_chats.py:1076: in test_1_1_chat_non_latin_messages_stack_update_profile_photo
        self.errors.verify_no_errors()
    base_test_case.py:182: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Message with text 'hello' was not received
    E    Image of user in 1-1 chat is too different from template!
    



    Device sessions

    3. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783

    # STEP: Device1 goes back online and checks that 1-1 chat will be fetched
    Device 1: Looking for a message by text: test message

    critical/chats/test_1_1_public_chats.py:1253: in test_1_1_chat_is_shown_message_sent_delivered_from_offline
        self.errors.verify_no_errors()
    base_test_case.py:182: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Message status was not delivered after back up online, it is "Sending"! 
    

    [[Issue with messages not being sent for a long time]]

    Device sessions

    4. test_1_1_chat_edit_message, id: 702855

    Device 2: Find Text by xpath: //*[starts-with(@text,'Message before edit 1-1')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='message-status']/android.widget.TextView
    Device 2: Text is Sent

    critical/chats/test_1_1_public_chats.py:1142: in test_1_1_chat_edit_message
        self.chat_2.chat_element_by_text(message_before_edit_1_1).wait_for_status_to_be("Delivered")
    ../views/chat_view.py:228: in wait_for_status_to_be
        raise TimeoutException("Message status was not changed to %s, it's %s" % (expected_status, current_status))
     Message status was not changed to Delivered, it's Sent 
    

    [[Message is being in status 'Sending' for a long time: https://github.com//issues/15385]]

    Device sessions

    5. test_1_1_chat_pin_messages, id: 702731

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133

    Device 1: Find Button by accessibility id: show-profiles
    Device 1: Tap on found: Button

    critical/test_public_chat_browsing.py:406: in test_restore_multiaccount_with_waku_backup_remove_switch
        self.errors.verify_no_errors()
    base_test_case.py:182: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Contact my-custom-nickname was not restored from backup!
    



    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_mark_all_messages_as_read, id: 703086

    Device 1: Find Button by accessibility id: mark-as-read
    Device 1: Tap on found: Button

    critical/test_public_chat_browsing.py:812: in test_community_mark_all_messages_as_read
        self.errors.verify_no_errors()
    base_test_case.py:182: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     New messages counter is not shown in home > Commmunity element
    



    Device sessions

    2. test_community_contact_block_unblock_offline, id: 702894

    Device 2: Find Text by xpath: //*[starts-with(@text,'Hurray! unblocked')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='message-status']/android.widget.TextView
    Device 2: Text is Sent

    critical/test_public_chat_browsing.py:785: in test_community_contact_block_unblock_offline
        self.errors.verify_no_errors()
    base_test_case.py:182: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Message was not delivered after back up online.
    



    Device sessions

    Passed tests (23)

    Click to expand

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_mentions, id: 702957
    Device sessions

    2. test_navigation_jump_to, id: 702936
    Device sessions

    3. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    2. test_group_chat_offline_pn, id: 702808
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    2. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    2. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    3. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    4. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    2. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_several_images_send_reply, id: 703194
    Device sessions

    2. test_community_one_image_send_reply, id: 702859
    Device sessions

    3. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    4. test_community_mentions_push_notification, id: 702786
    Device sessions

    5. test_community_message_delete, id: 702839
    Device sessions

    6. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    7. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    8. test_community_message_edit, id: 702843
    Device sessions

    9. test_community_leave, id: 702845
    Device sessions

    10. test_community_unread_messages_badge, id: 702841
    Device sessions

    @rasom rasom changed the title [#15944] Set installation name on account creation [#15944] Set installation name on account creation and pairing Jun 27, 2023
    @VolodLytvynenko VolodLytvynenko self-assigned this Jun 27, 2023
    @VolodLytvynenko
    Copy link
    Contributor

    Hi @rasom, thank you for the PR. The PR looks good. I just have a few questions:

    In the device settings, there is a "Device Name" value. However, I noticed that currently, the value is only fetched on the 'sync complete' page for iOS devices. For Android devices, the name of the model is fetched instead of the "Device Name" value. I wanted to confirm if this is the expected behavior, or if for Android devices, the "Device Name" value should also be fetched. Could you please clarify?

    QESTION 1: [Android] The model name is fetched instead of the device name

    Steps to reproduce:

    1. Go to device settings -> About phone -> Check 'device name' value
    2. Scan the valid sync qr code
    3. Check the Android value into the Sync Complete Page

    Actual result:

    The value from the 'Device name' is fetched on the Sync page

    how it works on Android
    image

    Expected result:

    The value from the 'Device name' is fetched on the Sync page for Android ???

    how it works on iPhone
    image

    @VolodLytvynenko
    Copy link
    Contributor

    Question 2 Should the name of the non-paired device be shown on the 'Syncing' page. If yes, should it be included in the scope of the current PR?

    Steps to reproduce:

    1. User_A generates sync code
    2. User_B scans sync code of User_A
    3. User_A generates new sync code
    4. User_C scans sync code of User_A
    5. User_B and User_C go to the -> profile -> Syncing

    Actual result:

    The User_B does not see the name of User_C
    image

    Expected result:

    The User_B sees the name ofUser_C

    image
    https://www.figma.com/file/V6nlpAWIf2e1XU8RJ9yQPe/Syncing-for-Mobile?type=design&node-id=675-177778&mode=design&t=NC0vOM2WfsWouuAS-0

    @VolodLytvynenko
    Copy link
    Contributor

    Question 3: Should the online status and device type (mobile/laptop) indicators be included in the scope of the current PR?

    Actual result:

    • mobile indicator is not shown. Only the laptop indicator icon is shown for all types of devices
    • Online status is not shown

    Expected result:

    image
    https://www.figma.com/file/V6nlpAWIf2e1XU8RJ9yQPe/Syncing-for-Mobile?type=design&node-id=675-177600&mode=design&t=jHlvwVEapic9srwS-0

    @rasom
    Copy link
    Contributor Author

    rasom commented Jun 28, 2023

    @VladimrLitvinenko

    q1. there is no reliable way to get that device name on android, it kind of works differently from device to device. As far as we get at least some name which is not localhost here we are good.
    q2. q3. should be fixed separately

    @VolodLytvynenko
    Copy link
    Contributor

    @VladimrLitvinenko

    q1. there is no reliable way to get that device name on android, it kind of works differently from device to device. As far as we get at least some name which is not localhost here we are good. q2. q3. should be fixed separately

    @rasom Thanks for the clarification. I have no issues from my side. I noticed a new conflict has appeared. Please let me know if, after resolving the conflict, the PR needs to be retested. I can quickly retest it. Otherwise, the PR can be merged

    @rasom rasom force-pushed the fix/#15944-set-installation-name-android branch from 5b4e594 to d0f5971 Compare June 29, 2023 08:35
    @rasom rasom force-pushed the fix/#15944-set-installation-name-android branch 2 times, most recently from 8fcdb67 to 0466a5b Compare June 29, 2023 11:25
    @rasom rasom force-pushed the fix/#15944-set-installation-name-android branch from 0466a5b to b953ddb Compare June 29, 2023 12:06
    @rasom rasom merged commit b953ddb into develop Jun 29, 2023
    @rasom rasom deleted the fix/#15944-set-installation-name-android branch June 29, 2023 12:17
    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.

    "localhost" as the name of the android device instead of the devices name
    7 participants