You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-01-17] [$500] Request Money - If user reloads the IOU details page and go back, the same IOU page is shown #33205
Version Number: 1.4.13-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: 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:
Pre-requisite: user must be logged in and be a member of a workspace.
Go to workspace chat.
Initiate an IOU request.
On the details page, reload the page.
Tap on back button
Expected Result:
Once the back button is pressed, the amount page should be shown
Actual Result:
The IOU details page is shown again
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Request Money - If user reloads the IOU details page and go back, the same IOU page is shown[/-][+][$500] Request Money - If user reloads the IOU details page and go back, the same IOU page is shown[/+]on Dec 17, 2023
What alternative solutions did you explore? (Optional)
We can also use more robust url comparing logic; may be use compare-urls to prevent future bugs. (We can use it also in other places where we compare urls 👍 )
Please re-state the problem that we are trying to solve in this issue.
The IOU details page is shown again
What is the root cause of that problem?
The URL structure that we have here have a redundant / at the end, which is inconsistent with other routes in the App.
This leads to the isActiveRoute logic here behaves incorrectly because 1 route has / and the end and the other doesn't.
So when the the current route is not the active route, it will push the current route into itself based on this logic, causing the issue.
What changes do you think we should make in order to solve the problem?
We should make the URL structure consistent across the App by removing the ending /here. This also fixes a flicker where if you reload on the confirmation page, the ending / will disappear after the site is fully loaded.
That should be enough to fix the issue, but we can enhance the comparison logic here by normalize the routePath before comparing, we can do this by replacing all duplicate / like // or /// with / and removing the ending / sequence. Because sometimes duplicate / or ending / will still make the site behave correctly but the routePath will still contain those irregular slashes, causing this issue.
What alternative solutions did you explore? (Optional)
In 1, there're a few other routes that have the same problem, we need to fix it similarly.
changed the title [-][$500] Request Money - If user reloads the IOU details page and go back, the same IOU page is shown[/-][+][HOLD for payment 2024-01-17] [$500] Request Money - If user reloads the IOU details page and go back, the same IOU page is shown[/+]on Jan 10, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.23-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@rushatgabhane] The PR that introduced the bug has been identified. Link to the PR:
[@rushatgabhane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@rushatgabhane] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@rushatgabhane] Determine if we should create a regression test for this bug.
[@rushatgabhane] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@laurenreidexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N.A. We've handled trailing slashes. So this bug shouldn't happen in future.
Determine if we should create a regression test for this bug. No
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again - N.A.
Activity
[-]Request Money - If user reloads the IOU details page and go back, the same IOU page is shown[/-][+][$500] Request Money - If user reloads the IOU details page and go back, the same IOU page is shown[/+]melvin-bot commentedon Dec 17, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01ae972c8a1958f68f
melvin-bot commentedon Dec 17, 2023
Triggered auto assignment to @laurenreidexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Dec 17, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Dec 17, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (
External)FitseTLT commentedon Dec 17, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
If user reloads the IOU details page and go back, the same IOU page is shown
What is the root cause of that problem?
We push the route when we open deeplink here
App/src/libs/actions/Report.ts
Lines 2031 to 2032 in 8bef4bb
But we don't push if the route is the active route which is determined in
getActiveRouteApp/src/libs/Navigation/Navigation.ts
Lines 118 to 119 in 8bef4bb
But in this case route we navigate to has a trailing
/App/src/libs/actions/Report.ts
Lines 2018 to 2019 in 990815f
but what we get from
getActiveRoute()has no slash sogetActiveRouteis returning false incorrectly thus we are pushing the route hereApp/src/libs/Navigation/linkTo.ts
Lines 103 to 104 in 8bef4bb
What changes do you think we should make in order to solve the problem?
We should compare them after changing them to same form in here (remove the trailing slashes) to avoid future bugs
App/src/libs/Navigation/Navigation.ts
Lines 118 to 119 in 8bef4bb
What alternative solutions did you explore? (Optional)
We can also use more robust url comparing logic; may be use compare-urls to prevent future bugs. (We can use it also in other places where we compare urls 👍 )
Charan-hs commentedon Dec 18, 2023
@FitseTLT I think You can use this Regex
FitseTLT commentedon Dec 18, 2023
@Charan-hs Thx Replaced. 👍
tienifr commentedon Dec 18, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
The IOU details page is shown again
What is the root cause of that problem?
The URL structure that we have here have a redundant
/at the end, which is inconsistent with other routes in the App.This leads to the
isActiveRoutelogic here behaves incorrectly because 1 route has/and the end and the other doesn't.So when the the current route is not the active route, it will push the current route into itself based on this logic, causing the issue.
What changes do you think we should make in order to solve the problem?
We should make the URL structure consistent across the App by removing the ending
/here. This also fixes a flicker where if you reload on the confirmation page, the ending/will disappear after the site is fully loaded.That should be enough to fix the issue, but we can enhance the comparison logic here by normalize the
routePathbefore comparing, we can do this by replacing all duplicate/like//or///with/and removing the ending/sequence. Because sometimes duplicate/or ending/will still make the site behave correctly but theroutePathwill still contain those irregular slashes, causing this issue.What alternative solutions did you explore? (Optional)
In 1, there're a few other routes that have the same problem, we need to fix it similarly.
29 remaining items
[-][$500] Request Money - If user reloads the IOU details page and go back, the same IOU page is shown[/-][+][HOLD for payment 2024-01-17] [$500] Request Money - If user reloads the IOU details page and go back, the same IOU page is shown[/+]melvin-bot commentedon Jan 10, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jan 10, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.23-4 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-01-17. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jan 10, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
rushatgabhane commentedon Jan 17, 2024
The PR that introduced the bug has been identified. Link to the PR: Refactor the money request creation flow #28618
The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: https://github.com/Expensify/App/pull/28618/files#r1454533414
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N.A. We've handled trailing slashes. So this bug shouldn't happen in future.
Determine if we should create a regression test for this bug. No
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again - N.A.
rushatgabhane commentedon Jan 17, 2024
@laurenreidexpensify could you please add payment summary for this issue. Thank you 🙇
laurenreidexpensify commentedon Jan 17, 2024
Payment Summary
Contributor - @tienifr paid in Upwork $500
C+ Review - @rushatgabhane pls request in newdot $500
JmillsExpensify commentedon Jan 30, 2024
$500 approved fror @rushatgabhane based on comment above.