-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$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 |
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: @ntdiaryThe text was updated successfully, but these errors were encountered: