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
[$500] Deeplinks - Infinite loading displayed when user navigated on non-existing chat deeplink #33638
Version Number: 1.4.17.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: 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:
changed the title [-] Deeplinks - Infinite loading displayed when user navigated on non-existing chat deeplink[/-][+][$500] Deeplinks - Infinite loading displayed when user navigated on non-existing chat deeplink[/+]on Dec 27, 2023
Please re-state the problem that we are trying to solve in this issue.
Infinite loading displayed
What is the root cause of that problem?
We're reusing ReportScreen even though the reportID in route changes.
See here, when the reportID in route changes, the same ReportScreen instance will be used. So the wasReportAccessibleRef in here is still true, even though now it's a new report and it should be evaluated again. This causes the shouldShowNotFoundPagehere to always be false, preventing the not found screen from opening.
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)
If we want to keep the ReportScreen render shared between different reportIDs, we need to reset the wasReportAccessibleRef to false when the reportID from route change (and potentially the firstRenderRef to true as well), and modify the condition here so that it will not set wasReportAccessibleRef to false if the reportID of report and reportID from route doesn't match.
@garrettmknight Although the issue was fixed somewhere else, efforts have been made to implement, test and review carefully the PR. Please consider payment for this issue. Thanks!
Activity
[-] Deeplinks - Infinite loading displayed when user navigated on non-existing chat deeplink[/-][+][$500] Deeplinks - Infinite loading displayed when user navigated on non-existing chat deeplink[/+]melvin-bot commentedon Dec 27, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01bad93f473888207b
melvin-bot commentedon Dec 27, 2023
Triggered auto assignment to @garrettmknight (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Dec 27, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Dec 27, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (
External)tienifr commentedon Dec 27, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Infinite loading displayed
What is the root cause of that problem?
We're reusing ReportScreen even though the reportID in route changes.
See here, when the reportID in route changes, the same
ReportScreeninstance will be used. So thewasReportAccessibleRefin here is stilltrue, even though now it's a new report and it should be evaluated again. This causes theshouldShowNotFoundPagehere to always be false, preventing the not found screen from opening.What changes do you think we should make in order to solve the problem?
Add route reportID as
keyof ReportScreen.We can do this by modify this to
(The
getReportIDis the same as here)What alternative solutions did you explore? (Optional)
If we want to keep the
ReportScreenrender shared between different reportIDs, we need to reset thewasReportAccessibleRefto false when the reportID from route change (and potentially thefirstRenderReftotrueas well), and modify the condition here so that it will not setwasReportAccessibleRefto false if the reportID ofreportand reportID from route doesn't match.wildan-m commentedon Dec 27, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Deeplinks - Infinite loading displayed when user navigated on non-existing chat deeplink
What is the root cause of that problem?
In native, ReportScreen is not actually unmounted when there is a change in reportID.
When the reportID known to be invalid it will hit this check in ReportScreen.
onyxReportID and prevReport.reportID will be
undefined.This will cause infinite loading since
isLoadingInitialReportActionsneverfalseandwasReportAccessibleRef.currentwill always be true.What changes do you think we should make in order to solve the problem?
When
reportIDknown to be invalid, we can markwasReportAccessibleRef.currentandisLoadingInitialReportActionstofalsegarrettmknight commentedon Dec 29, 2023
@sobitneupane any thoughts on these proposals?
51 remaining items
sobitneupane commentedon Feb 20, 2024
I am expecting updates from @tienifr in the PR.
sobitneupane commentedon Mar 5, 2024
The issue was resolved by #36477 PR. So, we are going to close the PR #35228 created for this issue.
marcochavezf commentedon Mar 5, 2024
Oh then the issue is no longer reproducible in main, correct?
tienifr commentedon Mar 6, 2024
@marcochavezf That's true.
garrettmknight commentedon Mar 8, 2024
Gotcha, gonna close in that case.
tienifr commentedon Mar 11, 2024
@garrettmknight Although the issue was fixed somewhere else, efforts have been made to implement, test and review carefully the PR. Please consider payment for this issue. Thanks!
tienifr commentedon Mar 14, 2024
@garrettmknight Can you check the above ^. Thanks 🙏
garrettmknight commentedon Mar 14, 2024
Hey @tienifr - missed the first comment. I think half payment is fair. I'll process now.
Summary of Payments:
garrettmknight commentedon Mar 14, 2024
@sobitneupane can you request payment when you get a chance?
JmillsExpensify commentedon Mar 22, 2024
$250 approved for @sobitneupane based on summary.