Closed kavimuru closed 1 week ago
Triggered auto assignment to @stephanieelliott (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
@stephanieelliott FYI 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 this bug might be related to #wave-collect - Release 1
@stephanieelliott Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Job added to Upwork: https://www.upwork.com/jobs/~01ee0bafa7bb3dc0e3
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ZhenjaHorbach (External
)
Waiting for proposals on this one
Hi, I'm Viktoryia from Callstack - expert contributor group - and I would like to work on this issue.
I wasn't able to reproduce the issue. Approve button doesn't return for me.
https://github.com/Expensify/App/assets/23176449/f50f7001-37a4-4f17-a929-10ee02586fe3
@stephanieelliott, @ZhenjaHorbach Whoops! This issue is 2 days overdue. Let's get this updated quick!
Not overdue I will try to reproduce this issue tomorrow
Note: I'll be OOO on Monday (24.06) 🌴
I confirm that the bug is reproducible Out of 7 attempts, 3 times were successful
https://github.com/Expensify/App/assets/68128028/d1b31c05-b78b-49ed-94a5-bcc33ab9398a
📣 @ZhenjaHorbach 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
Thanks @ZhenjaHorbach! @VickyStash sounds like this is intermittent, maybe try reproing a few times?
I haven't had a lot of time today for this issue, but I was finally able to reproduce the issue.
It looks like the issue can be caused by a combination of OpenReport and ApproveMoneyRequest API calls. So if a user quickly opens the expense quickly and press the Approve button, the following steps can happen:
Approve
button turns into Pay
. Pay
button turns into Approve
. Approve
button turns into Pay
again.I need some time to think about the solution.
Unfortunately, I haven't had enough time today to investigate this issue more, I'll do my best to take a look tomorrow.
Thanks @VickyStash! Glad we were at least able to nail down how to repro it
Note: I'll be OOO Jul 1 - Jul 7 🌴
@VickyStash @stephanieelliott @ZhenjaHorbach 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!
@VickyStash, @stephanieelliott, @ZhenjaHorbach Whoops! This issue is 2 days overdue. Let's get this updated quick!
@VickyStash is working on this. Given that it's hard to repro and is mostly a display issue that does not impact app functionality, we'll hold on this while they are OOO next week. Setting this to Weekly
in the meantime since there will likely be no updates for several days.
Hi, I'm Eugene from Callstack - expert contributor group.
I have the capacity and am going to take over the issue
Great, thanks @pasyukevich -- I've assigned you on this issue!
Triggered auto assignment to @sonialiap (NewFeature
), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.
Applying the New Feature
label to get another BZ member on this while I am OOO til July 10. To catch you up on where we are @sonialiap, expert contributor @pasyukevich just took over this issue and is looking into it..
Thanks for watching over this, I'll grab it back from you when I return!
I was able to reproduce this behavior and am currently thinking about the solution
Today's update: Still working on possible solutions for this problem
Today's update:
As already mentioned, we have this issue only in the case of a delayed OpenReport Request during the opening of the expense page.
How this can be fixed:
Also as I see we have flow with lastUpdateID
to track orders of updates for Onyx. But this part does not apply to the optimistic data race condition with API update.
I think that this issue is also connected with this one - https://github.com/Expensify/App/issues/37560.
This issue looks global and can be reproducible in other places.
Should I prepare a proposal with a fix only for this case or focus on a global one?
This issue looks global and can be reproducible in other places.
Should I prepare a proposal with a fix only for this case or focus on a global one?
@stephanieelliott Hello 😃 What do you think about this comment from @pasyukevich ?
Yeah @pasyukevich, if that is possible then I think we may as well go for a global fix rather than just fixing this case.
@pasyukevich @stephanieelliott @ZhenjaHorbach this issue is now 4 weeks old, please consider:
Thanks!
@pasyukevich, @stephanieelliott, @ZhenjaHorbach Huh... This is 4 days overdue. Who can take care of this?
Got it, I will switch back to this issue tomorrow
Thanks @pasyukevich!
Work in progress - checking different scenarios to fix it globally
@pasyukevich, @stephanieelliott, @ZhenjaHorbach 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
Not overdue Work in progress !
Today's update:
Work in progress, preparing the proposal
@pasyukevich, @stephanieelliott, @ZhenjaHorbach Whoops! This issue is 2 days overdue. Let's get this updated quick!
Not overdue
When we open the freshly submitted expense from the collect workspace and press the "Approve" button quickly, we can see that the state of this button will change to "Pay", "Approve" and "Pay" back.
When we receive a Response from the "Approve" request straight after the OpenReport
response we do not apply it and pause the queue as we detect inside the SaveResponseInOnyx
that the previousUpdateID
from the response is greater than lastUpdateIDFromClient
. Because of this we are put on hold update and waiting additionaly for the getMissingOnyxUpdates
request. In the middle of it, we are applying a response from the OpenReportRequest
received just a moment before the ApproveMoneyRequest
response. Only after the getMissingOnyxUpdates
request is resolved, we apply the data from the ApproveMoneyRequest
response.
On the API side, we need to have previousUpdateID
inside the OpenReport
request. In this case, we will detect the gap between the server and frontend state before showing the "Approve" button. User will be able to send ApproveMoneyRequestrequest
only if the gap is eliminated
Change SaveResponseInOnyx
method and even if we detected the gap between FE state and BE state apply a response for the current request, then put the queue on hold, and run getMissingOnyxUpdates
request.
@pasyukevich Thanks for your proposals I like both proposals But the second one looks more comprehensive And could potentially fix other bugs related to the request queue
But first, let's find out what the internal team thinks 🎀👀🎀 C+ reviewed
Triggered auto assignment to @techievivek, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@stephanieelliott Can we have a review of the proposal from the internal team as @ZhenjaHorbach mentioned?
One of the proposals relates to the API side
Sure! @techievivek would you mind reviewing this proposal: https://github.com/Expensify/App/issues/43783#issuecomment-2252404214
@pasyukevich, @stephanieelliott, @techievivek, @ZhenjaHorbach Whoops! This issue is 2 days overdue. Let's get this updated quick!
Not overdue
This one certainly is a tricky one, reviewing the GH to see how we can move forward here, thanks.
Not overdue
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.83-1 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/4627303&group_by=cases:section_id&group_id=306206&group_order=asc Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: applause internal team Slack conversation:
Action Performed:
Precondition: Create a Collect workspace in ND with an expensifail account. Invite a Gmail account as a member. Enable Workflows and add a Plaid Regions bank account.
Member: Navigate to https://staging.new.expensify.com/
Member: Log in
Admin: Log in
Member: Submit a manual expense to the workspace chat
Admin: Quickly open the IOU and approve it
Expected Result:
"Pay with Expensify" should be there until the expense is paid.
Actual Result:
"Pay with Expensify" button appears after approving, after a few seconds, it reverts to "Approve" and back to "Pay with Expensify".
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/Expensify/App/assets/43996225/8f7906fb-c568-419d-9c6a-99300e943b83
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @Issue Owner
Current Issue Owner: @techievivek