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-10-25] [$250] Join button appears unresponsive when signing up on mWeb with an invalid phone number #49696

Closed
2 of 6 tasks
m-natarajan opened this issue Sep 25, 2024 · 36 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Internal Requires API changes or must be handled by Expensify staff

Comments

@m-natarajan
Copy link

m-natarajan commented Sep 25, 2024

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: 9.0.40-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: @stephanieelliott
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1727245288440149

Action Performed:

  1. Go to staging.new.expensify.com
  2. Enter a phone number not already associated with an account and press Continue
  3. Click Join

Expected Result:

Join button should be responsive

Actual Result:

Join button reacts but does remains on the page and does not log into staging.new.expensify.com

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

RPReplay_Final1727244491.MP4
RPReplay_Final1727263828.MP4

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021843414879571472142
  • Upwork Job ID: 1843414879571472142
  • Last Price Increase: 2024-10-07
  • Automatic offers:
    • dukenv0307 | Reviewer | 104343136
    • truph01 | Contributor | 104343141
Issue OwnerCurrent Issue Owner: @VictoriaExpensify
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 25, 2024
Copy link

melvin-bot bot commented Sep 25, 2024

Triggered auto assignment to @VictoriaExpensify (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.

@nyomanjyotisa
Copy link
Contributor

Proposal

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

When register using VoIP phone number nothing happen

What is the root cause of that problem?

the SignUpUser API call not success due to "The provided phone number belongs to a landline or VoIP, please use your email address instead."

image

And the error message not displayed on the screen

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

Show error message if SignUpUser API call not success

update this code to the following

API.makeRequestWithSideEffects(SIDE_EFFECT_REQUEST_COMMANDS.SIGN_UP_USER, params, {optimisticData, successData, failureData}).then((response) => {
        if (!response) {
            return;
        }

        if (response.jsonCode === 200) {
            return;
        }

        Onyx.merge(ONYXKEYS.ACCOUNT, {errors: ErrorUtils.getMicroSecondOnyxErrorWithMessage(response.message)});
    });

Show the error message here

    const [accountOnyxData] = useOnyx(ONYXKEYS.ACCOUNT);
    const signUpErrors = accountOnyxData?.errors;
    const signUpErrorMessage = !isEmptyObject(signUpErrors) ? (Object.values(signUpErrors)[0] as string) : '';
    ...
    <Text style={[styles.formError, styles.mh5]}>{signUpErrorMessage}</Text>

What alternative solutions did you explore? (Optional)

@truph01
Copy link
Contributor

truph01 commented Sep 25, 2024

Proposal

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

  • Join button reacts but does remains on the page and does not log into staging.new.expensify.com

What is the root cause of that problem?

  • After clicking on "Join", we call SignUpUser API. If encountered any error, BE returns:
{
    "code": 666,
    "jsonCode": 666,
    "type": "Expensify\\Libs\\Error\\ExpError",
    "message": "The provided phone number belongs to a landline or VoIP, please use your email address instead.",
}
  • We just return the raw message, so FE cannot handle it and display the error message.

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

  • BE should return the data such as:
{
    "code": 666,
    "jsonCode": 666,
    "type": "Expensify\\Libs\\Error\\ExpError",
    "message": "The provided phone number belongs to a landline or VoIP, please use your email address instead.",
    "onyxData": [
        {
            "onyxMethod": "merge",
            "key": "account",
            "value": {
                "errors": {
                    "error": "The provided phone number belongs to a landline or VoIP, please use your email address instead."
                }
            }
        }
    ]
}

  • And then, we will display that message in this:
                {serverErrorText && (
                    <FormHelpMessage
                        isError
                        message={serverErrorText}
                    />
                )}

with:

    const [account] = useOnyx(ONYXKEYS.ACCOUNT)
    const serverErrorText = useMemo(() => (account ? ErrorUtils.getLatestErrorMessage(account) : ''), [account]);
  • All the styles can be improved in PR. This proposal just shares the main idea.

What alternative solutions did you explore? (Optional)

  • Instead of returning the error data under the account key, we can return it under the credentials key.

@melvin-bot melvin-bot bot added the Overdue label Sep 27, 2024
@VictoriaExpensify
Copy link
Contributor

I need to get someone with an iPhone to recreate this issue; everyone is offline now so I'll do this tomorrow

@melvin-bot melvin-bot bot removed the Overdue label Sep 30, 2024
@truph01
Copy link
Contributor

truph01 commented Sep 30, 2024

@VictoriaExpensify This issue can be reproduced on all platforms.

@VictoriaExpensify
Copy link
Contributor

Thanks @truph01 - that should reflect in the issue body. I've updated that

@VictoriaExpensify
Copy link
Contributor

@truph01 I'm still not able to recreate this and have tried on Android mweb. Have you been able to reproduce this issue with a different phone number?

@VictoriaExpensify
Copy link
Contributor

Bump @truph01

@VictoriaExpensify VictoriaExpensify added the Needs Reproduction Reproducible steps needed label Oct 3, 2024
@MelvinBot
Copy link

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

@melvin-bot melvin-bot bot added the Overdue label Oct 7, 2024
@truph01
Copy link
Contributor

truph01 commented Oct 7, 2024

@VictoriaExpensify My international dialing prefix is +84, so I can reproduce the issue by using a phone number with a different prefix, like +66977830292.

@VictoriaExpensify
Copy link
Contributor

Ok if you've been able to reproduce this, I think we can go ahead and apply the External label to get this fixed

@melvin-bot melvin-bot bot removed the Overdue label Oct 7, 2024
@VictoriaExpensify VictoriaExpensify added External Added to denote the issue can be worked on by a contributor and removed Needs Reproduction Reproducible steps needed labels Oct 7, 2024
Copy link

melvin-bot bot commented Oct 7, 2024

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

@melvin-bot melvin-bot bot changed the title Join button is unresponsive when signing up on mWeb [$250] Join button is unresponsive when signing up on mWeb Oct 7, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 7, 2024
Copy link

melvin-bot bot commented Oct 7, 2024

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

@trjExpensify
Copy link
Contributor

👋 @VictoriaExpensify can we update the issue title and OP to better reflect the problem here? It sounds like it's a more specific case of not communicating clearly the restrictions for signing-up using landline or VOIP phone numbers.

I'm also going to move this to #f1, as it's a bug which could impact conversion as it's in the sign-up flow.

Copy link

melvin-bot bot commented Oct 9, 2024

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

Offer link
Upwork job

Copy link

melvin-bot bot commented Oct 9, 2024

📣 @truph01 🎉 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 📖

Copy link

melvin-bot bot commented Oct 9, 2024

@neil-marcellini @VictoriaExpensify @dukenv0307 @truph01 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@truph01
Copy link
Contributor

truph01 commented Oct 10, 2024

@neil-marcellini I'm working on the frontend while the backend changes are deploying to staging. When a user encounters an error, it gets displayed on the screen. Does the UI look good to you?
image

@VictoriaExpensify VictoriaExpensify changed the title [$250] Join button is unresponsive when signing up on mWeb [$250] Join button appears unresponsive when signing up on mWeb with an invalid phone number Oct 10, 2024
@truph01
Copy link
Contributor

truph01 commented Oct 12, 2024

@neil-marcellini Please help check comment above once you have sec.

@melvin-bot melvin-bot bot added Overdue Reviewing Has a PR in review Weekly KSv2 and removed Overdue Daily KSv2 labels Oct 12, 2024
@truph01
Copy link
Contributor

truph01 commented Oct 14, 2024

PR is ready.

Comment can be discussed in PR.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 18, 2024
@melvin-bot melvin-bot bot changed the title [$250] Join button appears unresponsive when signing up on mWeb with an invalid phone number [HOLD for payment 2024-10-25] [$250] Join button appears unresponsive when signing up on mWeb with an invalid phone number Oct 18, 2024
Copy link

melvin-bot bot commented Oct 18, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 18, 2024
Copy link

melvin-bot bot commented Oct 18, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.50-8 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-10-25. 🎊

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

Copy link

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

  • [@dukenv0307] The PR that introduced the bug has been identified. Link to the PR:
  • [@dukenv0307] 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:
  • [@dukenv0307] 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:
  • [@dukenv0307] Determine if we should create a regression test for this bug.
  • [@dukenv0307] 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.
  • [@VictoriaExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 25, 2024
@VictoriaExpensify
Copy link
Contributor

Payment summary
Contributor: @truph01 paid $250 via Upwork

@dukenv0307 can you please complete the checklist and I'll finalise your payment? Thanks!

@dukenv0307
Copy link
Contributor

BugZero Checklist:

  • The PR that introduced the bug has been identified. Link to the PR: It's the BE bug, and just need to adjust the FE a bit
  • 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: N/A
  • 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: N/A
  • Determine if we should create a regression test for this bug. Yes
  • 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.

Regression test:

  1. Go to ND.
  2. Enter a phone number that does not belong to the current location.
  3. Click Join.
  4. Verify an error "The provided phone number does not match the country you are currently located at, please use your email address instead." is displayed.

Do we 👍 or 👎

@dukenv0307
Copy link
Contributor

@VictoriaExpensify I completed the checklist

@VictoriaExpensify
Copy link
Contributor

Raised an issue to add this to TestRail - https://github.com/Expensify/Expensify/issues/439705

@VictoriaExpensify
Copy link
Contributor

Payment summary:
Contributor+: @dukenv0307 paid $250 via Upwork

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. Daily KSv2 External Added to denote the issue can be worked on by a contributor Internal Requires API changes or must be handled by Expensify staff
Projects
Development

No branches or pull requests

8 participants