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

[$1000] Web - For new user, blank invite members page is displayed even though it has few chats available #25402

Closed
1 of 6 tasks
izarutskaya opened this issue Aug 17, 2023 · 34 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@izarutskaya
Copy link

izarutskaya commented Aug 17, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open the app and login with user A
  2. Search for new unique user (ensure that you have access to that email) and click on search
  3. From different device, sign in with searched user in step 2
  4. Observe that it has chat with user A
  5. Open search and observe that user A is visible without any search
  6. Open settings->workspaces->new workspace->members
  7. Click on invite and observe that invite page does not have user A in recent contacts

Expected Result:

App should display contacts to which we have chats on invite members page

Actual Result:

App does not display contacts for new user on invite members page even if few users has already initiated chat with the new user

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: v1.3.54-11

Reproducible in staging?: Y

Reproducible in production?: Y

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

5290241184493577131blank_invite_member_page_new_user.MP4
Recording.5884.mp4

Expensify/Expensify Issue URL:

Issue reported by: @dhanashree-sawant

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691317653758699

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e57558bbcf4ebb80
  • Upwork Job ID: 1695130525911900160
  • Last Price Increase: 2023-09-01
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 2023

Triggered auto assignment to @dylanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@ShogunFire
Copy link
Contributor

Temporarily we filter the options with only the users for who we have the login and I might be wrong but I think to have the login the other user has to send a message which doesn't seem to be the case in the video

@ShogunFire
Copy link
Contributor

Should we do the same for the search ?

@melvin-bot melvin-bot bot added the Overdue label Aug 21, 2023
@dylanexpensify
Copy link
Contributor

reviewing today!

@melvin-bot melvin-bot bot removed the Overdue label Aug 21, 2023
@dylanexpensify
Copy link
Contributor

Clarifying internally

@dylanexpensify
Copy link
Contributor

reviewing tomorrow! Got caught up with higher priorities today! Bumping the message

@dylanexpensify
Copy link
Contributor

Reviewing now!

@dylanexpensify dylanexpensify added the External Added to denote the issue can be worked on by a contributor label Aug 25, 2023
@melvin-bot melvin-bot bot changed the title Web - For new user, blank invite members page is displayed even though it has few chats available [$1000] Web - For new user, blank invite members page is displayed even though it has few chats available Aug 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 25, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01e57558bbcf4ebb80

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 25, 2023

Current assignee @dylanexpensify is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Aug 25, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel (External)

@Santhosh-Sellavel
Copy link
Collaborator

Santhosh-Sellavel commented Aug 25, 2023

@dhanashree-sawant is this reproducible now on staging?

@lmeullibre
Copy link

lmeullibre commented Aug 26, 2023

Proposal

Problem Statement:

When a user B attempt to invite a user A who previously initiated a chat with him into the workspace using the app's drawer, the application does not display A as a potential workspace member, even though the indexed database contains these members' data.

Root Cause:

Upon investigation, the root of the issue seems to be tied to the getOptions() function from the OptionListUtils file. The function getMemberInviteOptions() calls the getOptions() method, and though the personalDetails are passed correctly as a prop, the returned personalDetailsOptions list from getOptions() is empty. This results in an empty list of users in the workspace invite drawer, even having data available in the indexed database.
This happens because the method will only deal with users with the login attribute set to true, as found on the following line:
const havingLoginPersonalDetails = !includeP2P ? {} : _.pick(personalDetails, (detail) => Boolean(detail.login));

While monitoring the endpoint http://localhost:8082/api?command=OpenApp which is called when opening the app with the user B, we can observe that indeed user A lacks of login property:

image

However, if we inspect the endpoint used to initiate a chat with another user (http://localhost:8082/api?command=OpenReport), we observe that the login property exists on the body from the post request for the user A:

image

In conclusion, the login property of user A gets lost at some point so it will never be retrieved by the invite drawer of user B, since the code only deals with users whose login property exist.

Proposed Solution:

In order to fix this issue, we should find out on the backend why the property is null while calling http://localhost:8082/api?command=OpenApp. If it existed, the user would match with const havingLoginPersonalDetails = !includeP2P ? {} : _.pick(personalDetails, (detail) => Boolean(detail.login)); and therefore user A would appear on the invite drawer. By applying a quick patch, we can manage to retrieve the user A correctly:
image
This patch would require further debugging and testing to be sure we are not breaking other features.

@melvin-bot
Copy link

melvin-bot bot commented Aug 26, 2023

📣 @lmeullibre! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@lmeullibre
Copy link

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~0179522c29b19e1e1c

@melvin-bot
Copy link

melvin-bot bot commented Aug 26, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@melvin-bot melvin-bot bot added the Overdue label Aug 28, 2023
@dylanexpensify
Copy link
Contributor

updating today!

@melvin-bot melvin-bot bot removed the Overdue label Aug 28, 2023
@Santhosh-Sellavel
Copy link
Collaborator

Seems like a Backend issue

@dylanexpensify
Copy link
Contributor

Hmm, having a hard time reproing, @Santhosh-Sellavel can you repro?

@Santhosh-Sellavel
Copy link
Collaborator

Yes can reproduce, but not sure about what's wrong here and what needs to be fixed.

@Santhosh-Sellavel
Copy link
Collaborator

Santhosh-Sellavel commented Aug 29, 2023

Here are the facts,

  1. User A just created a chat with User B who didn't even signup i.e using email
  2. User B Finds, User A's contact on the search option for chat
  3. User B Did not find, User A's contact on the search option for workspace invite.
  4. User B Did not Find, User A's chat on the LHN

@lmeullibre
Copy link

It's a bug, a backend one. The invite drawer from user B should contain User A as a potential workspace member on the list. However the Client only lists users which has the attribute login on them, and since the backend is returning the connections without this attribute, the list appears empty. It can be patched quickly from the Client but it should be better fixed on the Server.

@Santhosh-Sellavel
Copy link
Collaborator

@dylanexpensify Can you assign a internal engineer here lets discuss sort things out here, thanks!

@dylanexpensify
Copy link
Contributor

Done!

@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

Triggered auto assignment to @hayata-suenaga (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

@dylanexpensify @Santhosh-Sellavel @hayata-suenaga this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@hayata-suenaga
Copy link
Contributor

@Santhosh-Sellavel if you could, could you provide a summary of the issue and what kind of changes are required on the backend side?

@lmeullibre
Copy link

@hayata-suenaga as per my research, I found the endpoint http://localhost:8082/api?command=OpenApp reponse is missing the login attribute. It should be fixed by just adding it.

@melvin-bot melvin-bot bot added the Overdue label Sep 4, 2023
@dylanexpensify
Copy link
Contributor

Reviewing today while in the air! Currently taxi'd, will get to once I can hop on wifi!

@melvin-bot melvin-bot bot removed the Overdue label Sep 4, 2023
@hayata-suenaga
Copy link
Contributor

I feel like this issue is related to the secure login project. Asked involved engineers about this issue on slack.

@Santhosh-Sellavel
Copy link
Collaborator

Santhosh-Sellavel commented Sep 7, 2023

@hayata-suenaga Unassigning due to low bandwidth, if C+ assistance required please re-assign a new C+ by adding external label here thanks!

@Santhosh-Sellavel Santhosh-Sellavel removed their assignment Sep 7, 2023
@hayata-suenaga
Copy link
Contributor

I'm confirming with the engineering team if this issue is related to the secure login project.

@hayata-suenaga
Copy link
Contributor

I confirmed this is an expected behavior. I'm closing this issue 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

6 participants