Open kbecciv opened 6 months ago
Triggered auto assignment to @mallenexpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
@mallenexpensify I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
We think that this bug might be related to #vip-bills CC @quinthar
Job added to Upwork: https://www.upwork.com/jobs/~01606c57f19fab1b0c
Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External
)
Was able to reproduce, pretty sure we're filing this in #vip-split. Going to add there.
@akinwale I marked this External, do you agree?
@akinwale I marked this External, do you agree?
Yes. It makes sense to let the user know that the attempted payment actually failed.
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem? In Step-6, [User B] deletes the IOU, removing it from the server. When [User A] goes online, an API call sends a PayMoneyRequest. Since the related paid IOU no longer exists on the server, the server responds with an error message.
PayMoneyRequest is sent to the server and a response is received before the ReconnectApp request. I have tested it more than 50 times on staging/local system
1- Response of https://dev.new.expensify.com:8082/api/PayMoneyRequest?
{
"code": 666,
"jsonCode": 666,
"type": "Expensify\\Libs\\Error\\ExpError",
"UUID": "15599214-3cf5-486d-a718-7473f9a66461",
"message": "The request has been deleted since you started reviewing it",
"title": "",
"data": {
"onyxData": [
{
"onyxMethod": "merge",
"key": "reportActions_7570059040520446",
"value": {
"8410491383366069554": {
"errors": {
"1717213301956141": "The request has been deleted since you started reviewing it"
}
}
}
}
]
},
"htmlMessage": "",
"onyxData": [
{
"onyxMethod": "merge",
"key": "reportActions_7570059040520446",
"value": {
"8410491383366069554": {
"errors": {
"1717213301956141": "The request has been deleted since you started reviewing it"
}
}
}
}
],
"requestID": "88cc307e4aac9fe6-SIN"
}
This error message should be shown to the user, but following the ReconnectApp response, the deleted IOU data from Onyx at the client side removes the IOU for [User A], causing the IOU to disappear and the RBR not to be shown
2- Response of https://dev.new.expensify.com:8082/api/ReconnectApp?
{
"onyxData": [
{
"key": "reportActions_5865121211484369",
"onyxMethod": "merge",
"value": {
"5066949385780238245": {
"message": [
{
"deleted": "2024-06-01 03:41:13.452",
"type": "TEXT"
}
],
"originalMessage": {
"deleted": "2024-06-01 03:41:13.452"
}
}
}
},
{
"key": "report_7535596232475694",
"onyxMethod": "set",
"value": null
},
{
"key": "reportActions_7535596232475694",
"onyxMethod": "set",
"value": null
},
{
"key": "report_7570059040520446",
"onyxMethod": "set",
"value": null
},
{
"key": "reportActions_7570059040520446",
"onyxMethod": "set",
"value": null
},
{
"key": "transactions_4222740866756488814",
"onyxMethod": "set",
"value": null
},
{
"key": "reportActions_7570059040520446",
"onyxMethod": "set",
"value": null
},
{
"key": "report_7570059040520446",
"onyxMethod": "set",
"value": null
},
{
"key": "reportActions_5865121211484369",
"onyxMethod": "merge",
"value": {
"5066949385780238245": {
"message": [
{
"deleted": "2024-06-01 03:41:13.452",
"html": "",
"isDeletedParentAction": false,
"isEdited": false,
"text": "",
"type": "COMMENT",
"whisperedTo": []
}
],
"originalMessage": {
"deleted": "2024-06-01 03:41:13.452"
}
}
}
},
{
"key": "report_7535596232475694",
"onyxMethod": "set",
"value": null
},
{
"key": "reportActions_7535596232475694",
"onyxMethod": "set",
"value": null
},
{
"key": "report_5865121211484369",
"onyxMethod": "merge",
"value": {
"iouReportID": null,
"lastActorAccountID": 16328678,
"lastMessageHtml": "",
"lastMessageText": "",
"lastVisibleActionCreated": "2024-06-01 03:39:54.784"
}
}
],
"lastUpdateID": "418604732",
"previousUpdateID": "418603927",
"jsonCode": 200,
"requestID": "88cc30863a5aa98e-SIN"
}
What changes do you think we should make in order to solve the problem? https://github.com/Expensify/App/blob/0cb2dc052f01b6a024ac872ad8bf628159fe7873/src/libs/actions/OnyxUpdates.ts#L35 We change it as
const filteredOnyxData = filterOutPaidIOUDeletions(response.onyxData);
const onyxDataUpdatePromise = filteredOnyxData ? updateHandler(filteredOnyxData) : Promise.resolve();
Since the response of ReconnectApp directly updates Onyx, we need to filter the server response of ReconnectApp in the filterOutPaidIOUDeletions function to prevent data deletion from Onyx (Client Side). I think we should have to modify this file or possibly another part of the middlewares to achieve this.
PayMoneyRequest and its response are fine and do not require changes.
Before Code Change:
https://github.com/Expensify/App/assets/2220885/f6ed1945-36d0-433e-a9be-e8a818fab865
After Code Change:
https://github.com/Expensify/App/assets/2220885/e314658d-4eba-4c0e-b679-ac8157861d99
What alternative solutions did you explore? Don't allow to pay IOU offline.
๐ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐ธ
@akinwale can you please review the proposal above? Thx
๐ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐ธ
Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External
)
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (External
)
Removed @akinwale , was ten days without a review of the proposal. @abdulrahuman5196 , can you please review the above? https://github.com/Expensify/App/issues/38338#issuecomment-2014433112
Hi, will review this today.
๐ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐ธ
On @ijmalik 's proposal here - https://github.com/Expensify/App/issues/38338#issuecomment-2014433112. I don't agree on the solution suggested to make changes in the central SaveResponseInOnyx.ts component to fix this particular case. I think we don't have any proposals to approve yet.
@mallenexpensify @abdulrahuman5196 this issue is now 4 weeks old, please consider:
Thanks!
@mallenexpensify, @abdulrahuman5196 Whoops! This issue is 2 days overdue. Let's get this updated quick!
We don't have proposals pending for review .
๐ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐ธ
@mallenexpensify, @abdulrahuman5196 Whoops! This issue is 2 days overdue. Let's get this updated quick!
We don't have proposals to review.
Throwing retest-weekly
on here since it's been open a while.
๐ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐ธ
@mallenexpensify, @abdulrahuman5196 Huh... This is 4 days overdue. Who can take care of this?
Waiting on retest
๐ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐ธ
@mallenexpensify, @abdulrahuman5196 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Waiting on retest (leaving a daily cuz it should be retested soon)
@mallenexpensify, @abdulrahuman5196 Whoops! This issue is 2 days overdue. Let's get this updated quick!
Checking on process and timeline for 'retest-weekly' label in #qa https://expensify.slack.com/archives/C9YU7BX5M/p1714532562694299
๐ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐ธ
@mallenexpensify, @abdulrahuman5196 Huh... This is 4 days overdue. Who can take care of this?
Issue is reproducible during KI retests.
https://github.com/Expensify/App/assets/43995119/ade31de8-8397-4e5a-aa1c-328e626d5873
We have site issues and deploy freeze, I'll revisit next week.
๐ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐ธ
@mallenexpensify, @abdulrahuman5196 Eep! 4 days overdue now. Issues have feelings too...
Waiting on proposals, since it's [LOW], I'm not eager to raise the price about $500 right now.
๐ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐ธ
Still waiting
I believe the current behavior is as expected, with the deletion process received by the API server first and the payment approval action being sent later when the user online. Or I missed some steps?
@mallenexpensify, @abdulrahuman5196 Whoops! This issue is 2 days overdue. Let's get this updated quick!
๐ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐ธ
@wildan-m , I'm unsure. Thanks for the comment. @abdulrahuman5196 , do you know?
@mallenexpensify, @abdulrahuman5196 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
I believe the current behavior is as expected, with the deletion process received by the API server first and the payment approval action being sent later when the user online. Or I missed some steps?
@wildan-m , I'm unsure. Thanks for the comment. @abdulrahuman5196 , do you know?
@mallenexpensify Can we confirm this experience with someone else as well if you are unsure? Because the above mentioned is the steps from the dev perspective. But in terms of customer perspective, customer marked a request as paid, but it suddenly disappeared without showing error or anything. So IMO this is a bug, but would be good to confirm as well.
Here's the TestRail from where the bug was found.
the deletion process received by the API server first and the payment approval action being sent later when the user online
Even if this is the case, it appears this would still be a bug if it's not functioning as intended, based on the TestRail case above. I'm unsure how best to fix though
๐ฃ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? ๐ธ
[Updated] https://github.com/Expensify/App/issues/38338#issuecomment-2014433112
If you havenโt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.52-0 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4424536 Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
The deleted IOU should not disappear when you pay and should appear RBR when you go online
Actual Result:
When paying a deleted IOU disappears and RBR does not appear when going online
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/93399543/7933a1bd-6eb5-48ef-9ff0-25f3404b2ac3
View all open jobs on GitHub
Upwork Automation - Do Not Edit