Open lanitochka17 opened 9 months ago
Triggered auto assignment to @laurenreidexpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are ✅)Job added to Upwork: https://www.upwork.com/jobs/~017361e55ce3e1ac2d
Current assignee @laurenreidexpensify is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (External
)
Invited members to a workspace shows an error but the user can still access the workspace.
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:
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. https://github.com/Expensify/App/blob/0f68829b176458ddb8349bde9921f81805944403/src/libs/actions/Policy.js#L394-L399
You should filter out users and only show error message for users that were failed to add, not to all.
📣 @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:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Contributor details Your Expensify account email: waqas.abrahim@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~018d936bc5c4987b6f
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
@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.
@laurenreidexpensify This seems internal. Can you please apple the label?
@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.
Current assignee @s77rt is eligible for the Internal assigner, not assigning anyone new.
Triggered auto assignment to @bondydaa (Engineering
), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
@bondydaa this one is internal, so adding engineering for extra eyes
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Sorry it's not clear to me here in the steps.
A is a validated user with an existing account? B is a validated user with an existing account but isn't already on the workspace that A owns?
The problem is that if you try to add an existing user and also invite an invalid phone/email the admin gets an error back but B is properly added (as they should be, right?) but the invalid phone/email isn't added, right?
Yes @bondydaa, the Message shows an error for both account B and an invalid phone but actually B has been added success
I see but B should be and is added right?
I think @WaqasIbrahim was right in their analysis here https://github.com/Expensify/App/issues/25592#issuecomment-1688921768
We are assuming all users failed even though it failed only for 1 user (the invalid phone number)
So I think I agree this is mostly just a front end thing that is incorrectly showing B had an error event though it didn't.
Though I guess I'm not sure if the error thrown states which specific user had the error so maybe we do need to possibly update the API to return that, let me try to confirm that real quick.
Another thing is that in user B, if you open the ws room, you will see Unavailabe instead of the WS name.
hmm I wasn't logged in to my "B" user here initially but after I logged in looks like the room names are there
so I bet the error in the API prevent us from hitting the code that should have pushed all the updates out to the right clients.
inspecting the network request it dosen't look like the error has the accountID(s) it failed for
We could possibly go through the onyx data for the POLICYCHANGELOG_ADD_EMPLOYEE
b/c that shows which employee we added
but that seems kind of hacky to me, I think the API should probably return better which accountIDs were successful and which had errors.
agree, I think it will make it easy for frontend to fix
wowza I was hoping to make this a first pick but this code is confusing 😭
I believe this is where we are hitting the spot where we try to create the accounts if they don't exist https://github.com/Expensify/Web-Expensify/blob/d506283338f/lib/PolicyAPI.php#L1096 @Beamanator @neil-marcellini I see your names in the blame around here so maybe you have a better idea here 🙏.
Can you think of an easy way of capturing which logins we might have failed for and which ones we didn't fail for that we could then return from the API here?
Do you know exactly what is failing when inviting new members?
If you can get it from $modifyEmployeesResponse
that would be nice, but i haven't messed with self::modifyEmployees
much, and it's very scary code haha.
If account creation fails, maybe you can tell from Auth::getAccountIDsByEmails
? I think that won't return accountIDs for emails that don't exist, and I don't think it'll fail - so you could possibly map out which email you invited but didn't get an accountID?
@bondydaa @s77rt @laurenreidexpensify this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
@bondydaa, @s77rt, @laurenreidexpensify Eep! 4 days overdue now. Issues have feelings too...
Not overdue @bondydaa is OOO today - American holiday
Do you know exactly what is failing when inviting new members?
In this exact scenario the failure is because we block trying to create an account for a phone number that is outside of the country you are in... i know super strange and actually probably something we might need to reconsider since there is a legitimate case where an admin could be adding users from a different country.
But I don't think the exact reason matters here much, there could be 42 different reasons why 1 account in a big list that you try to add doesn't work and it shouldn't mark them all as failed in that case.
something we might need to reconsider since there is a legitimate case where an admin could be adding users from a different country.
We have this https://github.com/Expensify/Expensify/issues/262189 already about addressing that problem so not something we need to concern ourselves with here.
This issue should focus on fixing it so that 1 error while adding doesn't mark them all as failing.
@bondydaa @s77rt @laurenreidexpensify this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!
@bondydaa, @s77rt, @laurenreidexpensify Huh... This is 4 days overdue. Who can take care of this?
@bondydaa @s77rt @laurenreidexpensify this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!
@bondydaa, @s77rt, @laurenreidexpensify Huh... This is 4 days overdue. Who can take care of this?
@bondydaa @s77rt what do we think next steps are/
@laurenreidexpensify I think @bondydaa may answer this better. I don't have access to https://github.com/Expensify/Expensify/issues/262189
next steps are to fix the API, not sure this needs to be a daily or in /App since this will need to be fix primarily in the API though maybe it does need some front end changes.
I don't really have the bandwidth right now to focus on it though.
@bondydaa @s77rt @laurenreidexpensify this issue is now 4 weeks old and preventing us from maintaining WAQ. This should now be your highest priority. Please post below what your plan is to get a PR in review ASAP. Thanks!
Making this a weekly
This is still fine as a weekly
@bondydaa any capacity to check this out yet?
@bondydaa bump - are you able to look into it yet?
sorry no not really, need to focus on finishing off the recarding doc so mostly heads down on that.
haven't got back into this yet, other projects still taking priority atm.
still haven't had time to dig back in here
still no update, uspm and other chores still taking priority. have to focus on recarding issues and PCI next week.
still haven't gotten back to this, I'm going to demote it to monthly since it's been months and nothing bad has happened.
I agree we should still fix this at some point but I have other priorities that need to get wrapped up before EOY. I'll bring it up on the resync engineering threads to see if someone can take it over though as well.
posted this here https://expensify.slack.com/archives/CC7NECV4L/p1702496004198239?thread_ts=1702417170.002649&cid=CC7NECV4L trying to see if someone else can take it over
This issue has not been updated in over 15 days. @bondydaa, @s77rt, @laurenreidexpensify eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
trying to see what wave this might fall under to see if we can hand it off b/c I'm still focused on getting USPM out the door.
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:
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?
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
https://github.com/Expensify/App/assets/78819774/971f2b38-d29e-48ec-8b3c-3979ff760643
https://github.com/Expensify/App/assets/78819774/a7ea2029-b25d-42d8-a67d-99eecd853888
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
Issue Owner
Current Issue Owner: @bondydaa