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-10-25] Transition from OldDot to NewDot is slow and shows blank screen for long time #27418

Closed
mountiny opened this issue Sep 14, 2023 · 44 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 Engineering Internal Requires API changes or must be handled by Expensify staff

Comments

@mountiny
Copy link
Contributor

mountiny commented Sep 14, 2023

### Problem

Coming from https://expensify.slack.com/archives/C05LX9D6E07/p1694668433572469?thread_ts=1694666491.998029&cid=C05LX9D6E07

When a new lead user signs up on OldDot and they want to chat with their setup specialist in NewDot, we use a transition to new.expensify.com to keep their session going in this new app.

However, this transition seems to got very slow now and blank page is shown for over 15 seconds which is terrible UX.

Seems like the issue is that on a first load we dont have proper data to show the reports

image
after refreshing it works fine
image

Solution

Investigate why the onyx data is not correctly loaded upon making the transition and fix it

cc @staszekscp @koko57

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c534f630f870f749
  • Upwork Job ID: 1709570879512326144
  • Last Price Increase: 2023-10-04
Issue OwnerCurrent Issue Owner: @dylanexpensify
@mountiny mountiny added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 14, 2023
@mountiny mountiny self-assigned this Sep 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

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

@mountiny mountiny moved this to CRITICAL in [#whatsnext] #quality Sep 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 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

@koko57
Copy link
Contributor

koko57 commented Sep 18, 2023

@mountiny I'm ready to help with this one 🙂

@mountiny
Copy link
Contributor Author

@koko57 will handle this one for us 🎖️

@melvin-bot melvin-bot bot removed the Overdue label Sep 18, 2023
@koko57
Copy link
Contributor

koko57 commented Sep 18, 2023

Daily update: I'm still looking for the root cause, but I've noticed one strange thing - when the transition fails (I was logged in as a user A and wanted to log in as a user B) and I see the green empty screen the reports that are in the Onyx (like in the first screenshot) are the reports that should be displayed for the user A.
Screenshot 2023-09-18 at 19 23 44
The rest of the data like login, contact methods, email, etc are already populated with user B's data. Then after the refresh the reports stay in Onyx unchanged among the reports that should be displayed for the user B
Screenshot 2023-09-18 at 19 23 51

I logged out of both accounts and logged in separately again. For user A I had 185 keys in Onyx and for user B I had 340.
When logged in as user A and trying to transition from the OldDot as a user B, after the failure and then refresh I had 489 keys in Onyx.

@koko57
Copy link
Contributor

koko57 commented Sep 19, 2023

I've just found that OpenReport and OpenApp are not called after the user is logged in to another account. I think it can the main problem here why we don't have a proper data to display

@koko57
Copy link
Contributor

koko57 commented Sep 19, 2023

Daily update: Although we're navigating to the report screen, report screen doesn't mount.
On OpenApp and OpeReport requests - I tried to force both requests, but it didn't help. I'll continue looking into this issue tomorrow.

@mountiny
Copy link
Contributor Author

Thanks for the updates

@koko57
Copy link
Contributor

koko57 commented Sep 21, 2023

Daily update: (Sorry for not posting yesterday) unfortunately, not much progress here. I'm digging into the logOut - logIn as a new user flow. I've noticed that in this flow we're firing signOut twice: here and here. I wonder whether this flow could be simplified somehow? The ReportScreen is not mounting as well as SidebarLinksData - which is weird bc CentralPaneNavigator and BaseSidebarScreen both are.

@koko57
Copy link
Contributor

koko57 commented Sep 22, 2023

Daily update: today I asked Edu for some help, we both think it's possibly a navigation issue. I'll continue investigating it on Monday.

@melvin-bot melvin-bot bot added the Overdue label Sep 25, 2023
@mountiny
Copy link
Contributor Author

Investigation continues

@melvin-bot melvin-bot bot removed the Overdue label Sep 25, 2023
@koko57
Copy link
Contributor

koko57 commented Sep 25, 2023

Not much progress here. I only discovered that removing this from LogOutPreviousUserPage works but there's a glitch of the old user's chats at the beginning and there is some error in the session object after authenticating. As I've mentioned before we log out the user twice in the current flow. Maybe just simplifying it would fix the issue.

@koko57
Copy link
Contributor

koko57 commented Sep 27, 2023

I guess I've finally found the root cause - it's a problem with Onyx. I'm starting working on my proposal.

@mountiny
Copy link
Contributor Author

Great! Thanks!

@melvin-bot
Copy link

melvin-bot bot commented Sep 28, 2023

@koko57 @mountiny @dylanexpensify this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@koko57
Copy link
Contributor

koko57 commented Sep 28, 2023

Working on a proposal, I have one solution on my mind, need to test it thoroughly. 🙂 If everything looks fine, maybe I'll be able to post the proposal tomorrow.

@koko57
Copy link
Contributor

koko57 commented Sep 29, 2023

Unfortunately, my solution doesn't work properly, I need to find another one 😞

@melvin-bot melvin-bot bot added the Overdue label Oct 2, 2023
@dylanexpensify
Copy link
Contributor

@koko57 mind giving us an update?

@koko57
Copy link
Contributor

koko57 commented Oct 10, 2023

PR is still under review

@melvin-bot
Copy link

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

@koko57
Copy link
Contributor

koko57 commented Oct 18, 2023

@mountiny I saw this #29849 and I'm on it. I know what's happening there but I need to find out why (bc it tested well, I wonder if there was some other changes that together with mine might have caused the issue)

@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 18, 2023
@melvin-bot melvin-bot bot changed the title Transition from OldDot to NewDot is slow and shows blank screen for long time [HOLD for payment 2023-10-25] Transition from OldDot to NewDot is slow and shows blank screen for long time Oct 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.86-5 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-10-25. 🎊

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:

  • @koko57 does not require payment (Contractor)
  • @allroundexperts does not require payment (Eligible for Manual Requests)

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 Oct 18, 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:

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

@dylanexpensify
Copy link
Contributor

payment tomorrow!

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Oct 25, 2023
@dylanexpensify
Copy link
Contributor

Payment Summary:

Please apply!

@melvin-bot melvin-bot bot removed the Overdue label Oct 30, 2023
@dylanexpensify
Copy link
Contributor

@allroundexperts mind completing checklist? 🙇‍♂️

@allroundexperts
Copy link
Contributor

@dylanexpensify I don't think that the checklist is applicable here. This was a performance optimisation PR.

@mountiny
Copy link
Contributor Author

Agreed, @allroundexperts did you request on newdot? Can we close this issue?

@allroundexperts
Copy link
Contributor

I've noted it @mountiny. We can close.

@github-project-automation github-project-automation bot moved this from CRITICAL to Done in [#whatsnext] #quality Oct 30, 2023
@JmillsExpensify
Copy link

$500 payment approved for @allroundexperts based on this comment.

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 Engineering Internal Requires API changes or must be handled by Expensify staff
Projects
Development

No branches or pull requests

5 participants