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
Reports - App crashes after triggering an invalid "Type:" search on "Reports". #65165
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Please re-state the problem that we are trying to solve in this issue.
After triggering an invalid "type:" search on "Reports", app crashes.
What is the root cause of that problem?
With an invalid search type, the app crashes because we don't have the translation here. The bug can't be reproduced in production because we don't intentionally cause the app to crash with a 'not found' translation in production.
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.
Suggested Search: Unapproved accruals #64670: Massive refactor of search (SearchList, EmptySearchView, SearchQueryUtils, etc.) altering how results and empty states are handled, so an invalid Type search crashing is a likely regression from these changes.
Search: Added Card to GROUP_BY #64911: Extends search grouping logic in SearchUIUtils and TransactionGroupListItem which can affect result processing when filters return no data, potentially causing the crash on an invalid Type query.
Exploratory PRs
Search: use SearchDatePresetFilterBase instead of SearchDateFilterBase #64860: This PR replaces core search filter components used in Reports with a new SearchDatePresetFilterBase, altering the Reports search flow; the updated imports may mishandle queries that return no results, causing the crash on an invalid "type:" search.
@s77rt That PR was deployed to prod, and this issue isnt reproducible on prod. I do agree that directly getting the translation based on type is the issue, but somewhere we probably removed checks that made sure type is valid before setting it
@JS00001 The app doesn't crashes in production as I explained here
The bug can't be reproduced in production because we don't intentionally cause the app to crash with a 'not found' translation in production.
Activity
melvin-bot commentedon Jun 30, 2025
Triggered auto assignment to @strepanier03 (
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.melvin-bot commentedon Jun 30, 2025
Triggered auto assignment to @stitesExpensify (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Jun 30, 2025
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
melvin-bot commentedon Jun 30, 2025
💬 A slack conversation has been started in #expensify-open-source
mkzie2 commentedon Jun 30, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
After triggering an invalid "type:" search on "Reports", app crashes.
What is the root cause of that problem?
With an invalid search type, the app crashes because we don't have the translation here. The bug can't be reproduced in production because we don't intentionally cause the app to crash with a 'not found' translation in production.
App/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx
Line 234 in 7558a80
What changes do you think we should make in order to solve the problem?
We shouldn't render the filter bar if the type/group-by is invalid because the backend will return the error with invalid type/group-by
App/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx
Line 234 in 7558a80
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
We can check if the type/group-by is invalid; we will not translate the type/group-by
App/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx
Line 234 in 7558a80
App/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx
Line 243 in 7558a80
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.
BlameGPT commentedon Jun 30, 2025
Possible culprit PRs for this issue
Cardto GROUP_BY #64911: Extends search grouping logic in SearchUIUtils and TransactionGroupListItem which can affect result processing when filters return no data, potentially causing the crash on an invalid Type query.Exploratory PRs
SearchDatePresetFilterBase, altering the Reports search flow; the updated imports may mishandle queries that return no results, causing the crash on an invalid "type:" search.rushatgabhane commentedon Jun 30, 2025
@s77rt @ikevin127 is it possible #64911 caused this?
5 remaining items
rushatgabhane commentedon Jun 30, 2025
oh yeah its in prod, makes sense
s77rt commentedon Jun 30, 2025
Just checked again, on production it does not crash because we have a fail safe guard in case a language translation path does not exist
App/src/libs/Localize/index.ts
Lines 122 to 131 in 19dbed9
However another crash happens because in
isFilterSupportedthe passedtypeis not a valid typeApp/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx
Line 266 in 19dbed9
s77rt commentedon Jun 30, 2025
So effectively this is a regression from #64670
s77rt commentedon Jun 30, 2025
On DEV:
On Staging:
mkzie2 commentedon Jun 30, 2025
@JS00001 The app doesn't crashes in production as I explained here
s77rt commentedon Jun 30, 2025
@mkzie2 The not found view is only displayed when online, while offline the search filters bar will be rendered
s77rt commentedon Jun 30, 2025
#65189
JS00001 commentedon Jun 30, 2025
Merged, not a deploy blocker though because we prevent the error on prod
JS00001 commentedon Jun 30, 2025
CPd to staging, and confirmed issue no longer exists. Closing since this was a regression so no payment needed