App icon indicating copy to clipboard operation
App copied to clipboard

Infinite Loading spinner on Login screen

Open parasharrajat opened this issue 5 years ago • 18 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open App on Mobile E.cash.
  2. Enter username, press continue.
  3. Enter the password, press continue.

Expected Result:

Users should sign in to the app.

Actual Result:

Loader is shown the password page and it hangs there forever.

Workaround:

Close the app and restart.

Platform:

Where is this issue occurring?

  • [x] Web - Possible
  • [x] iOS - Possible
  • [x] Android - Found here
  • [x] Desktop App - Possible
  • [x] Mobile Web - Possible

Version Number: latest Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation err

Expensify/Expensify Issue URL:

View all open jobs on Upwork

parasharrajat avatar Jul 25 '21 13:07 parasharrajat

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

MelvinBot avatar Jul 25 '21 13:07 MelvinBot

This is a serious issue that is aware of for a month but It just occurred again to me and thus it will come for many users. Thus need resolution.

Explanation

During app uses, we run many uncontrolled apis calls which require Auth token. When a user logs out, it is possible that many of these requests are still running and due to this reason, our queue will be paused. But as we are repeating the queue, it will not resume until we get the token back which causes this issue.

To permanently fix this, we have to flush the queue when the user is logged out.

parasharrajat avatar Jul 25 '21 13:07 parasharrajat

Just faced the same issue on Desktop App.

parasharrajat avatar Jul 28 '21 10:07 parasharrajat

Triggered auto assignment to @MitchExpensify (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

MelvinBot avatar Aug 02 '21 22:08 MelvinBot

Triggered auto assignment to @AndrewGable (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Aug 02 '21 22:08 MelvinBot

I have personally experienced this issue, can confirm it's happening, so skipping Triage.

puneetlath avatar Aug 02 '21 22:08 puneetlath

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

OSBotify avatar Aug 02 '21 23:08 OSBotify

Adding deploy blocker as this is only occurring on staging. I can reproduce on a fresh install as well.

AndrewGable avatar Aug 02 '21 23:08 AndrewGable

To fix this. the best and easiest option is to flush the queue when the user logs out. As there won't be any call which uses auth token and should continue after logout.

parasharrajat avatar Aug 02 '21 23:08 parasharrajat

Do we flush the queue here? https://github.com/Expensify/App/blob/main/src/libs/actions/SignInRedirect.js#L52

AndrewGable avatar Aug 02 '21 23:08 AndrewGable

No. Here https://github.com/Expensify/App/blob/e511b1f70082ad965b5dc85117d18f4dce54287d/src/libs/API.js#L62. But this is not really clearing the queue which some requests are made after this statement has run. As per the image attached above, there was a request for Timer.

parasharrajat avatar Aug 02 '21 23:08 parasharrajat

@AndrewGable Ah, I think I found it. Maybe we should unpause the queue when we signin. Which does not have any impact if the queue was already unpaused.

We do this for reauthenticate https://github.com/Expensify/App/blob/e511b1f70082ad965b5dc85117d18f4dce54287d/src/libs/API.js#L278

We can follow the same for SignIn https://github.com/Expensify/App/blob/e511b1f70082ad965b5dc85117d18f4dce54287d/src/libs/actions/Session.js#L207-L225.

parasharrajat avatar Aug 02 '21 23:08 parasharrajat

Maybe if I am correct, this can be triaged and assigned to me.

parasharrajat avatar Aug 02 '21 23:08 parasharrajat

Plus, We should also flush the offline queues when we flush the in-memory queue. I will try to experiment with this a bit.

 Onyx.set(ONYXKEYS.NETWORK_REQUEST_QUEUE, []);

parasharrajat avatar Aug 03 '21 00:08 parasharrajat

Triggered auto assignment to @jboniface (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Aug 03 '21 17:08 MelvinBot

@parasharrajat as mentioned in slack, the issue is yours. We will get it configured in Upwork.

AndrewGable avatar Aug 03 '21 17:08 AndrewGable

posted to upwork and sent invite to rajat https://www.upwork.com/jobs/~01fede9fe7086b3d75

jboniface avatar Aug 03 '21 21:08 jboniface

@AndrewGable @jboniface Be sure to fill out the Contact List!

botify avatar Aug 05 '21 15:08 botify