Skip to content
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

[HOLD for payment 2024-04-05] [$125] App crashes when click on Category while creating Money request #36622

Closed
1 of 6 tasks
m-natarajan opened this issue Feb 15, 2024 · 63 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff

Comments

@m-natarajan
Copy link

m-natarajan commented Feb 15, 2024

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: 1.4.42-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:
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:

Action Performed:

Precondition:
User is an employee of Collect workspace on Old Dot

Steps:

  1. As Admin navigate to Old Dot> Add new category (&)> Disable category (&)> Disable "People must categorize expenses"
  2. As Employee Sign out and login again
  3. As employee Navigate to chat> +> Money request> Manual> Add Amount> Next> Click on Category

Expected Result:

Employee should be able to navigate to Category and select item

Actual Result:

App crashes when click on Category while creating Money request

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6381048_1708022955985.Gravar__2318.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c8a1b900f7b1723d
  • Upwork Job ID: 1758203550933430272
  • Last Price Increase: 2024-03-06
@m-natarajan m-natarajan added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 15, 2024
Copy link

melvin-bot bot commented Feb 15, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01c8a1b900f7b1723d

@melvin-bot melvin-bot bot changed the title App crashes when click on Category while creating Money request [$500] App crashes when click on Category while creating Money request Feb 15, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 15, 2024
Copy link

melvin-bot bot commented Feb 15, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov (External)

Copy link

melvin-bot bot commented Feb 15, 2024

Triggered auto assignment to @joekaufmanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@m-natarajan
Copy link
Author

We (applause) think this might be related to #wave6-collect-submitters
cc @greg-schroeder

@FitseTLT
Copy link
Contributor

FitseTLT commented Feb 15, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

App crashes when click on Category while creating Money request

What is the root cause of that problem?

We are trying to access enabled prop of undefined here

enabled: categories[name].enabled ?? false,
};

For category of & the name is html encoded ampersand while the category key is &
Screenshot 2024-03-01 at 6 35 47 in the evening

What changes do you think we should make in order to solve the problem?

As I have seen it with repeated testing the categories list the BE returns is unreliable in terms of html encoding and decoding we can add nullish checker to make it equivalent to the state of the code before the TS migration #32470 to avoid this edge case crash

     enabled: categories[name]?.enabled ?? false, 

What alternative solutions did you explore? (Optional)

@DylanDylann
Copy link
Contributor

Can't reproduce now although I can reproduce 30 minutes ago

@joekaufmanexpensify
Copy link
Contributor

Not reproducible for me either.

@joekaufmanexpensify
Copy link
Contributor

Closing as this isn't consistently reproducible!

@MonilBhavsar
Copy link
Contributor

MonilBhavsar commented Feb 16, 2024

Coming from @FitseTLT's comment here #36473 (comment)
We're aware of this issue and have discussed internally https://expensify.slack.com/archives/C03TQ48KC/p1707467669800489
We decided to do nothing for decoding names on newDot that are transferred from oldDot, but if App is crashing, I think we should look into it and handle the condition gracefully.
Theoretically I believe the code could crash as mentioned in the proposal above

Can we retest with this reproduction steps and a specific category?

Precondition:
User is an employee of Collect workspace on Old Dot

Steps:

  1. As Admin navigate to Old Dot> Add new category - Travel & Airfare > Disable category Travel & Airfare > Disable "People must categorize expenses"
  2. As Employee Sign out and login again
  3. As employee Navigate to chat> +> Money request> Manual> Add Amount> Next> Click on Category

@FitseTLT can you please add detailed proposal with example - like what is the structure of category object at that time in code and reason for crash. And also there are many occurrences in CategoryPicker component and OptionsList where we access properties(name and enabled) of category object. So combining all such crash inducing occurrences and fixing it once would be great. We fixed one crash here #36157

@MonilBhavsar MonilBhavsar reopened this Feb 16, 2024
@MonilBhavsar MonilBhavsar self-assigned this Feb 16, 2024
@MonilBhavsar MonilBhavsar added the Needs Reproduction Reproducible steps needed label Feb 16, 2024
@joekaufmanexpensify
Copy link
Contributor

Sure, I'll try and reproduce with those steps today.

@joekaufmanexpensify
Copy link
Contributor

@MonilBhavsar I just tried to reproduce with the steps you listed above, and it worked fine for me. No crash or issues.

@melvin-bot melvin-bot bot added the Overdue label Feb 19, 2024
@MonilBhavsar
Copy link
Contributor

Thanks Joe for taking another look!
@FitseTLT since you have proposal and root cause can you counter reproduce the issue and if yes, can you please mention reproduction steps. We can then reopen the issue and take it further.

@FitseTLT
Copy link
Contributor

FitseTLT commented Mar 1, 2024

@MonilBhavsar @joekaufmanexpensify Today I had time to check it and it is still reproducible (I easily reproduced it three times in a row using steps in the vid); here is a video that shows it. Basically as U can see from the Vid the step is same as the OP except may be before disabling "People must categorize expenses" I open the category page it works and I disable it and get back then it crashes with same root cause as in my proposal

Untitled.Project2.mp4

@MonilBhavsar
Copy link
Contributor

Can you please mention reproduction steps in order and include a category name, if any specific category name caused the crash?

@FitseTLT
Copy link
Contributor

FitseTLT commented Mar 4, 2024

Precondition :

  • User is an employee of Collect workspace on Old Dot
  • "People must categorize expenses" is enabled
  1. create a category with the text & in OD and disable the category
  2. In ND as the employee come and sign out and sign in
  3. On the workspace chat FAB -> Request -> enter amount -> Select category
  4. close the request modal
  5. As admin now disable in OD "People must categorize expenses"
  6. As Employee Now in ND refresh the page and On the workspace chat FAB -> Request -> enter amount -> Select category
  7. It will crash

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Mar 29, 2024
@melvin-bot melvin-bot bot changed the title [$125] App crashes when click on Category while creating Money request [HOLD for payment 2024-04-05] [$125] App crashes when click on Category while creating Money request Mar 29, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 29, 2024
Copy link

melvin-bot bot commented Mar 29, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Mar 29, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.57-5 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 2024-04-05. 🎊

For reference, here are some details about the assignees on this issue:

  • @FitseTLT requires payment (Needs manual offer from BZ)
  • @alitoshmatov requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Mar 29, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

@joekaufmanexpensify
Copy link
Contributor

@alitoshmatov could you please handle checklist so we can prep to issue payment?

@joekaufmanexpensify
Copy link
Contributor

bump @alitoshmatov for when you have a sec

@alitoshmatov
Copy link
Contributor

Copy link

melvin-bot bot commented Apr 5, 2024

Payment Summary

Upwork Job

BugZero Checklist (@joekaufmanexpensify)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1758203550933430272/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@joekaufmanexpensify joekaufmanexpensify added Daily KSv2 and removed Weekly KSv2 labels Apr 8, 2024
@melvin-bot melvin-bot bot added the Overdue label Apr 8, 2024
@joekaufmanexpensify
Copy link
Contributor

Great. All set to issue payment!

@melvin-bot melvin-bot bot removed the Overdue label Apr 8, 2024
@joekaufmanexpensify
Copy link
Contributor

Old upwork job had closed, so opened new one: https://www.upwork.com/jobs/~01b6e231738f508b43

@joekaufmanexpensify
Copy link
Contributor

@alitoshmatov offer sent for $125!

@joekaufmanexpensify
Copy link
Contributor

@FitseTLT offer sent for $125!

@alitoshmatov
Copy link
Contributor

Accepted

1 similar comment
@FitseTLT
Copy link
Contributor

FitseTLT commented Apr 8, 2024

Accepted

@joekaufmanexpensify
Copy link
Contributor

@alitoshmatov $125 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

@FitseTLT $125 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

upwork job closed.

@joekaufmanexpensify
Copy link
Contributor

All set. Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff
Projects
No open projects
Archived in project
Development

No branches or pull requests

7 participants