-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expense - The app crashes when the administrator opens the details of a paid expense #47940
Comments
Triggered auto assignment to @Christinadobrzyn ( |
@Christinadobrzyn FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
We think that this bug might be related to #wave-collect - Release 1 |
Edited by proposal-police: This proposal was edited at 2024-08-23 18:52:49 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.The app crashes when the administrator opens the details of a paid expense What is the root cause of that problem?The root cause is here we are falling back an empty string for App/src/components/ReportActionItem/MoneyRequestView.tsx Lines 692 to 693 in 6488908
Then policyTagsList will have array elements which are not objects with tag prop so here we call hasEnabledTags App/src/components/ReportActionItem/MoneyRequestView.tsx Lines 219 to 220 in 6488908
hasEnabledTags expects all array elements to be in that structure so calls Object.value on tag prop of the array which doesn't exist hereApp/src/libs/OptionsListUtils.ts Line 1317 in 6488908
So TypeError Cannot Conver null or undefined to object occurs and the app crashes
What changes do you think we should me in order to solve the problem?Fallback should be something like -1
We should similarly replace all other empty string fallbacks in other places too What alternative solutions did you explore? (Optional) |
I'm curious why the fallback values in this file are set to empty strings. App/src/components/ReportActionItem/MoneyRequestView.tsx Lines 687 to 698 in 9f34483
This change was introduced in this PR, so I'm tagging @kubabutkiewicz and @parasharrajat since they worked on it. Was this change intentional? |
@abzokhattab Probably a mistake. Default is -1 but it expects a string so mistakenly we left '' string instead. |
Thanks for clarifying, I thought there is a reason behind it, that's why I asked to avoid breaking intended functionalities. |
Dupe of #47542 |
Awesome, thanks @bernhardoj - closing as a dupe. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.24-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: https://expensify.testrail.io/index.php?/tests/view/4888153
Email or phone of affected tester (no customers): sustinov@applausemail.com
Issue reported by: Applause - Internal Team
Action Performed:
Create a new HT administrator account, create a new WS and invite a new HT employee account. For convenience, it is better to perform the steps in two tabs opened simultaneously.
Step:
Expected Result:
The details of the paid expense should be opened by the adminstrator without crashing the application
Actual Result:
The app crashes when the administrator opens the details of a paid expense
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6580538_1724435181382.Recording__117__2_.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: