-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$500] Not found is shown when deeplinking to expense details #37083
Comments
Triggered auto assignment to @garrettmknight ( |
This is coming from this other issue: #34346 @shahinyan11 posted a proposal here But if you could extract the part that makes sense to this one. |
Now I'll add the extracted version here to make it easier to understand |
ProposalPlease re-state the problem that we are trying to solve in this issue.Not found is shown when deeplinking to expense details What is the root cause of that problem?The What changes do you think we should make in order to solve the problem?Us What alternative solutions did you explore? (Optional) (edited)Always apply changes for specific endpoints . In this case for
As ay already said that it can be happen in other places we can create new constant for request commands list during which we will still overwrite the data . e.g
|
Job added to Upwork: https://www.upwork.com/jobs/~01715c671a688b4a3b |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @paultsimura ( |
Hey @s77rt, would you like to take this one over as a C+ since you've worked on the original issue?🙏 |
@paultsimura Sure! Taking this as C+ |
@shahinyan11 Thanks for the proposal. The RCA seems incomplete. I have some questions/concerns:
Footnotes |
ProposalPlease re-state the problem that we are trying to solve in this issue.Not found page is shown when open transaction thread report after login What is the root cause of that problem?Summary: The onyx data from the OpenReport request isn't applied because the data is considered outdated. When we open (deeplink) a report after login, there are 2 requests are made, OpenApp and OpenReport. OpenApp is a read request, so both requests are run in parallel. When the OpenReport request finishes first, App/src/libs/Middleware/SaveResponseInOnyx.ts Lines 40 to 45 in 4a885f5
because App/src/libs/actions/OnyxUpdates.ts Lines 136 to 139 in 4a885f5
if OpenApp finishes first, this issue won't happen This will trigger a ReconnectApp request. App/src/libs/actions/OnyxUpdateManager.ts Lines 59 to 75 in 4a885f5
ReconnectApp will return a App/src/libs/Middleware/SaveResponseInOnyx.ts Lines 40 to 42 in 4a885f5
After it's done, the saved OpenReport response is processed. App/src/libs/actions/OnyxUpdateManager.ts Lines 87 to 88 in 4a885f5
However, the OpenReport App/src/libs/actions/OnyxUpdates.ts Lines 81 to 85 in 4a885f5
so the response data is ignored. What changes do you think we should make in order to solve the problem?I think ideally we should wait for the OpenApp request to be finished first before doing the OpenReport request because ReconnectApp doesn't return all report that a user has. To achieve that, first we need to change the OpenApp API from READ to WRITE, just like we did for ReconnectApp, so it's processed sequentially. However, this isn't enough because OpenApp is called after a promise and onyx connection which delays the call. Lines 210 to 216 in 4a885f5
Lines 149 to 158 in 4a885f5
To solve this, we can follow a similar pattern of the promise here Lines 80 to 87 in 4a885f5
Then, we will resolve the promise once the OpenApp/ReconnectApp api is pushed to the queue Lines 214 to 215 in 4a885f5
Lines 242 to 243 in 4a885f5
why ReconnectApp too? because ReconnectApp will be called instead of OpenApp if we already logged in previously Or we can resolve the promise immediately when the
Then, we will wait for the promise here: App/src/libs/actions/Report.ts Lines 724 to 727 in 4a885f5
|
📣 @s77rt 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Oh, that wasn't my intention, just switching the C+ per this comment |
@bernhardoj Thanks for the proposal. Your RCA is correct. Regarding the solution:
After doing that, will the |
@bernhardoj If we deeplink into a report the App/src/libs/actions/Report.ts Lines 719 to 727 in 4a885f5
|
Yes, that would be intentional since |
@bernhardoj In that case you suggestion solution shouldn't work as we won't wait for |
We don't need to wait for OpenApp (or specifically App/src/libs/actions/OnyxUpdates.ts Lines 130 to 134 in 89d5689
App/src/libs/Middleware/SaveResponseInOnyx.ts Lines 40 to 42 in 89d5689
|
Sorry. I mixed up some files and went the wrong way |
Proposal |
@bernhardoj That's not entirely true and contradicts with your RCA. I have noticed that |
@shahinyan11 Thanks for the update. The RCA makes sense but the suggested solutions are workarounds. |
🎀 👀 🎀 C+ reviewed This could be internal. Can you please check when or what are the cases where It seems that if we remove App/src/libs/actions/OnyxUpdates.ts Lines 130 to 134 in 87eeb99
|
Triggered auto assignment to @deetergp, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@deetergp Adding to the above ^ I think |
@s77rt can you try again checking the response? I don't see |
@bernhardoj Ah sorry I missed the part that we pass |
@deetergp can you help confirm if this needs to be internal via this comment when you get a chance? |
@s77rt Getting rid of |
@deetergp I'm not suggesting the removal of App/src/libs/actions/OnyxUpdates.ts Line 131 in 87eeb99
OpenReport command can act as both a write and a read request, write request if creating a new report and a read request otherwise.
Example 1: Response when reading an existing report Example 2: Response when creating a new report (chat with a user you have not chatted with before, etc.) The problem is that we are encountering a case where we are reading an existing report (the money request report) yet get the |
@deetergp, @garrettmknight, @s77rt Whoops! This issue is 2 days overdue. Let's get this updated quick! |
I believe this is a dupe of #34528, we should reopen the original issue, there're some history there |
@deetergp, @garrettmknight, @s77rt Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@tienifr nice catch - agreed that this is a dupe of #34528. @shahinyan11 please add your proposal there if you'd still like to put it forward. |
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:**v1.4.43-11
**Reproducible in staging?:**y
**Reproducible in production?:**y
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
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:
Action Performed:
Break down in numbered steps
Expected Result:
Describe what you think should've happened
Expense details page should load
Actual Result:
Describe what actually happened
A not found view is shown
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Reloading the page works
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Screen.Recording.2024-02-18.at.2.01.32.PM.mov
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @deetergpThe text was updated successfully, but these errors were encountered: