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 2023-11-06] [HOLD for payment 2023-11-02] [$500] Login - Email address does not remain when refresh Magic Code page and hit Go back button #29192

Closed
3 of 6 tasks
lanitochka17 opened this issue Oct 10, 2023 · 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

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 10, 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!


Version Number: 1.3.80-0

Reproducible in staging?: Yes

Reproducible in production?: Yes

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. Navigate to staging.new.expensify.com
  2. Enter e-mail address & click Sign in button
  3. Refresh the page
  4. Hit Go back button

Expected Result:

Once added, e-mail address should remain after refreshing Magic Code page and hit Go back button

Actual Result:

Email address does not remain when refresh Magic Code page and hit Go back button

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • Windows: Chrome
  • MacOS: Desktop

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
Windows: Chrome
Bug6231886_1696943447632.Recording__1224.mp4
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0181306db2b58c51f7
  • Upwork Job ID: 1714251654275936256
  • Last Price Increase: 2023-10-17
  • Automatic offers:
    • fedirjh | Reviewer | 27339710
    • bernhardoj | Contributor | 27339711
Issue OwnerCurrent Issue Owner: @zanyrenney
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 10, 2023

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

@melvin-bot
Copy link

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

@bernhardoj
Copy link
Contributor

Proposal

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

The login input is removed when we refresh the web app while we are on the magic code input form.

What is the root cause of that problem?

The login input value is just a simple state which means if we refresh the web, the value is cleared.

const [login, setLogin] = useState('');

However, when we refresh the web while we are on the magic code input form, I expect that going back to the login form would show the login I submitted before.
image

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

When we submit the login, it will be saved to CREDENTIALS onyx. We can use this onyx to set the initial value of the login state. (we also use this to show the login before the "Go back" button)

const [login, setLogin] = useState(() => {
    const userLogin = Str.removeSMSDomain(props.credentials.login || '');
    return userLogin;
});

@melvin-bot melvin-bot bot added the Overdue label Oct 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

@sonialiap Eep! 4 days overdue now. Issues have feelings too...

@sonialiap
Copy link
Contributor

Reproducible

@melvin-bot melvin-bot bot removed the Overdue label Oct 17, 2023
@sonialiap sonialiap added the External Added to denote the issue can be worked on by a contributor label Oct 17, 2023
@melvin-bot melvin-bot bot changed the title Login - Email address does not remain when refresh Magic Code page and hit Go back button [$500] Login - Email address does not remain when refresh Magic Code page and hit Go back button Oct 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 17, 2023

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

@sonialiap sonialiap removed the Bug Something is broken. Auto assigns a BugZero manager. label Oct 17, 2023
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 17, 2023
@sonialiap sonialiap added the Bug Something is broken. Auto assigns a BugZero manager. label Oct 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 17, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 17, 2023

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

@sonialiap
Copy link
Contributor

I'm OOO Oct 16-23. Adding leave buddy

Status: looking for proposals

@Expensify Expensify deleted a comment from melvin-bot bot Oct 17, 2023
@HardCarrier
Copy link

The root cause of this problem is that the login input value is stored in a simple state using the code provided and when the web app is refreshed, the value stored in this state is cleared.

To solve this issue and retain the login input after a web app refresh, you can use a different approach by saving and retrieving the login data from a more persistent storage location. One possible solution is to store the login input data in a client-side storage like localStorage or a cookie. This way, even if the web app is refreshed, the login data can be retrieved from the client-side storage and populated back into the input field when the user returns to the login form.

@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

📣 @leijia322! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@HardCarrier
Copy link

Contributor details
My Expensify account email: leijia322@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~019ec726f12bc9ad91

@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

📣 @rahimiam! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@irahimiam
Copy link

irahimiam commented Oct 18, 2023

Proposal

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

  • Email address does not remain when refresh Magic Code page and hit Go back button

What is the root cause of that problem?

  • The state that controlling the email value for input tag is refreshed with page refresh and do not hold the email

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

  • We must use credential props and pass it to state that is controlling the initial value in baseLoginForm function and to prevent further problems like first time init value we pass empty string

@melvin-bot melvin-bot bot added the Overdue label Oct 19, 2023
@fedirjh
Copy link
Contributor

fedirjh commented Oct 19, 2023

@bernhardoj proposal looks good to me, it's a straightforward fix.

🎀 👀 🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Oct 19, 2023
@zanyrenney zanyrenney removed their assignment Oct 25, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 25, 2023
@bernhardoj
Copy link
Contributor

We have a regression here. I have pushed a new PR to fix it.

cc: @fedirjh

@melvin-bot
Copy link

melvin-bot bot commented Oct 25, 2023

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot
Copy link

melvin-bot bot commented Oct 25, 2023

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@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 26, 2023
@melvin-bot melvin-bot bot changed the title [$500] Login - Email address does not remain when refresh Magic Code page and hit Go back button [HOLD for payment 2023-11-02] [$500] Login - Email address does not remain when refresh Magic Code page and hit Go back button Oct 26, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 26, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 26, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.91-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 2023-11-02. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 26, 2023

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:

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

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 30, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-11-02] [$500] Login - Email address does not remain when refresh Magic Code page and hit Go back button [HOLD for payment 2023-11-06] [HOLD for payment 2023-11-02] [$500] Login - Email address does not remain when refresh Magic Code page and hit Go back button Oct 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 30, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.92-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 2023-11-06. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 30, 2023

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:

  • [@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
  • [@fedirjh] 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:
  • [@fedirjh] 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:
  • [@fedirjh] Determine if we should create a regression test for this bug.
  • [@fedirjh] 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.
  • [@sonialiap] 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 Overdue and removed Weekly KSv2 labels Nov 2, 2023
@sonialiap
Copy link
Contributor

@fedirjh review + bonus = $750 - paid ✔️
@bernhardoj fix + bonus = $750 - paid ✔️

@melvin-bot melvin-bot bot removed the Overdue label Nov 6, 2023
@sonialiap
Copy link
Contributor

@fedirjh please complete the checklist #29192 (comment)

@fedirjh
Copy link
Contributor

fedirjh commented Nov 8, 2023

BugZero Checklist:

  • Link to the PR: This is not a recent regression, it seems that the behavior existed from the beginning.
  • Link to comment: N/A
  • Link to discussion: N/A
  • Determine if we should create a regression test for this bug: Yes

Regression Test Proposal

  1. Sign out if you are signed in
  2. Enter your login and press Continue
  3. Refresh the app (only on web/mWeb/Desktop)
  4. Press Go back
  5. Verify he login field displays the entered login.
  • Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added the Overdue label Nov 10, 2023
@melvin-bot melvin-bot bot removed the Overdue label Nov 10, 2023
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
Projects
None yet
Development

No branches or pull requests

8 participants