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-27] [$500] Web – Login – Page crash when login via email link as a new user. #31431

Closed
1 of 6 tasks
izarutskaya opened this issue Nov 16, 2023 · 24 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

@izarutskaya
Copy link

izarutskaya commented Nov 16, 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.4.0-0
Reproducible in staging?: Y
Reproducible in production?: N
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. Go to https://staging.new.expensify.com/
  2. Logout of NewDot
  3. Create new account
  4. Copy the Magic link and change it to staging
  5. Open a new tab and navigate to the staging magic link
  6. Verify the abracadabra page is displayed
  7. Navigate to the original tab

Expected Result:

The user is logged in with the new account

Actual Result:

Page crash when login via email link

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

Bug6278799_1700125589498.Crash.mp4

Bug6278799_1700125589584!Crash_log.txt.txt

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0129bcbba760883d0a
  • Upwork Job ID: 1725112015353434112
  • Last Price Increase: 2023-11-16
  • Automatic offers:
    • 0xmiroslav | Reviewer | 27700838
    • mkhutornyi | Contributor | 27700841
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 16, 2023
@melvin-bot melvin-bot bot changed the title Web – Login – Page crash when login via email link as a new user. [$500] Web – Login – Page crash when login via email link as a new user. Nov 16, 2023
Copy link

melvin-bot bot commented Nov 16, 2023

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

Copy link

melvin-bot bot commented Nov 16, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 16, 2023
Copy link

melvin-bot bot commented Nov 16, 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

Copy link

melvin-bot bot commented Nov 16, 2023

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

@izarutskaya
Copy link
Author

Not reproduced on production

Recording.1878.mp4

@shubham1206agra
Copy link
Contributor

shubham1206agra commented Nov 16, 2023

Screenshot 2023-11-16 at 5 12 26 PM

In firefox, it shows this page instead after showing abracadabra for a moment and other tab doesn't crash

@0xmiros

This comment was marked as off-topic.

@mkhutornyi
Copy link
Contributor

Proposal

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

App crashes when login via email link as a new user

What is the root cause of that problem?

bug

function getFirstVisibleReportActionID(sortedReportActions: ReportAction[], isOffline: boolean): string {
const sortedFilterReportActions = sortedReportActions.filter((action) => !isDeletedAction(action) || (action?.childVisibleActionCount ?? 0) > 0 || isOffline);
return sortedFilterReportActions.length > 1 ? sortedFilterReportActions[sortedFilterReportActions.length - 2].reportActionID : '';
}

Sometimes sortedReportActions is set to empty object ({}) when load first time.

reportActions: {
key: ({route}) => `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${getReportID(route)}`,
canEvict: false,
selector: ReportActionsUtils.getSortedReportActionsForDisplay,
},

This is known bug in Onyx selector.

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

If sortedReportActions is not array, early return

Similar to this:

function getMostRecentIOURequestActionID(reportActions: ReportAction[] | null): string | null {
if (!Array.isArray(reportActions)) {
return null;
}

@0xmiros
Copy link
Contributor

0xmiros commented Nov 16, 2023

👍 on @mkhutornyi's proposal. It's issue in Onyx.
There was already discussion in the past but it seems no one is trying to fix it yet.
So we can apply workaround for now, as we already did in other parts of the app.
🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Nov 16, 2023

Triggered auto assignment to @danieldoglas, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 16, 2023
Copy link

melvin-bot bot commented Nov 16, 2023

📣 @0xmiroslav 🎉 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 Nov 16, 2023

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

@roryabraham
Copy link
Contributor

Fix validated on staging

@roryabraham roryabraham removed the DeployBlockerCash This issue or pull request should block deployment label Nov 17, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 20, 2023
@melvin-bot melvin-bot bot changed the title [$500] Web – Login – Page crash when login via email link as a new user. [HOLD for payment 2023-11-27] [$500] Web – Login – Page crash when login via email link as a new user. Nov 20, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 20, 2023
Copy link

melvin-bot bot commented Nov 20, 2023

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

Copy link

melvin-bot bot commented Nov 20, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.0-3 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-27. 🎊

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:

Copy link

melvin-bot bot commented Nov 20, 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:

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

@abekkala
Copy link
Contributor

I'm heading out for the Thanksgiving holiday and will be back bright and early Monday morning.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 27, 2023
@abekkala
Copy link
Contributor

@0xmiroslav can you complete the checklist please?

@0xmiros
Copy link
Contributor

0xmiros commented Nov 28, 2023

  • The PR that introduced the bug has been identified. Link to the PR: Fix: Two line markers appear for a second #25554
  • 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: https://github.com/Expensify/App/pull/25554/files#r1408146681
  • 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: We already had slack discussion about this Onyx selector bug
  • Determine if we should create a regression test for this bug.
  • 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.

This is main user signin flow and caught by QA team so regression test should exist already

@abekkala
Copy link
Contributor

@mkhutornyi can you please accept the offer in Upwork so I can process payment?
https://www.upwork.com/nx/wm/offer/27700841

@mkhutornyi
Copy link
Contributor

@abekkala accepted offer. Thank you

@abekkala
Copy link
Contributor

@0xmiroslav are we still holding your payments until your upwork gets sorted?

@abekkala
Copy link
Contributor

@mkhutornyi payment sent and contract ended - thank you! 🎉

@0xmiros
Copy link
Contributor

0xmiros commented Nov 28, 2023

@abekkala no issue on upwork but let's just close this since I am tracking

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

7 participants