Skip to content

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

Closed

Description

@izarutskaya

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

Activity

  1. added
    External
    Daily
    Bug
    on Oct 4, 2023
  2. 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[/+] on Oct 4, 2023
  3. melvin-bot commented on Oct 4, 2023

    @melvin-bot
  4. melvin-bot commented on Oct 4, 2023

    @melvin-bot

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

  5. added
    Help Wanted
    on Oct 4, 2023
  6. melvin-bot commented on Oct 4, 2023

    @melvin-bot

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

    @melvin-bot

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

  8. izarutskaya commented on Oct 4, 2023

    @izarutskaya
    Author

    Found when validating PR #27257

  9. pradeepmdk commented on Oct 4, 2023

    @pradeepmdk
    Contributor

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

  10. soro-kuraima commented on Oct 4, 2023

    @soro-kuraima

    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.

  11. melvin-bot commented on Oct 10, 2023

    @melvin-bot

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

  12. zanyrenney commented on Oct 10, 2023

    @zanyrenney
    Contributor

    Closing based on #28805 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugDailyExternalHelp Wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions