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-01-17] [HOLD for payment 2023-12-15] [$500] Bank account - Fields with emojis are not turned red and general error message is shown #31385

Closed
5 of 6 tasks
izarutskaya opened this issue Nov 15, 2023 · 47 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@izarutskaya
Copy link

izarutskaya commented Nov 15, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Issue found when executing PR: #31259
Version Number: 1.3.99-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:

  1. Open the app
  2. Navigate to Workspace > Bank account > Connect manually
  3. Enter routing and account number
  4. Enter emojis in Legal name, address and city fields
  5. Fill out the rest with test data and tap "Continue"

Expected Result:

The fields with emojis are highlighted in red and the error message to enter valid info is displayed

Actual Result:

The general error message "Auth SetupWithdrawalAccount returned an error" is displayed, and the fields are not turned red.

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

Bug6277839_1700065315673.video_2023-11-15_10-41-07.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01087f0962c58f5f4a
  • Upwork Job ID: 1724828495604215808
  • Last Price Increase: 2023-11-15
  • Automatic offers:
    • tienifr | Contributor | 27782542
@izarutskaya izarutskaya 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 Nov 15, 2023
@melvin-bot melvin-bot bot changed the title Bank account - Fields with emojis are not turned red and general error message is shown [$500] Bank account - Fields with emojis are not turned red and general error message is shown Nov 15, 2023
Copy link

melvin-bot bot commented Nov 15, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01087f0962c58f5f4a

Copy link

melvin-bot bot commented Nov 15, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 15, 2023
Copy link

melvin-bot bot commented Nov 15, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Nov 15, 2023

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

@tienifr
Copy link
Contributor

tienifr commented Nov 15, 2023

Proposal

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

Bank account - Fields with emojis are not turned red and general error message is shown

What is the root cause of that problem?

We did not verify if the value contains emoji to show the error

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

We should use CONST.REGEX.EMOJIS (or extractEmojis function) to check if the text contain emoji, if yes, render the error

text.match(CONST.REGEX.EMOJIS);

then add this check here and other places if needed

Detail implementation:

To validate companyName and addressCity:

 if (values.companyName && !ValidationUtils.isValidLegalName(values.companyName)) {
            errors.companyName = 'bankAccount.error.companyName';
        }

if (values.addressCity && !ValidationUtils.isValidLegalName(values.addressCity)) {
            errors.addressCity = 'bankAccount.error.addressCity';
        }

To validate addressStreet, we already have function isValidAddress, we can change this line

to

if (!isValidLegalName(value)) {

What alternative solutions did you explore? (Optional)

Instead of just limiting emojis, we can restrict user input to only allow specific character ranges (we may use the same regex from BE side)

@parasharrajat
Copy link
Member

We can use ValidationUtils.isValidLegalName for these fields but the overall idea is correct. The address field requires more changes. But the idea is correct.

let's go with @tienifr's proposal.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Nov 15, 2023

Triggered auto assignment to @grgia, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@parasharrajat
Copy link
Member

@tienifr Please update your proposal to contain more details on how will you update Addressfield etc.

@situchan
Copy link
Contributor

@yakupafsin
Copy link
Contributor

yakupafsin commented Nov 15, 2023

@situchan

This issue is related to numeric inputs accepting various types of characters, such as letters or Unicode.

@tienifr
Copy link
Contributor

tienifr commented Nov 16, 2023

@parasharrajat I added the detail implementation in my proposal #31385 (comment).

Here's the result

Screenshot 2023-11-16 at 10 24 33

About the company address street we show the error Please enter a valid street address that is not a PO box (The one we already define).It's quite confusing for users IMO, should we show sth like Please enter a valid legal street address that is not a PO box?

@parasharrajat
Copy link
Member

parasharrajat commented Nov 16, 2023

There is nothing illegal about street addresses so that sounds fine to me. We can get this confirmed.

About the company address street we show the error Please enter a valid street address that is not a PO box (The one we already define). It's quite confusing for users IMO, should we show sth like Please enter a valid legal street address that is not a PO box?

cc: @grgia

@aldo-expensify
Copy link
Contributor

Just passing some information in case it is useful:

I noticed that this doesn't happen only with emojis, it also happens if you use Cyrillic letters. The address is "sanitized" by the backend and converted to ascii, but in a poor way, so Гвгв or an emoji is converted to '' and then it causes a crash.

@melvin-bot melvin-bot bot added the Overdue label Nov 20, 2023
@grgia
Copy link
Contributor

grgia commented Nov 20, 2023

About the company address street we show the error Please enter a valid street address that is not a PO box (The one we already define). It's quite confusing for users IMO, should we show sth like Please enter a valid legal street address that is not a PO box?

@parasharrajat @tienifr Personally, I think we can leave the error messages as is for this

@melvin-bot melvin-bot bot removed the Overdue label Nov 20, 2023
@tienifr
Copy link
Contributor

tienifr commented Nov 22, 2023

@grgia Thanks for your comment. Do you agree with my solution?

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 22, 2023
Copy link

melvin-bot bot commented Nov 22, 2023

📣 @parasharrajat Please request via NewDot manual requests for the Reviewer role ($500)

Copy link

melvin-bot bot commented Nov 22, 2023

📣 @tienifr 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@grgia
Copy link
Contributor

grgia commented Nov 22, 2023

Yep all yours @tienifr ! Thank you

@parasharrajat
Copy link
Member

@tienifr Bump.

@melvin-bot melvin-bot bot removed the Overdue label Dec 27, 2023
@tienifr
Copy link
Contributor

tienifr commented Dec 27, 2023

I'm working on it, will raise the PR soon

@parasharrajat
Copy link
Member

Any news @tienifr

@melvin-bot melvin-bot bot added the Overdue label Jan 1, 2024
Copy link

melvin-bot bot commented Jan 1, 2024

@garrettmknight, @parasharrajat, @grgia, @tienifr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@parasharrajat
Copy link
Member

Bump @tienifr

@melvin-bot melvin-bot bot removed the Overdue label Jan 2, 2024
@tienifr
Copy link
Contributor

tienifr commented Jan 2, 2024

I'm working on the draft PR. Will raise in the next hour.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jan 3, 2024
@tienifr
Copy link
Contributor

tienifr commented Jan 3, 2024

Fix PR is up: #33865.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jan 10, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-12-15] [$500] Bank account - Fields with emojis are not turned red and general error message is shown [HOLD for payment 2024-01-17] [HOLD for payment 2023-12-15] [$500] Bank account - Fields with emojis are not turned red and general error message is shown Jan 10, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 10, 2024
Copy link

melvin-bot bot commented Jan 10, 2024

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

Copy link

melvin-bot bot commented Jan 10, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.23-4 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-01-17. 🎊

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

Copy link

melvin-bot bot commented Jan 10, 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:

  • [@parasharrajat] The PR that introduced the bug has been identified. Link to the PR:
  • [@parasharrajat] 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:
  • [@parasharrajat] A discussion in #expensify-bugs 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:
  • [@parasharrajat] Determine if we should create a regression test for this bug.
  • [@parasharrajat] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@garrettmknight] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@parasharrajat
Copy link
Member

For clarity, @tienifr has been paid already for this task.

Previous summary #31385 (comment).

@garrettmknight
Copy link
Contributor

Thanks for the reminder, request payment on the 17th!

@garrettmknight
Copy link
Contributor

Summary of payments is above: #31385 (comment)

@parasharrajat when you're ready, request payment!

@parasharrajat
Copy link
Member

@garrettmknight Feel free to close it, I will request it later.

@parasharrajat
Copy link
Member

Payment requested as per #31385 (comment)

@JmillsExpensify
Copy link

$500 approved for @parasharrajat based on this summary.

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

9 participants