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

[$500] PR27257-mWeb-Login-Typing phone number without country code, country code not added &SMSnot received #28805

Closed
3 of 6 tasks
izarutskaya opened this issue Oct 4, 2023 · 9 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@izarutskaya
Copy link

izarutskaya commented Oct 4, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Enter wrong email
  3. Note error message displayed
  4. Enter correct email id
  5. Enter correct magic code and login to site
  6. Tap profile --Log out
  7. Enter a phone number with country code
  8. From received SMS, enter correct magic number and login
  9. Tap profile --Log out
  10. Enter a phone number without country code

Expected Result:

Typing phone number without country code, country code must be added to phone number& sms must be received.

Actual Result:

Typing phone number without country code, country code not added to phone number& sms not received.

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • Windows - 10/ Chrome
  • MacOS / Desktop

Version Number: 1.3.77-3

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

Notes/Photos/Videos: Any additional supporting documentation

Bug6224449_1696410642163.1696400529881_2023-10-04_11-47-13.mp4
Bug6224449_1696410642246.anlogin.mp4
Bug6224449_1696410434005.without_country_mweb.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause-Internal Team

Slack conversation: @

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017eea02da3f18b41e
  • Upwork Job ID: 1709537770602115072
  • Last Price Increase: 2023-10-04
@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 Oct 4, 2023
@melvin-bot melvin-bot bot changed the title PR27257-mWeb-Login-Typing phone number without country code, country code not added &SMSnot received [$500] PR27257-mWeb-Login-Typing phone number without country code, country code not added &SMSnot received Oct 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 2023

Job added to Upwork: https://www.upwork.com/jobs/~017eea02da3f18b41e

@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 2023

Triggered auto assignment to @zanyrenney (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 Oct 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 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

@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 2023

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

@izarutskaya
Copy link
Author

Found when validating PR #27257

@pradeepmdk
Copy link
Contributor

as per this is not a bug https://expensify.slack.com/archives/C049HHMV9SM/p1690373508303109 by default +1 country code added in the background.

@soro-kuraima
Copy link

Does expensify intend to append country codes for the numbers of all countries ?
if the answer is no: then this is not a bug.

the phone number is parsed and the country code +1 is appended to all the numbers.

and on the codeValidate form formatted phone number is displayed.

function formatPhoneNumber(number: string): string {
    if (!number) {
        return '';
    }

    const numberWithoutSMSDomain = Str.removeSMSDomain(number);
    const parsedPhoneNumber = parsePhoneNumber(numberWithoutSMSDomain);

    // return the string untouched if it's not a phone number
    if (!parsedPhoneNumber.valid) {
        if (parsedPhoneNumber.number?.international) {
            return parsedPhoneNumber.number.international;
        }
        return numberWithoutSMSDomain;
    }

    const regionCode = parsedPhoneNumber.countryCode;

    if (regionCode === countryCodeByIP) {
        return parsedPhoneNumber.number.national;
    }

    return parsedPhoneNumber.number.international;
}

since +1 is appended to all the numbers, it returns formatted number without country code.

it happens for all the us numbers. whether you enter country code in input or not.

the screen recording in the bug report is an edge case, where appending +1 to number, results in a valid number on passing to parsePhoneNumber even though it's not a us number.
otherwise international numbers without country code simply fail the validation.

if the intended behaviour is to append country codes to codes of all nations.

@melvin-bot
Copy link

melvin-bot bot commented Oct 10, 2023

@narefyev91, @zanyrenney Huh... This is 4 days overdue. Who can take care of this?

@zanyrenney
Copy link
Contributor

Closing based on #28805 (comment)

@melvin-bot melvin-bot bot removed the Overdue label Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

5 participants