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

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com 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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 6, 2023
  2. melvin-bot commented on May 6, 2023

    @melvin-bot

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

  3. melvin-bot commented on May 6, 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
  4. bernhardoj commented on May 7, 2023

    @bernhardoj
    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});
    }

  5. roryabraham commented on May 9, 2023

    @roryabraham
    Contributor

    Grabbing this quick fix to get it in before the deploy

  6. roryabraham commented on May 9, 2023

    @roryabraham
    Contributor

    Merged a fix

  7. Natnael-Guchima commented on May 9, 2023

    @Natnael-Guchima

    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.

  8. 8 remaining items

  9. Natnael-Guchima commented on May 9, 2023

    @Natnael-Guchima
  10. roryabraham commented on May 10, 2023

    @roryabraham
    Contributor

    Reopening for reporting bonus

  11. roryabraham commented on May 10, 2023

    @roryabraham
    Contributor

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

  12. greg-schroeder commented on May 12, 2023

    @greg-schroeder
    Contributor

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

  13. greg-schroeder commented on May 12, 2023

    @greg-schroeder
    Contributor

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

  14. added
    InternalRequires API changes or must be handled by Expensify staff
    on May 12, 2023
  15. melvin-bot commented on May 12, 2023

    @melvin-bot
  16. melvin-bot commented on May 12, 2023

    @melvin-bot

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

  17. greg-schroeder commented on May 12, 2023

    @greg-schroeder
    Contributor

    Started a reporting bonus contract for @Natnael-Guchima

  18. Natnael-Guchima commented on May 12, 2023

    @Natnael-Guchima

    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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.InternalRequires API changes or must be handled by Expensify staffWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions