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

[$500] Workspace - Invite members to workspace error but user can still join the workspace #25592

Open
1 of 6 tasks
lanitochka17 opened this issue Aug 21, 2023 · 131 comments
Open
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 21, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open 2 users on 2 browsers
  2. B send message to A
  3. A create a workspace
  4. A invite B and invalid user (+252 3 234211), observed an error appearing in 2 users when inviting
  5. A go to announce room and send message
  6. From B, Observe that B can access the room

Expected Result:

When the invite user fails, B cannot access the workspace

Actual Result:

B can access the workspace during invite error

Workaround:

Unknown

Platforms:

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

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

Version Number: 1.3.55-7

Reproducible in staging?: Yes

Reproducible in production?: Yes

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

Screen.Recording.2023-08-09.at.21.28.40.mov
Gravar.2942.mp4

Expensify/Expensify Issue URL:

Issue reported by: @namhihi237

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017361e55ce3e1ac2d
  • Upwork Job ID: 1693979555238805504
  • Last Price Increase: 2024-05-02
  • Automatic offers:
    • s77rt | Reviewer | 102505066
    • tienifr | Contributor | 102505069
Issue OwnerCurrent Issue Owner: @bondydaa
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 21, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 21, 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

@laurenreidexpensify laurenreidexpensify changed the title Workspace - Invite members to workspace error but user still join the workspace Workspace - Invite members to workspace error but user can still join the workspace Aug 22, 2023
@laurenreidexpensify laurenreidexpensify added the External Added to denote the issue can be worked on by a contributor label Aug 22, 2023
@melvin-bot melvin-bot bot changed the title Workspace - Invite members to workspace error but user can still join the workspace [$1000] Workspace - Invite members to workspace error but user can still join the workspace Aug 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 22, 2023

Job added to Upwork: https://www.upwork.com/jobs/~017361e55ce3e1ac2d

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

melvin-bot bot commented Aug 22, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 22, 2023

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

@WaqasIbrahim
Copy link

Proposal

Please re-state the problem that we are trying to solve in this issue.

Invited members to a workspace shows an error but the user can still access the workspace.

What is the root cause of that problem?

The issue title is misleading, the cause of the problem is not that the user is not added. The user is added successfully but the malformed phone number is the cause of the error.

API Response:
Screenshot 2023-08-23 at 1 47 33 AM

Error message: "The provided phone number does not match the country you are currently located at, please use your email address instead."

This part assumes that the request failed completely for all users.

value: _.object(
accountIDs,
Array(accountIDs.length).fill({
errors: ErrorUtils.getMicroSecondOnyxError('workspace.people.error.genericAdd'),
}),
),

What changes do you think we should make in order to solve the problem?

You should filter out users and only show error message for users that were failed to add, not to all.

@melvin-bot
Copy link

melvin-bot bot commented Aug 22, 2023

📣 @WaqasIbrahim! 📣
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>

@WaqasIbrahim
Copy link

Contributor details
Your Expensify account email: waqas.abrahim@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~018d936bc5c4987b6f

@melvin-bot
Copy link

melvin-bot bot commented Aug 22, 2023

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

@s77rt
Copy link
Contributor

s77rt commented Aug 22, 2023

@WaqasIbrahim Thanks for the proposal. Indeed the other user seem to "partly" get access to the workspace. I don't see them in the members list but according to the OP video they can access restricted rooms. This should be handled internally.

@s77rt
Copy link
Contributor

s77rt commented Aug 22, 2023

@laurenreidexpensify This seems internal. Can you please apple the label?

@WaqasIbrahim
Copy link

@s77rt You are welcome. Just a suggestion, UX wise this should be handled the same way internally. I (as a user) should not have to reselect the members and add to workspace if last request failed because of one invalid member.

@melvin-bot melvin-bot bot added the Overdue label Aug 25, 2023
@laurenreidexpensify laurenreidexpensify added the Internal Requires API changes or must be handled by Expensify staff label Aug 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 27, 2023

Current assignee @s77rt is eligible for the Internal assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Aug 27, 2023

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

@laurenreidexpensify
Copy link
Contributor

@bondydaa this one is internal, so adding engineering for extra eyes

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Aug 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

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

@bondydaa
Copy link
Contributor

still haven't gotten back to this yes, will do so by EOW

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels May 15, 2024
Copy link

melvin-bot bot commented May 21, 2024

@bondydaa, @s77rt, @laurenreidexpensify Eep! 4 days overdue now. Issues have feelings too...

@bondydaa
Copy link
Contributor

sorry jumped into our recent fires so didn't get to this again last week

@melvin-bot melvin-bot bot removed the Overdue label May 22, 2024
@mvtglobally
Copy link

Issue not reproducible during KI retests. (Third week)

1715968984182.bandicam_2024-05-17_20-00-26-282.mp4

@tienifr
Copy link
Contributor

tienifr commented May 22, 2024

@mvtglobally It's still reproducible via these steps

@melvin-bot melvin-bot bot added the Overdue label May 24, 2024
Copy link

melvin-bot bot commented May 27, 2024

@bondydaa, @s77rt, @laurenreidexpensify Huh... This is 4 days overdue. Who can take care of this?

@bondydaa
Copy link
Contributor

We have an internal issue here https://github.com/Expensify/Expensify/issues/386300 to refactor the AddMembersToWorkspace API which should address some of the bigger backend headaches still lingering in this.

but I finally looked at @tienifr 's proposal and lets do it as well to get this working for now with how the API functions.

as we do more 1:1:1 refactors we can continue to improve.

@melvin-bot melvin-bot bot removed the Overdue label May 29, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 29, 2024
Copy link

melvin-bot bot commented May 29, 2024

📣 @s77rt 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented May 29, 2024

📣 @tienifr 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@mvtglobally
Copy link

Issue not reproducible during KI retests. (Fourth week)

@s77rt
Copy link
Contributor

s77rt commented Jun 1, 2024

@tienifr Thanks for the PR. I just retested and noticed that the employees list is now keyed by email instead of account id. This gives us a potential easy solution. In WorkspaceMembersPage if we don't have the employee's personal details, instead of returning early here, we create a fallback details object. That's almost all we have to do. Please test from your end and update your proposal.

@s77rt
Copy link
Contributor

s77rt commented Jun 1, 2024

@bondydaa A new solution came to light and also a new BE bug 😅 it should be easy to fix though, the AddMembersToWorkspace response contains 2 onyx updates responsible for the employees list, this should be combined into one. Notice in the below screenshot that the second onyx update is targeting the correct object policy_ID.employeeList while first is targeting directly policy_ID which results in the error not being applied correctly.

Screenshot 2024-06-01 at 10 11 11 PM

@tienifr
Copy link
Contributor

tienifr commented Jun 2, 2024

@s77rt The second problem is the error to display. When we invite B and an invalid user (+252 3 234211), the policy.employeeListcontains an invalid user (+252 3 234211) without error. But the error is returned in policy['+252 3 234211@expensify.sms'] (see below image). So currently in the PR, we need to create a requestDataProcessors, which will pick the errors returned in policy['+252 3 234211@expensify.sms'] and add to policy.employeeList['+252 3 234211@expensify.sms']. So the solution is not only what you said above:

In WorkspaceMembersPage if we don't have the employee's personal details, instead of returning early here, we create a fallback details object. That's almost all we have to do.

image

@s77rt
Copy link
Contributor

s77rt commented Jun 2, 2024

@tienifr That's a BE bug #25592 (comment)

@tienifr
Copy link
Contributor

tienifr commented Jun 3, 2024

@bondydaa What do you think about this comment?

@tienifr
Copy link
Contributor

tienifr commented Jun 6, 2024

@bondydaa Any updates here?

@tienifr
Copy link
Contributor

tienifr commented Jun 10, 2024

Still waiting for the response from @bondydaa

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. Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
Archived in project
Development

No branches or pull requests

10 participants