-
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
[HOLD for payment 2024-07-22] [$250] Tag - App crashes when saving 0 as custom tag name #43773
Comments
Triggered auto assignment to @slafortune ( |
@slafortune 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 |
ProposalPlease re-state the problem that we are trying to solve in this issue.App crash when trying to save tag name as 0. What is the root cause of that problem?When we save the tag name as 0, the BE responds with an invalid error. If it fails, we set an errors object to the policy tag list collection. App/src/libs/actions/Policy/Tag.ts Lines 557 to 563 in f0b6355
So, it becomes:
Then, it crashes in this line of code
The code gets the values of the object and then extracts the What changes do you think we should make in order to solve the problem?If we see the offline with feedback here, App/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx Lines 76 to 78 in f0b6355
we can see that the component expects the error property to be added inside the tag object, just like what we did with the pendingAction. App/src/libs/actions/Policy/Tag.ts Line 538 in f0b6355
So, we need to update the failure data to
Last thing we need to do is to clear the error when pressing the offline with feedback close (X) button. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Naming or renaming policy tag list setting with name as '0' crashes the app with failure. What is the root cause of that problem?Error in console.
App calls backend API
While processing the response after converting
Code expects property What changes do you think we should make in order to solve the problem?Assuming that we always get a successful response is incorrect. Frontend code must be able to handle error responses in a graceful way. Suggest following approaches for this
What alternative solutions did you explore? (Optional)Backend to return |
Job added to Upwork: https://www.upwork.com/jobs/~01aa311cffaf18adc9 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ZhenjaHorbach ( |
Thanks everyone for proposals ! I agree with @bernhardoj proposal Given that we already have an error handler for And we don't need to pass errors separately from tag object since it looks like unexpected behavior (Actually it's only place where we pass errors separately from tag object for ONYXKEYS.COLLECTION.POLICY_TAGS ) App/src/libs/actions/Policy/Tag.ts Lines 557 to 564 in f0b6355
🎀👀🎀 C+ reviewed |
Triggered auto assignment to @danieldoglas, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Interesting, checking this on our side before assigning - I'm not sure if we should allow 0 as a tag name. |
We should allow 0 on our side. I'm working on a fix for that. |
@danieldoglas I think we can fix the FE first to handle the errors properly, then fix the BE to allow 0, otherwise, the app will crash again every time there is an edit tag error. What do you think? |
Agree |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@danieldoglas / @ZhenjaHorbach : is someone working on this on FE? Or can we consider this proposal? |
@kpadmanabhan We are not doing FE part yet But I still think the right thing to do is fix |
@ZhenjaHorbach : I agree completely on this. |
I agree we need to fix the front end to deal with this as well. |
📣 @ZhenjaHorbach 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
PR is ready cc: @ZhenjaHorbach |
Backend changes implemented, waiting to be merged/deployed |
This is kind of done? @slafortune not sure why it didn't create the comments, the app part it's already in production! |
Thanks for the heads up @danieldoglas - so are we just in the 7 day holding period for regressions? Which would be 7/17 |
Crash is related to this PR where we try to get
https://github.com/Expensify/App/pull/42004/files#r1681339465
NA
I'm not sure we need a test for this bug
But just in case I added test steps Regression Test Proposal
Do we agree 👍 or 👎 ? |
@slafortune yes, the payment should be due today (7/17). I have requested the payment in ND. |
@ZhenjaHorbach - C+ Role - has been paid $250 via UpWorks |
$250 approved for @bernhardoj |
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.83-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/4631162
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
App will not crash
Actual Result:
App crashes when saving 0 as custom tag name
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6512905_1718353988266.bandicam_2024-06-14_16-29-17-888.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @danieldoglasThe text was updated successfully, but these errors were encountered: