App icon indicating copy to clipboard operation
App copied to clipboard

IOU - All the cancelled request preview shows loading spinner for reopened accounts - reported by @Tushu17

Open kavimuru opened this issue 3 years ago • 52 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:

Precondition: Closed an account then reopen again

  1. Launch the app
  2. Login with reopened account credentials
  3. Open Direct message with account who I canceled request money.

Expected Result:

All canceled request money should appear without any issues

Actual Result:

All canceled request money shows spinner.

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.1.33-2 Reproducible in staging?: Yes Reproducible in production?: Yes Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos:

https://user-images.githubusercontent.com/43996225/151190208-15448c72-dbbc-4a8a-8925-f78b3d760c7b.mp4

Expensify/Expensify Issue URL: Issue reported by: Slack conversation:

View all open jobs on GitHub

kavimuru avatar Jan 26 '22 15:01 kavimuru

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

MelvinBot avatar Jan 26 '22 15:01 MelvinBot

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

MelvinBot avatar Jan 26 '22 19:01 MelvinBot

Upwork Job

MitchExpensify avatar Jan 26 '22 23:01 MitchExpensify

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

MelvinBot avatar Jan 26 '22 23:01 MelvinBot

Current assignee @stitesExpensify is eligible for the Exported assigner, not assigning anyone new.

MelvinBot avatar Jan 26 '22 23:01 MelvinBot

Could you attach reproduce video again? I can't replicate on my side. I tested the latest main branch.

railway17 avatar Jan 28 '22 17:01 railway17

@railway17 are you able to replicate this on production?

rushatgabhane avatar Jan 29 '22 02:01 rushatgabhane

@rushatgabhane I didn't test in production. But is it possible to test in product with my personal account?

I've contributed to 1 issue in Expensify, but not sure I can test in prod or not.... In the issue replication, I am not clear what reopened account is.

Just tried the below steps: login, request, cancel, logout, re-login, open direct chat. But can't replicate. My replication flow is correct?

railway17 avatar Jan 29 '22 03:01 railway17

@railway17 Thanks for the details! For reopening the account, you first need to close it.

To close: settings -> security -> close account. To reopen: just sign in to the same account

rushatgabhane avatar Jan 29 '22 03:01 rushatgabhane

https://user-images.githubusercontent.com/29966461/151646629-762047e7-bd76-4af8-9763-76702acf3aa4.mp4

@rushatgabhane I can't see any option to close the account.

railway17 avatar Jan 29 '22 04:01 railway17

@railway17 can you try it in production (new.expensify.com) I'm not sure why you can't see close account page as it isn't hidden in any beta.

rushatgabhane avatar Jan 29 '22 04:01 rushatgabhane

@rushatgabhane Ok, I can see and replicate it in production. Looks like latest main is not same with current prod. I can't see Close Account in en.js Let me try to find which commit is current prod

railway17 avatar Jan 29 '22 04:01 railway17

@railway17 main has close account feature. you might need to sync your fork if you're testing on it 😄

rushatgabhane avatar Jan 29 '22 04:01 rushatgabhane

@rushatgabhane I have another question. Let's assume that this issue is fixed and there was $500 requested money before closing the account. When login reopened account, this amount should be kept?

The current action result is that old money is reset to 0 when login and requesting another money. But Expected result doesn't mention about keeping old total requested money

railway17 avatar Jan 29 '22 12:01 railway17

FYI @railway17 @rushatgabhane is OOO at the moment, i'm sure he'll respond when he's back

stitesExpensify avatar Feb 08 '22 23:02 stitesExpensify

@railway17 woah, sorry for being so late to respond.

Let's assume that this issue is fixed and there was $500 requested money before closing the account. When login reopened account, this amount should be kept?

No, the amount shouldn't be kept because all expense data is deleted by expensify (as per the email received on deletion).

rushatgabhane avatar Feb 09 '22 16:02 rushatgabhane

@stitesExpensify I think this is an issue that should be fixed on the backend.

rushatgabhane avatar Feb 09 '22 16:02 rushatgabhane

I think this is an issue that should be fixed on the backend.

@stitesExpensify gentle bump ^^

rushatgabhane avatar Feb 14 '22 16:02 rushatgabhane

Sorry for the late response. Just to make sure I'm following @rushatgabhane, are you suggesting that we should just delete all pending money requests at the time an account is closed?

stitesExpensify avatar Feb 15 '22 23:02 stitesExpensify

@stitesExpensify really sorry for the late reply, I missed this one.

My assumption: when an account is closed, all IOU requests (cancelled or not cancelled) are deleted on the server side. Which explains why the IOU preview returns 404 for a reopened account.

This image backs my assumption. image

Only the report (chat) history is preserved for a deleted account.

Solution

One solution could be to remove IOU previews from all reports of the deleted account, which ofc should be done on the backend. I hope I'm making sense.


https://user-images.githubusercontent.com/29673073/154583699-52fe267d-1151-4020-af8f-ea980ff8d2bf.mp4

rushatgabhane avatar Feb 17 '22 22:02 rushatgabhane

I think #7435 and this is the same issue so Ig we should close #7435. Quick question:- #7435 was reported in slack before this issue but took time to get logged so is this eligible for reporting bonus (https://expensify.slack.com/archives/C01GTK53T8Q/p1642285631499100) cc: @stitesExpensify

Tushu17 avatar Feb 25 '22 09:02 Tushu17

Hmm @Tushu17 is this the same issue? In your case it looks like you can still see the IOU, whereas here it is an endless spinner. Is it just because you hadn't refreshed maybe?

stitesExpensify avatar Feb 25 '22 17:02 stitesExpensify

@stitesExpensify Yeah it's same but there is a little difference about loading spinner. To repro loading spinner case, You need to delete your account and have to reopen it. But when the other user request money and deletes his account loading spinner doesn't show up. the similar thing between both is that in both you get error message when trying to see the details and I guess solving one will also solve the other.

Tushu17 avatar Feb 25 '22 17:02 Tushu17

Gotcha. In that case yes, I think that you would qualify for the reporting bonus

stitesExpensify avatar Feb 25 '22 17:02 stitesExpensify

I also agree with @rushatgabhane that this is an internal issue, so I'm removing the help wanted and external labels

stitesExpensify avatar Feb 25 '22 17:02 stitesExpensify

Going to remove my assignment in that case too @stitesExpensify

MitchExpensify avatar Feb 25 '22 19:02 MitchExpensify

No update due to OOO

stitesExpensify avatar Mar 09 '22 20:03 stitesExpensify

Started a slack conversation about this issue, apparently the requests should not be deleted when you delete the account so this is actually a different bug than we originally thought. Looking into it more this week

stitesExpensify avatar Mar 21 '22 16:03 stitesExpensify

Okay so when you close an account we retract all of your processing reports here and then when we get to auth we delete all open, non-processing reports here. To me this seems like the expected behavior. Is that not the case @iwiznia ?

stitesExpensify avatar Mar 21 '22 21:03 stitesExpensify

Well, it is the expected behavior for oldDot, but causes problems in newDot, so maybe we need to change it, because reports in newDot are never in closed state and processing is a totally valid "final" state for a report.

iwiznia avatar Mar 21 '22 22:03 iwiznia