Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.33k stars 2.76k forks source link

[HOLD for #415000] [$250] Room - Endless skeleton loader when a new account logs in after navigating to a public room #46105

Open lanitochka17 opened 1 month ago

lanitochka17 commented 1 month ago

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?

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/3a07bd7c-b334-49cd-92b5-27c753d92fb8

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
melvin-bot[bot] commented 1 month ago

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 commented 1 month ago

@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 commented 1 month ago

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

zanyrenney commented 1 month ago

triaged, adding external.

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

c3024 commented 1 month ago

Waiting for proposals.

jaydamani commented 1 month ago

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:

https://github.com/Expensify/App/blob/3c9c7b016ca2c801d5eac49f869eeeda76437ba7/src/libs/Middleware/SaveResponseInOnyx.ts#L38-L44

In above code,

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.

https://github.com/Expensify/App/blob/eced1703e3b2ca1d7374b583fbc0a82b68381f85/src/libs/Network/SequentialQueue.ts#L89

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 commented 1 month ago

Fix code link

Zakpak0 commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

zanyrenney commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

zanyrenney commented 1 month ago

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

c3024 commented 1 month ago

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!

zanyrenney commented 1 month ago

nice, thank you for clarifying! @c3024

c3024 commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

@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!

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

zanyrenney commented 1 month ago

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

c3024 commented 1 month ago

@zanyrenney IMHO this should be held for #41500.

zanyrenney commented 1 month ago

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 commented 1 month ago

oops, did not mean to do caps 😓

jaydamani commented 2 weeks ago

https://github.com/Expensify/App/issues/41500 seems to be stale so can we resolve this without it?

zanyrenney commented 2 weeks ago

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

c3024 commented 2 weeks ago

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

https://github.com/user-attachments/assets/793051ac-1fe1-4429-8c8c-e485cf989aa4

I will investigate and update.