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 #50796] [$250] Contact method - User returned to enter new email step after backgrounding app #51275

Open
1 of 8 tasks
lanitochka17 opened this issue Oct 22, 2024 · 22 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering 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 Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 22, 2024

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


Version Number: 9.0.52.1
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Issue found when executing PR #49445

Action Performed:

  1. Open the app and log in
  2. Navigate to the account settings > Profile > Contact method
  3. Tap the New contact method button
  4. Enter an email that will be used as a secondary login and proceed to the magic code step
  5. Background the app
  6. Open the app again

Expected Result:

User lands back on the magic code step

Actual Result:

User is returned to the enter email step

Workaround:

Unknown

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6642192_1729610713546.video_2024-10-22_11-24-57.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021848841356939319972
  • Upwork Job ID: 1848841356939319972
  • Last Price Increase: 2024-10-22
Issue OwnerCurrent Issue Owner: @
@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Oct 22, 2024
Copy link

melvin-bot bot commented Oct 22, 2024

Triggered auto assignment to @srikarparsi (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Oct 22, 2024

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Oct 22, 2024
Copy link

melvin-bot bot commented Oct 22, 2024

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Oct 22, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@lanitochka17
Copy link
Author

Production:

-7479549786383612484.MP4

@daledah
Copy link
Contributor

daledah commented Oct 22, 2024

Edited by proposal-police: This proposal was edited at 2024-10-22 17:21:18 UTC.

Proposal

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

User is returned to the enter email step

What is the root cause of that problem?

we don't change route when we navigate to verify steps

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

  1. We should add new route for this page like we did with Add bank account
    SETTINGS_NEW_CONTACT_METHOD_VERIFY: {
        route: 'settings/profile/contact-methods/new/verify',
        getRoute: (backTo?: string) => getUrlWithBackToParam('settings/profile/contact-methods/new/verify', backTo),
    },
  1. And move this modal to the new page

<ValidateCodeActionModal
validatePendingAction={pendingContactAction?.pendingFields?.actionVerified}
validateError={validateLoginError}
handleSubmitForm={addNewContactMethod}

What alternative solutions did you explore? (Optional)

We can customize VerifyAccountPage component to match the requirements on the contact page.

@srikarparsi
Copy link
Contributor

Related PR

@getusha
Copy link
Contributor

getusha commented Oct 22, 2024

I am able to repro this on prod

IMG_1444.MP4

@aimane-chnaif
Copy link
Contributor

Was about to say that 😄
I also reproduced in prod.

image

Just tested and reproducible in 1e81aa8

@aimane-chnaif
Copy link
Contributor

From my investigation, the root cause is related to AccessOrNotFoundWrapper in NewContactMethodPage.
After removing this wrapper, the bug is gone.

@srikarparsi
Copy link
Contributor

Nice, agreed, also able to reproduce this on production

@srikarparsi srikarparsi added DeployBlocker Indicates it should block deploying the API Daily KSv2 and removed Hourly KSv2 DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Oct 22, 2024
@srikarparsi srikarparsi assigned getusha and unassigned getusha Oct 22, 2024
@srikarparsi
Copy link
Contributor

Going to make this external since it doesn't stem from this PR

@srikarparsi srikarparsi added the External Added to denote the issue can be worked on by a contributor label Oct 22, 2024
Copy link

melvin-bot bot commented Oct 22, 2024

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

@melvin-bot melvin-bot bot changed the title Contact method - User returned to enter new email step after backgrounding app [$250] Contact method - User returned to enter new email step after backgrounding app Oct 22, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 22, 2024
Copy link

melvin-bot bot commented Oct 22, 2024

Current assignee @getusha is eligible for the External assigner, not assigning anyone new.

@bernhardoj
Copy link
Contributor

Proposal

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

The user is brought back to the email contact field page after backgrounding the app and returning to the app.

What is the root cause of that problem?

When we return back to the app, we can see that a loading is shown. The loading comes from AccessOrNotFoundWrapper, so the modal is unmounted which closes it.

return (
<AccessOrNotFoundWrapper shouldBeBlocked={isActingAsDelegate}>

It loads every time a reconnect is called because it sets isLoadingReportData to true.

if (shouldShowFullScreenLoadingIndicator) {
return <FullscreenLoadingIndicator />;
}

const shouldShowFullScreenLoadingIndicator = !isMoneyRequest && isLoadingReportData !== false && (!Object.entries(policy ?? {}).length || !policy?.id);

Because the page isn't related to a workspace page at all (and we don't pass the policyID), the policy object is always empty.

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

The purpose of AccessOrNotFoundWrapper is to prevent the user from accessing the page from a deep link. However, AccessOrNotFoundWrapper is designed for workspace related pages. The usual pattern to show the not found page is by using FullPageNotFoundView.

So, the solution is to replace AccessOrNotFoundWrapper with FullPageNotFoundView

<FullPageNotFoundView shouldShow={isActingAsDelegate}>

@ChavdaSachin
Copy link
Contributor

Hey
we are already working on copilot access related issue here and we have decided to create a new wrapper for delegateAccess.
so issue will be solved along with #50796

cc. @getusha

@kadiealexander
Copy link
Contributor

Reassigning this to a new BugZero team member as I'm going OOO for two weeks. Happy to take it back when I'm back!

@kadiealexander kadiealexander removed their assignment Oct 25, 2024
@kadiealexander kadiealexander added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Oct 25, 2024
Copy link

melvin-bot bot commented Oct 25, 2024

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

@kadiealexander kadiealexander self-assigned this Oct 25, 2024
@srikarparsi
Copy link
Contributor

so issue will be solved along with #50796

Oh nice, do you think you can confirm @Julesssss? And I can put this on hold for that issue if that is the case.

@melvin-bot melvin-bot bot added the Overdue label Oct 28, 2024
@Julesssss
Copy link
Contributor

Yeah, lets put this on hold @srikarparsi

@sonialiap sonialiap changed the title [$250] Contact method - User returned to enter new email step after backgrounding app [Hold for #50796] [$250] Contact method - User returned to enter new email step after backgrounding app Oct 28, 2024
@sonialiap sonialiap added Weekly KSv2 and removed Daily KSv2 labels Oct 28, 2024
@melvin-bot melvin-bot bot removed the Overdue label Oct 28, 2024
@sonialiap
Copy link
Contributor

Put on hold and moved to weekly

@melvin-bot melvin-bot bot added the Overdue label Nov 11, 2024
@sonialiap
Copy link
Contributor

Still on hold for #50796 which is in progress

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. Engineering 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 Weekly KSv2
Projects
Status: No status
Development

No branches or pull requests

10 participants