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
[Due for payment 2025-09-26] [$250] Expense - App crashes when submitting expense in Reports > Submit offline #69984
Version Number: 9.2.2-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:#69355 Email or phone of affected tester (no customers):sdjoisnjsosjo@gmail.com Issue reported by: Applause - Internal Team
Action Performed:
Go to staging.new.expensify.com
Log in with a new account
Create a workspace
Go to Reports > Submit
Go offline
Click Create report
Click + > Create expense > Manual
Create a manual expense
Expected Result:
App will not crash
Actual Result:
App crashes
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome / Safari
MacOS: Desktop
Platforms Tested:
On which of our officially supported platforms was this issue tested:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome / Safari
MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidenceBug6936456_1757101500703.Screen_Recording_2025-09-06_at_03.39.20.mp4
changed the title [-]Expense - App crashes when submitting expense in Reports > Submit offline[/-][+][$250] Expense - App crashes when submitting expense in Reports > Submit offline[/+]on Sep 5, 2025
Please re-state the problem that we are trying to solve in this issue.
When a user goes offline and creates a manual expense from Reports → Submit → Create report → + → Create expense → Manual, the app crashes. This occurs reliably after switching to offline mode and saving the expense.
What is the root cause of that problem?
While offline, some ReportAction items do not have a stable reportActionID.
ReportActionsList’s keyExtractor was using reportActionID for every item. When this key is missing/unstable then React treats list items as new elements, remounts them, and repeatedly triggers layout/scroll effects. In an InvertedFlatList, this causes auto-scroll and boundary loaders to re-fire, producing a render → layout → scroll → data change loop that ends in Maximum update depth exceeded.
What changes do you think we should make in order to solve the problem?
Adopt a memoized key extractor that is aware of offline mode:
If the item is the synthetic CREATED row and the app is offline, return a constant, stable key (e.g., "CREATED").
For all other items, continue using reportActionID as the key.
This makes the CREATED item identity stable during offline rendering, preventing unnecessary remounts and breaking the scroll/layout feedback loop that leads to the crash.
Note: This proposal intentionally limits scope to the minimal, targeted fix described above.
/** * Memoized key extractor for FlatList/InvertedFlatList. * - When offline and the synthetic `CREATED` item is present, return a constant key to keep it stable * and avoid remounts that can trigger scroll/layout loops. * - For all other items, use `reportActionID` (expected to be stable and unique). */constkeyExtractor=useCallback((item: OnyxTypes.ReportAction)=>{if(item.actionName===CONST.REPORT.ACTIONS.TYPE.CREATED&&isOffline){returnCONST.REPORT.ACTIONS.TYPE.CREATED;}returnitem.reportActionID;},[isOffline],);
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
--
What alternative solutions did you explore? (Optional)
--
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.
⚠️@thedavos Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).
but don't wrap it inside useMemo so it render too many times, when it changes we will re-render the whole list too many times, and cause the maximum update depth exceeded
What changes do you think we should make in order to solve the problem?
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
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.
changed the title [-][$250] Expense - App crashes when submitting expense in Reports > Submit offline[/-][+][Due for payment 2025-09-26] [$250] Expense - App crashes when submitting expense in Reports > Submit offline[/+]on Sep 19, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.15-15 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@ishpaul777@lschurr The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: app crash is critical, but here its a rare edge case becuase of implementaion now its fixed no need for discussion
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. - no need we have enough QA tests covering Submit expense flow online and offline
Activity
melvin-bot commentedon Sep 5, 2025
Triggered auto assignment to @lschurr (
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.[-]Expense - App crashes when submitting expense in Reports > Submit offline[/-][+][$250] Expense - App crashes when submitting expense in Reports > Submit offline[/+]melvin-bot commentedon Sep 5, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021964063290320656137
melvin-bot commentedon Sep 5, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (
External)thedavos commentedon Sep 6, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user goes offline and creates a manual expense from Reports → Submit → Create report → + → Create expense → Manual, the app crashes. This occurs reliably after switching to offline mode and saving the expense.
What is the root cause of that problem?
While offline, some ReportAction items do not have a stable reportActionID.
ReportActionsList’s keyExtractor was using reportActionID for every item. When this key is missing/unstable then React treats list items as new elements, remounts them, and repeatedly triggers layout/scroll effects. In an InvertedFlatList, this causes auto-scroll and boundary loaders to re-fire, producing a render → layout → scroll → data change loop that ends in Maximum update depth exceeded.
What changes do you think we should make in order to solve the problem?
Adopt a memoized key extractor that is aware of offline mode:
For all other items, continue using reportActionID as the key.
Note: This proposal intentionally limits scope to the minimal, targeted fix described above.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
--
What alternative solutions did you explore? (Optional)
--
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.
github-actions commentedon Sep 6, 2025
thedavos commentedon Sep 6, 2025
Proposal updated to follow proposal template
nkdengineer commentedon Sep 6, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-09-06 03:26:14 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
App crashes
What is the root cause of that problem?
We're getting
App/src/components/MoneyRequestReportView/MoneyRequestReportView.tsx
Line 100 in 34c2f92
but don't wrap it inside useMemo so it render too many times, when it changes we will re-render the whole list too many times, and cause the maximum update depth exceeded
What changes do you think we should make in order to solve the problem?
We should wrap it in the useMemo
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
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 Sep 8, 2025
@ishpaul777 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
13 remaining items
[-][$250] Expense - App crashes when submitting expense in Reports > Submit offline[/-][+][Due for payment 2025-09-26] [$250] Expense - App crashes when submitting expense in Reports > Submit offline[/+]melvin-bot commentedon Sep 19, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Sep 19, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.15-15 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 2025-09-26. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Sep 19, 2025
@ishpaul777 @lschurr The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
ishpaul777 commentedon Sep 25, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] 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/62002/files#r2380422738
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: app crash is critical, but here its a rare edge case becuase of implementaion now its fixed no need for discussion
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. - no need we have enough QA tests covering Submit expense flow online and offline
lschurr commentedon Sep 26, 2025
Payment Summary
Contributor: @nkdengineer paid $250 via Upwork
Contributor+: @ishpaul777 due $250 via NewDot
trjExpensify commentedon Sep 29, 2025
approved $250 for @ishpaul777