Skip to content

[HOLD for payment 2023-05-16] Login - Text "Link sent" doesn't appear and link is not sent after Unlink button clicked, console error appears #18526

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

Closed
6 tasks done
kbecciv opened this issue May 6, 2023 · 18 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Internal Requires API changes or must be handled by Expensify staff Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented May 6, 2023

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


Issue found when executing PR #15811

Action Performed:

  1. Login to account A and add a secondary login B, do not validate it
  2. Logout from A
  3. Input B email on login screen and click Continue
  4. Click Unlink button

Expected Result:

  1. "Link sent" should appear on the screen. Link should be sent.
  2. No console error appears

Actual Result:

Web + mWeb: "Link sent" doesn't appear, link is not sent.
Android and IOS apps: app crashes

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.11.2

Reproducible in staging?: Yes

Reproducible in production?: New Feature

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

Web issue

Bug6044906_video_03__3_.mp4

image (37)

App crashed

Bug6044906_video_74__1_.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team / @Natnael-Guchima

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~016d970f1e853d9ed1
  • Upwork Job ID: 1656945072873746432
  • Last Price Increase: 2023-05-12
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 6, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 6, 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.

Unlink button doesn't work on web (throw a console error) and crash on Android/iOS.

What is the root cause of that problem?

The console error already clearly state the error is can't read METHOD of undefined. We are reading it from CONST.ONYX, but this PR #18464 already drop that const, and we should use Onyx.METHOD instead.

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

We should replace CONST.ONYX.METHOD with Onyx.METHOD to these functions:

function requestUnlinkValidationLink() {
const optimisticData = [{
onyxMethod: CONST.ONYX.METHOD.MERGE,
key: ONYXKEYS.ACCOUNT,
value: {
isLoading: true,
errors: null,
message: null,
},
}];
const successData = [{
onyxMethod: CONST.ONYX.METHOD.MERGE,
key: ONYXKEYS.ACCOUNT,
value: {
isLoading: false,
message: Localize.translateLocal('unlinkLoginForm.linkSent'),
},
}];
const failureData = [{
onyxMethod: CONST.ONYX.METHOD.MERGE,
key: ONYXKEYS.ACCOUNT,
value: {
isLoading: false,
},
}];
API.write('RequestUnlinkValidationLink', {email: credentials.login}, {optimisticData, successData, failureData});
}
function unlinkLogin(accountID, validateCode) {
const optimisticData = [{
onyxMethod: CONST.ONYX.METHOD.MERGE,
key: ONYXKEYS.ACCOUNT,
value: {
...CONST.DEFAULT_ACCOUNT_DATA,
isLoading: true,
},
}];
const successData = [{
onyxMethod: CONST.ONYX.METHOD.MERGE,
key: ONYXKEYS.ACCOUNT,
value: {
isLoading: false,
message: Localize.translateLocal('unlinkLoginForm.succesfullyUnlinkedLogin'),
},
},
{
onyxMethod: CONST.ONYX.METHOD.MERGE,
key: ONYXKEYS.CREDENTIALS,
value: {
login: '',
},
}];
const failureData = [{
onyxMethod: CONST.ONYX.METHOD.MERGE,
key: ONYXKEYS.ACCOUNT,
value: {
isLoading: false,
},
}];
API.write('UnlinkLogin', {accountID, validateCode}, {optimisticData, successData, failureData});
}

@roryabraham
Copy link
Contributor

Grabbing this quick fix to get it in before the deploy

@roryabraham roryabraham mentioned this issue May 9, 2023
57 tasks
@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label May 9, 2023
@roryabraham
Copy link
Contributor

Merged a fix

@Natnael-Guchima
Copy link

Natnael-Guchima commented May 9, 2023

Helllo @roryabraham, @greg-schroeder . I have reported this issue, and the fix was triggered by the report. Isn't this eligible for bonus reporting?
Thanks.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels May 9, 2023
@melvin-bot melvin-bot bot changed the title Login - Text "Link sent" doesn't appear and link is not sent after Unlink button clicked, console error appears [HOLD for payment 2023-05-16] Login - Text "Link sent" doesn't appear and link is not sent after Unlink button clicked, console error appears May 9, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 9, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 9, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 9, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.12-0 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-05-16. 🎊

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented May 9, 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:

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

@Natnael-Guchima
Copy link

Natnael-Guchima commented May 9, 2023

A gentle bump @roryabraham #18526 (comment)

@roryabraham
Copy link
Contributor

Reopening for reporting bonus

@roryabraham
Copy link
Contributor

@greg-schroeder the only payment due here is the $250 reporting bonus. Thanks!

@greg-schroeder
Copy link
Contributor

greg-schroeder commented May 12, 2023

Got it, I'll take care of it on 5/16!

@greg-schroeder
Copy link
Contributor

I'm going to apply Internal just to generate an Upwork job

@greg-schroeder greg-schroeder added the Internal Requires API changes or must be handled by Expensify staff label May 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 12, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 12, 2023

Triggered auto assignment to Contributor Plus for review of internal employee PR - @0xmiroslav (Internal)

@greg-schroeder
Copy link
Contributor

Started a reporting bonus contract for @Natnael-Guchima

@Natnael-Guchima
Copy link

Started a reporting bonus contract for @Natnael-Guchima

Accepted. Thanks.

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. Internal Requires API changes or must be handled by Expensify staff Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants