Repository navigation
Description
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: V9.1.16-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): Slottwo1 fear3@gmail.com
Issue reported by: Applause Internal Team
Device used: Redminote 10s android 13 phone
App Component: Workspace Settings
Action Performed:
- Launch app
- Go to workspace settings > more features > enable tags
- Tap tags > add tag
- Paste the text - cjwhwh😙😥🥺😄🥰
☺️ 🥲☺️ jj😆🥲😆🥰😆🥰😆🥲kjjjhOgifjxhdzgzgzgngmgngmggmzmkggkkgKgYkysudjcxiixxuids7us&h,hztUratsyhxxhuzsusu7s6ssuuzys6a5a5aittayszh6s6ww67shszuyswuyw7sxuduuduxxiciixifjdvjrvnejej jw jsj js jwh hwcjwhwh😙😥🥺😄🥰☺️ 🥲☺️ 🥲🥲👋🥰😆🥲😆🥰😆🥰😆🥲 - Save the tag
Expected Result:
- Ideally, the error message should be as informative as the one throwing (
[<redacted because it's massive> is invalid. Please don't use any special characters.) - When dismissing an error message for the tag upload failure, the tag value should disappear.
Bonus: The regex in Web-E says we do support special characters, so perhaps a specific emoji is causing the issue and we can catch it as touched on here.
Actual Result:
- The error message doesn't match the one that throws (
An error occurred while updating the tag, please try again.) - The tag value doesn't disappear when dismissing the error message.
- An error occurs for this specific tag value, though we do support special characters in tag values it seems.
Investigated a bit in this comment thread if it's helpful.
Workaround:
Unknown
Platforms:
- Android: Standalone
- Android: HybridApp
- Android: mWeb Chrome
- iOS: Standalone
- iOS: HybridApp
- iOS: mWeb Safari
- MacOS: Chrome / Safari
- MacOS: Desktop
Screenshots/Videos
2025-03-21_00-05-46.mp4
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021902874693859961671
- Upwork Job ID: 1902874693859961671
- Last Price Increase: 2025-03-21
Issue Owner
Current Issue Owner: @trjExpensifyMetadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
melvin-bot commentedon Mar 20, 2025
Triggered auto assignment to @trjExpensify (
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.trjExpensify commentedon Mar 20, 2025
Kinda' ridiculous tag that haha. Couple of things though:
The error throws here.
The regex being:
With these possible fixes:
In terms of next steps then:
[-]Tags - While adding specific tag, error occured while updating the tag is displayed.[/-][+][$250] Tags - While adding specific tag, error occured while updating the tag is displayed.[/+]melvin-bot commentedon Mar 21, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021902874693859961671
melvin-bot commentedon Mar 21, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (
External)bernhardoj commentedon Mar 21, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-03-21 03:31:04 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
The informative error from the BE isn't shown and after dismissing the error, the tag isn't removed.
What is the root cause of that problem?
If we see the API response, the BE returns the error already, but it assigns the error to
policyTags_collection which is wrong. It should assign it topolicyTags_{workspaceID}. Because of that, the generic error that is set on the FE is shown.For the 2nd issue, the tag should be removed when clearing the error when the pending action is add.
App/src/libs/actions/Policy/Tag.ts
Lines 414 to 430 in 32e8f6d
However, we clear the pending action when the request fails.
App/src/libs/actions/Policy/Tag.ts
Lines 203 to 213 in 32e8f6d
What changes do you think we should make in order to solve the problem?
The 1st issue should be fixed on the BE. For the 2nd issue, we shouldn't clear the pending action when fails.
For the error itself, most likely it happens because of the exceeded character length. To improve the validation, we can calculate the length using text encoder.
If we apply this, then we won't be able to trigger the error anymore.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We can create a test for createPolicyTag, make it fails and assert that the pending action is still there (add).
bernhardoj commentedon Mar 21, 2025
Looks like the error is all about exceeding the maximum length. Using this https://mothereff.in/byte-counter, we can see the (bytes) length of the tag. If we input
then it's fine because it's 256 long. But if we add another character (so it's 257 long), then it will give an error.
28 remaining items
melvin-bot commentedon Apr 1, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Apr 1, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.21-3 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-04-08. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Apr 1, 2025
@s77rt @trjExpensify @s77rt 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]
s77rt commentedon Apr 7, 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: Add a switch for requiring tags on the multi level tags RHP #42972 (comment)
[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: n/a
[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.
Bug requires regression test: Yes
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Tags:
cjwhwh😙😥🥺😄🥰☺️🥲☺️jj😆🥲😆🥰😆🥰😆🥲kjjjhOgifjxhdzgzgzgngmgngmggmzmkggkkgKgYkysudjcxiixxuids7us&h,hztUratsyhxxhuzsusu7s6ssuuzys6a5a5aittayszh6s6ww67shszuyswuyw7sxuduuduxxiciixifjdvjrvnejej jw jsj js jwh hwcjwhwh😙😥🥺😄🥰☺️🥲☺️🥲🥲👋🥰😆🥲😆🥰😆🥰😆🥲Categories
cjwhwh😙😥🥺😄🥰☺️🥲☺️jj😆🥲😆🥰😆🥰😆🥲kjjjhOgifjxhdzgzgzgngmgngmggmzmkggkkgKgYkysudjcxiixxuids7us&h,hztUratsyhxxhuzsusu7s6ssuuzys6a5a5aittayszh6s6ww67shszuyswuyw7sxuduuduxxiciixifjdvjrvnejej jw jsj js jwh hwcjwhwh😙😥🥺😄🥰☺️🥲☺️🥲🥲👋🥰😆🥲😆🥰😆🥰😆🥲Do we agree 👍 or 👎
melvin-bot commentedon Apr 8, 2025
Payment Summary
Upwork Job
BugZero Checklist (@trjExpensify)
trjExpensify commentedon Apr 15, 2025
Hey, sorry for the delay. I've been OoO.
Payment summary as follows:
Go ahead and request! Closing!
JmillsExpensify commentedon Apr 15, 2025
$250 approved for @s77rt
bernhardoj commentedon Apr 15, 2025
Requested in ND.
JmillsExpensify commentedon Apr 22, 2025
$250 approved for @bernhardoj