Closed kbecciv closed 1 year ago
Triggered auto assignment to @isabelastisser (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are ✅)Cannot split money in DM group chat (where there is a non logged in user)
Root cause of the issue is in IOU.js, createSplitsAndOnyxData
method where it fails at the line
It does so because if the group has a member who is not an actual logged in user, his login field is undefined which causes the failure of the arrayToString
method since it does not expect an undefined. As a result we fail to get formatted participants list which we use in the system message in the chat report after splitting the bill
Upon further investigation, I found the main root cause to be the optimistic data being used when we split bill from FAB, and while splitting the bill from chat report, we are using the data stored in onyx.
See for the same account, we have different data upon spliting bill from different places
Simple fix:
We can get their login field from some other key, and for this we already have alternateText
that we can use.
Or can use accountID to fetch it via PersonalDetailsUtils's method getPersonalDetailsByIDs
Otherwise, expected behavior considering all the cases should be known, then we can decide how to approach this
we can also restrict split bill functionality for the logged in users only
I'm unable to reproduce this.
@isabelastisser please check slack link. This bug is being actively researched on.
Job added to Upwork: https://www.upwork.com/jobs/~011a656ab6a105b57b
Current assignee @isabelastisser is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (External
)
I was not able to reproduce this issue.
Refer the slack thread @fedirjh
Discussing the next steps in Slack.
We can't reproduce this. @chiragxarora, if you can help with reproducible steps (as per Carlo's suggestion in the Slack discussion), please follow up on this issue.
I am closing this for now.
@isabelastisser please create new group with any random users (mix of existing contacts and non-existing contacts)
Also test with new account
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690404444868009 Posting a clear reproduction steps:
https://github.com/Expensify/App/assets/93399543/9478c33e-3c48-45f8-a2e0-a58503a5024c
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@isabelastisser @fedirjh this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!
Awaiting on proposals.
Still waiting for proposals.
Cannot split money in DM group chat.
The root cause is that new user does not have login
field.
This is expected if another user has never interaction with you and is the purpose of login => accountID migration.
After create a group chat with new users, BE responds personalDetailsList
as below.
If split money success, BE responds as below.
In MoneyRequestConfirmPage
page, participants
will be retrieved as below.
https://github.com/Expensify/App/blob/89dfb7788ed3a533da5d5e2c9e55335028570d82/src/pages/iou/steps/MoneyRequestConfirmPage.js#L71
https://github.com/Expensify/App/blob/89dfb7788ed3a533da5d5e2c9e55335028570d82/src/libs/OptionsListUtils.js#L207-L234
So the login
field of participants
is set to undefined
.
In these line, because login
field is undefined
, so the console error will be shown, and cannot split money.
https://github.com/Expensify/App/blob/89dfb7788ed3a533da5d5e2c9e55335028570d82/src/libs/actions/IOU.js#L452
https://github.com/Expensify/App/blob/89dfb7788ed3a533da5d5e2c9e55335028570d82/src/libs/actions/IOU.js#L574
We can set login
field of participants
as below, because displayName
of new user is just email address.
After split money success, the login
of new user will be set correctly.
reportID
to PopoverReactionList
in this line.
return {
keyForList: String(detail.accountID),
### What alternative solutions did you explore? (Optional)
None.
After create a group chat with new users, duplicated contacts is stored in Onyx
.
This will be fixed in https://github.com/Expensify/App/issues/21706
@fedirjh it seems like we only have one proposal above, can you please review it and let me know if we should move forward with that? Thanks!
@chiragxarora @StevenKKC The root cause needs further investigation. The participants are generated optimistically, so we should have the required data for making the split request. The issue doesn’t seem to be reproducible in offline mode, so I think the problem is in the backend.
Upon further investigation, I found the main root cause to be the optimistic data being used when we split bill from FAB, and while splitting the bill from chat report, we are using the data stored in onyx.
@chiragxarora Can you please elaborate more?
As for the solution, I think both solutions are not valid, for some logins we don't have any data about the emails, alternateText
or displayName
will not always hold the email, it will hold the display name and fallback to email: here is an example, second email is a valid account with display name:
Finally, I think a backend changes may be required to fix this case. I found that we still use emails in the SplitBill
command, and that maybe was missed during the accountID
refactor ? cc @puneetlath @Beamanator
We don't have a proposal yet.
I think this can probably be closed as a dupe of https://github.com/Expensify/App/issues/21268
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@isabelastisser Seems it will be covered in https://github.com/Expensify/App/issues/21268. Let's hold / close ?
@isabelastisser @fedirjh this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:
Thanks!
Current assignee @fedirjh is eligible for the Internal assigner, not assigning anyone new.
Based on the comments below, I will close this.
https://github.com/Expensify/App/issues/22440#issuecomment-1664673279
https://github.com/Expensify/App/issues/22440#issuecomment-1665866448
Payment summary:
Issue reported by: @0xmiroslav $250
I will process the payment in Upwork now.
@isabelastisser can you please hold my payment until further notice? I am working on some stuff due to recent measurements in my region. Thanks
@isabelastisser sorry for inconvenience. I am now ready for payment as discussed in email.
@0xmiroslav I resent the offer in Upwork now, please accept it and I will process the payment. Thanks!
@isabelastisser sorry if you haven't checked email, can you please check https://expensify.slack.com/archives/C01SKUP7QR0/p1692226249296529?thread_ts=1691559426.466079&cid=C01SKUP7QR0?
Hey @0xmiroslav, thanks for the heads up! I reviewed the discussion now and re-sent the proposal to Volodymyr L.
All set.
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:
Money is split correctly
Actual Result:
hows console error
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: Dev 1.3.37-6 Reproducible in staging?: n/a Reproducible in production?: n/a 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/93399543/98b81d9b-68a8-4c59-be1f-9691bdc4fa7c
Expensify/Expensify Issue URL: Issue reported by: @0xmiroslav Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688715731926879
View all open jobs on GitHub
Upwork Automation - Do Not Edit