-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[HOLD for payment 2025-01-13] [HOLD for payment 2024-12-30] [$250] Accounting - Accounting tab loads infinitely when the workspace is created offline #52027
Comments
Triggered auto assignment to @slafortune ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Infinity loading in accounting page if creating the workspace while offline. What is the root cause of that problem?The loading will show if the condition below is met. App/src/pages/workspace/withPolicyConnections.tsx Lines 58 to 60 in b1bffa6
The one that we need to focus on is App/src/pages/workspace/withPolicyConnections.tsx Lines 32 to 35 in b1bffa6
The App/src/libs/actions/PolicyConnections.ts Lines 8 to 33 in b1bffa6
When we make a read request, it will wait for all write requests to complete first, by using the Lines 170 to 179 in b1bffa6
App/src/libs/Network/SequentialQueue.ts Lines 270 to 272 in b1bffa6
However, in our case, the promise is never resolved even after all write requests are completed. That's because, while waiting for the promise to be resolved, the promise is recreated, so the old one is never resolved. App/src/libs/Network/SequentialQueue.ts Lines 155 to 158 in b1bffa6
It's recreated every time App/src/libs/Network/SequentialQueue.ts Line 153 in b1bffa6
App/src/libs/Network/SequentialQueue.ts Lines 136 to 139 in b1bffa6
But in our case, App/src/libs/Network/SequentialQueue.ts Lines 95 to 98 in b1bffa6
When it processes the next request, the promise is resolved because the queue is paused, App/src/libs/Network/SequentialQueue.ts Lines 68 to 71 in b1bffa6
which sets App/src/libs/Network/SequentialQueue.ts Lines 168 to 170 in b1bffa6
When the queue is unpaused, we call App/src/libs/Network/SequentialQueue.ts Lines 188 to 198 in b1bffa6
And because flush -> process (CreateWorkspace) -> process (EnablePolicyConnections) -> pause -> GetMissingOnyxMessages -> unpause -> flush (new isReadyPromise) -> process (ReconnectApp) What changes do you think we should make in order to solve the problem?We shouldn't reset the
And pass true when flushing from App/src/libs/Network/SequentialQueue.ts Lines 188 to 198 in b1bffa6
|
Job added to Upwork: https://www.upwork.com/jobs/~021853787863203385081 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary ( |
Under review. still verifying the RCA, will provide an update tomorrow. |
@bernhardoj's RCA is accurate, with only a slight difference from what I checked. :) App/src/libs/Middleware/SaveResponseInOnyx.ts Lines 38 to 45 in e453cfd
BTW, just a note, in our current App/src/libs/Network/SequentialQueue.ts Lines 251 to 257 in e000d80
we just ensure that all requests in persistedRequests are executed in order by calling flush in multiple places.
|
![]() Additionally, @bernhardoj, just a small question: since our code calls |
I think it should be safe. |
Nice, I think it's fine to move forward with @bernhardoj's proposal. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @srikarparsi, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@ntdiary, @slafortune, @srikarparsi Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Will look at this tomorrow |
@ntdiary, @slafortune, @srikarparsi Whoops! This issue is 2 days overdue. Let's get this updated quick! |
I agree with the RCA and the proposed solution, lets move forward with @bernhardoj's proposal. I agree that |
thanks for that investigation @bernhardoj ! I agree that it looks a lot like an issue in the frontend, but I think it's an issue in the backend. If you're doing 2 sequential writes and constantly finding a gap between the requests (CreateWorkspace -> EnablePolicyConnections) then that means that the first request is not returning all the data the app needs. @srikarparsi I recommend you try this flow locally, and find out which onyxUpdates were not returned, and check the backend code to confirm if they're being sent back on the HTTPs request before we start anything in the front end here. |
@ntdiary, @slafortune, @srikarparsi Huh... This is 4 days overdue. Who can take care of this? |
@ntdiary, @slafortune, @srikarparsi 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it! |
@ntdiary @slafortune @srikarparsi 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! |
It seems to be waiting for some investigation results from the backend. :) |
PR is ready cc: @ntdiary |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.77-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-12-30. 🎊 For reference, here are some details about the assignees on this issue:
|
@ntdiary @slafortune @ntdiary The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
Payment Summary
BugZero Checklist (@slafortune)
|
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test Proposal Template
Regression Test ProposalPrecondition:Test:Do we agree 👍 or 👎 |
@ntdiary - Role C+ - owed $250 via NewDot |
$250 approved for @ntdiary |
Requested in ND. |
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.80-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2025-01-13. 🎊 For reference, here are some details about the assignees on this issue:
|
@ntdiary @slafortune @ntdiary The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
$250 approved for @bernhardoj |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.57-3
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
Accounting tab will load after returning online.
Actual Result:
Accounting tab loads infinitely when the workspace is created offline.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6655070_1730782888555.20241105_125138.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @Issue Owner
Current Issue Owner: @slafortuneThe text was updated successfully, but these errors were encountered: