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
[$250] Reports - App crashes when clicking browser back button on report view while on selection mode #70068
changed the title [-]Reports - App crashes when clicking browser back button on report view while on selection mode[/-][+][BACK BUTTON] [HOLD on #59245] Reports - App crashes when clicking browser back button on report view while on selection mode[/+]on Sep 11, 2025
Hello assignees. We came to the conclusion in #57969 that the back buttons in the app behave inconsistently and in a way that we don't think is ideal, but that fixing the issue is a potentially high cost, low reward situation. We are going to start tracking these issues and attempt to find a way and somebody who can help solve this problem heuristically across the app.
I have HELD a lot of issues related to the "back button" but any that are currently Reviewing or Due for payment I have not held. If you believe your issue shouldn't be linked or HELD, comment with the explanation and I will review and unlike/remove the hold. Thank you!
What changes do you think we should make in order to solve the problem?
We should defer state updates using requestAnimationFrame so they run after render
useFocusEffect(
useCallback(() => {
// Defer state updates to avoid React error #185 (Cannot update a component while rendering a different component)
// This can happen when navigating back via browser back button while in selection mode
requestAnimationFrame(() => {
clearTransactionsAndSetHashAndKey();
});
}, [clearTransactionsAndSetHashAndKey]),
);
What alternative solutions did you explore? (Optional)
NA
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Activity
melvin-bot commentedon Sep 8, 2025
Triggered auto assignment to @bfitzexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.bfitzexpensify commentedon Sep 9, 2025
Tagged to #quality, internal label added
bfitzexpensify commentedon Sep 9, 2025
Going to set to Weekly for the moment while awaiting a volunteer to take this on
[-]Reports - App crashes when clicking browser back button on report view while on selection mode[/-][+][BACK BUTTON] [HOLD on #59245] Reports - App crashes when clicking browser back button on report view while on selection mode[/+]twisterdotcom commentedon Sep 11, 2025
Hello assignees. We came to the conclusion in #57969 that the back buttons in the app behave inconsistently and in a way that we don't think is ideal, but that fixing the issue is a potentially high cost, low reward situation. We are going to start tracking these issues and attempt to find a way and somebody who can help solve this problem heuristically across the app.
I have HELD a lot of issues related to the "back button" but any that are currently
ReviewingorDue for paymentI have not held. If you believe your issue shouldn't be linked or HELD, comment with the explanation and I will review and unlike/remove the hold. Thank you!29 remaining items
melvin-bot commentedon Dec 23, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov (
External)daledah commentedon Dec 23, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
App crashes when clicking browser back button on report view while on selection mode.
What is the root cause of that problem?
When navigating back via the browser back button:
useFocusEffectruns and updates SearchContext stateApp/src/components/Search/index.tsx
Line 357 in d9509c2
searchResults.dataApp/src/components/Search/index.tsx
Lines 310 to 311 in d9509c2
What changes do you think we should make in order to solve the problem?
We should defer state updates using
requestAnimationFrameso they run after renderApp/src/components/Search/index.tsx
Line 357 in d9509c2
And add null checks to safely handle navigation transitions
App/src/components/Search/index.tsx
Lines 294 to 297 in d9509c2
What alternative solutions did you explore? (Optional)
NA
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
melvin-bot commentedon Dec 26, 2025
@alitoshmatov Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Dec 30, 2025
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
melvin-bot commentedon Jan 1, 2026
@alitoshmatov 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
mvtglobally commentedon Jan 4, 2026
Issue not reproducible during KI retests. (First week)
arosiclair commentedon Jan 5, 2026
This is not reproducible anymore in v9.2.93-1