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 #415000] [$250] Room - Endless skeleton loader when a new account logs in after navigating to a public room #46105

Closed
1 of 6 tasks
lanitochka17 opened this issue Jul 24, 2024 · 33 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Monthly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 24, 2024

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: 9.0.11-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Open Chrome in incognito
  2. Navigate to https://staging.new.expensify.com/r/2091104345528462
  3. Click on the "Sign in" button at the bottom right corner
  4. Log in with a new Gmail account

Expected Result:

I should be able to log in and use that app using the public room login page

Actual Result:

Endless skeleton loader when a new account logs in after navigating to a public room. I'm unable to to use the app, Doesn't affect existing accounts

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

Add any screenshot/video evidence

Bug6551328_1721809421766.bandicam_2024-07-24_10-14-11-976.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015d012835d9c734be
  • Upwork Job ID: 1816876606789741584
  • Last Price Increase: 2024-08-09
Issue OwnerCurrent Issue Owner: @c3024
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 24, 2024
Copy link

melvin-bot bot commented Jul 24, 2024

Triggered auto assignment to @zanyrenney (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@lanitochka17
Copy link
Author

@zanyrenney FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-vsp

@zanyrenney
Copy link
Contributor

triaged, adding external.

@zanyrenney zanyrenney added the External Added to denote the issue can be worked on by a contributor label Jul 26, 2024
@melvin-bot melvin-bot bot changed the title Room - Endless skeleton loader when a new account logs in after navigating to a public room [$250] Room - Endless skeleton loader when a new account logs in after navigating to a public room Jul 26, 2024
Copy link

melvin-bot bot commented Jul 26, 2024

Job added to Upwork: https://www.upwork.com/jobs/~015d012835d9c734be

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 26, 2024
Copy link

melvin-bot bot commented Jul 26, 2024

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

Copy link

melvin-bot bot commented Jul 29, 2024

@zanyrenney, @c3024 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Jul 29, 2024
@c3024
Copy link
Contributor

c3024 commented Jul 30, 2024

Waiting for proposals.

@melvin-bot melvin-bot bot removed the Overdue label Jul 30, 2024
@jaydamani
Copy link
Contributor

jaydamani commented Jul 31, 2024

Proposal

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

Endless loading when you signup using LHN from public report

What is the root cause of that problem?

The SequetialQueue for API requests is paused in two ways and OpenApp request is stuck in the queue so it keeps loading endlessly.
The queue is paused from:

OnyxUpdates.saveUpdateInformation(responseToApply);
// Ensure the queue is paused while the client resolves the gap in onyx updates so that updates are guaranteed to happen in a specific order.
return Promise.resolve({
...response,
shouldPauseQueue: true,
});

In above code,

  • saveUpdateInformation pauses the queue synchronously but it also updates ONYX_UPDATES_FROM_SERVER which triggers handleOnyxUpdateGap This unpauses the queue when App is loading (OpenApp is not completed). Both pause and unpause happen synchronously
  • But the field shouldPauseQueue pauses the queue asynchronously after the above steps are done. This time there is no check to unpause if the app is loading. Due to this the app gets stuck.

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

Remove the shouldPauseQueue field as it is no longer required because saveUpdateInformation already handles pausing the queue when needed.

What alternative solutions did you explore? (Optional)

Update below to only pause if the app is not loading.

if (response?.shouldPauseQueue) {

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@jaydamani
Copy link
Contributor

Fix code link

@Zakpak0
Copy link
Contributor

Zakpak0 commented Jul 31, 2024

Proposal

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

We're trying to resolve the skeleton loader that will not dismiss when an anonymous user logs in from the RHP.

What is the root cause of that problem?

isLoadingApp never resolves to true after the login flow.
This is because on

        if (!isAnonymousUser) {
            // Signing in RHP is only for anonymous users
            Navigation.isNavigationReady().then(() => Navigation.dismissModal());
            App.openApp();
        }

we call the openApp function. Which calls getOnyxDataForOpenOrReconnect with isOpenApp set to true and sets isLoadingApp true in onyx.

/**
 * Fetches data needed for app initialization
 */
function openApp() {
}

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

The app is already initialized, so we should call reconnectApp instead. This won't put the entire app into loading state, and instead just fetch the reconnection data.

        if (!isAnonymousUser) {
            // Signing in RHP is only for anonymous users
            Navigation.isNavigationReady().then(() => Navigation.dismissModal());
            App.reconnectApp();
        }
/**
 * Fetches data when the app reconnects to the network
 * @param [updateIDFrom] the ID of the Onyx update that we want to start fetching from
 */
function reconnectApp(updateIDFrom: OnyxEntry<number> = 0) {
}

Here is a test branch with my changes

What alternative solutions did you explore? (Optional)

N/A

Copy link

melvin-bot bot commented Aug 2, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Aug 2, 2024
@zanyrenney
Copy link
Contributor

@c3024 please can you review the proposal above, there are a few and we need to make progress here?

Copy link

melvin-bot bot commented Aug 2, 2024

@zanyrenney, @c3024 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@zanyrenney
Copy link
Contributor

We are waiting to review the proposals above. bump @c3024 please can you prioritise this?

@c3024
Copy link
Contributor

c3024 commented Aug 5, 2024

Thanks for the bump @zanyrenney. I looked into the proposals. This was caused by #42820 and that PR did not fix the bug it was supposed to. So, this might need to be held for #41500. I need a bit more time to confirm. Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Aug 5, 2024
@zanyrenney
Copy link
Contributor

nice, thank you for clarifying! @c3024

@c3024
Copy link
Contributor

c3024 commented Aug 7, 2024

@zanyrenney I think this should be held for #41500.

Copy link

melvin-bot bot commented Aug 7, 2024

@zanyrenney @c3024 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

Copy link

melvin-bot bot commented Aug 9, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Aug 9, 2024
Copy link

melvin-bot bot commented Aug 12, 2024

@zanyrenney, @c3024 Eep! 4 days overdue now. Issues have feelings too...

@zanyrenney
Copy link
Contributor

bump @c3024 reviewing the proposals. Please can you prioritise reviewing those so that we can move ahead with this issue?

@c3024
Copy link
Contributor

c3024 commented Aug 13, 2024

@zanyrenney IMHO this should be held for #41500.

@melvin-bot melvin-bot bot removed the Overdue label Aug 13, 2024
@zanyrenney zanyrenney changed the title [$250] Room - Endless skeleton loader when a new account logs in after navigating to a public room [HOLD for #415000] [$250] Room - Endless skeleton loader when a new account logs in after navigating to a public room Aug 14, 2024
@zanyrenney zanyrenney added Weekly KSv2 and removed Daily KSv2 labels Aug 14, 2024
@zanyrenney
Copy link
Contributor

NICE, I'VE CHANGED THIS TO A WEEKLY ISSUE. AND I'VE UPDATED THE TITLE TO SHOW IT IS ON HOLD FOR THAT OTHER ISSUE ABOVE. THANK YOU @c3024

@zanyrenney
Copy link
Contributor

oops, did not mean to do caps 😓

@jaydamani
Copy link
Contributor

#41500 seems to be stale so can we resolve this without it?

@melvin-bot melvin-bot bot added the Overdue label Aug 26, 2024
@zanyrenney
Copy link
Contributor

bump @c3024 what do you think about resolving without the held issue?

@c3024
Copy link
Contributor

c3024 commented Sep 1, 2024

There seems to be an issue with logging in from the RHP.

loginFromRHP.mp4

I will investigate and update.

@melvin-bot melvin-bot bot removed the Overdue label Sep 1, 2024
@zanyrenney
Copy link
Contributor

did you get any more detail here?

@melvin-bot melvin-bot bot added the Overdue label Sep 19, 2024
@c3024
Copy link
Contributor

c3024 commented Sep 20, 2024

Checking now. Will update.

@melvin-bot melvin-bot bot removed the Overdue label Sep 20, 2024
@c3024
Copy link
Contributor

c3024 commented Sep 23, 2024

openApp addition in PR #42820 and simultaneous backend changes caused the present bug. That change is not needed anymore because we now have the code for showing onboarding modal when we open a deeplink (i.e. for public rooms also) here

Welcome.isOnboardingFlowCompleted({

This code was not there when #42820 was merged. I think we can revert that code added in #42840 here so that this issue can be fixed.

Copy link

melvin-bot bot commented Oct 16, 2024

This issue has not been updated in over 15 days. @zanyrenney, @c3024 eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@c3024
Copy link
Contributor

c3024 commented Oct 29, 2024

@zanyrenney

This is not reproducible anymore. This can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Monthly KSv2
Projects
None yet
Development

No branches or pull requests

5 participants