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

[$500] IOU - All of the IOU chats disappear when I do the same IOU and turn the connection on #30839

Closed
3 of 6 tasks
kbecciv opened this issue Nov 3, 2023 · 49 comments
Closed
3 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Nov 3, 2023

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: 1.3.95.0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Log in with a new account on device A (main)
  2. Log in with the same account on device B
  3. Disable the internet connection on device A
  4. Split a bill with 2 users on device B
  5. Split the same bill with 2 users on device A
  6. Enable the internet connection on device A
  7. Click/tap on the "back" button on device A

Expected Result:

I should see permanent, duplicated chats of the ones with errors.

Actual Result:

I can only see the chats with errors and they disappear when tapped.

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

Main device
Bug6262197_1699014740468.Main.mp4
Secondary device
Bug6262197_1699014740458.Secondary.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018104751b5e6c6df2
  • Upwork Job ID: 1720420276449742848
  • Last Price Increase: 2023-11-17
  • Automatic offers:
    • ntdiary | Reviewer | 27813512
    • tienifr | Contributor | 27813513
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 3, 2023
@melvin-bot melvin-bot bot changed the title IOU - All of the IOU chats disappear when I do the same IOU and turn the connection on [$500] IOU - All of the IOU chats disappear when I do the same IOU and turn the connection on Nov 3, 2023
Copy link

melvin-bot bot commented Nov 3, 2023

Job added to Upwork: https://www.upwork.com/jobs/~018104751b5e6c6df2

Copy link

melvin-bot bot commented Nov 3, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 3, 2023
Copy link

melvin-bot bot commented Nov 3, 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

Copy link

melvin-bot bot commented Nov 3, 2023

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

@tienifr
Copy link
Contributor

tienifr commented Nov 3, 2023

Proposal

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

  1. I can only see the chats with errors
  2. They disappear when tapped. This causes a very disruptive experience for the user.

What is the root cause of that problem?

  1. I cannot reproduce this issue, it's possible that when tested, the back-end did not send the created reports in ReconnectApp API, so it didn't show.
  2. When we tap on the report, it will call openReport, since the report failed to be created, the openReport will return 403 status and will set the report to null in Onyx, leading to the report showing NotFoundPage, and it disappears from LHN so the user has no idea what was going on.

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

  1. It's not reproducible, so it might just be a transient issue that's already resolved in back-end
  2. We should not call openReport in the report screen if the report failed to be created (we can do this by checking if the report has error in createChat or can also check pendingFields.createChat is add).

This will allow the users to have a chance to read the error message from the back-end, and if the user wants, they can clear the error by click "x" button, which will clear the error data properly.

What alternative solutions did you explore? (Optional)

In 2, an alternative is to modify the openReport method itself to early return if according to the Onyx data, the report is optimistic and failed to be created.

@melvin-bot melvin-bot bot added the Overdue label Nov 6, 2023
Copy link

melvin-bot bot commented Nov 6, 2023

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

@alexpensify
Copy link
Contributor

@ntdiary - when you get a chance, can you please review the proposals? Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Nov 7, 2023
@ntdiary
Copy link
Contributor

ntdiary commented Nov 7, 2023

@ntdiary - when you get a chance, can you please review the proposals? Thanks!

Sure, sorry for the delay, will review later. : )

@ntdiary
Copy link
Contributor

ntdiary commented Nov 7, 2023

I tested this issue using request money from a new user, its root cause is same with split approach (i.e. the action of creating report failed because it was submitted to the server after another creating one).

It looks like an edge case, I think we need to reconfirm the expected result, maybe we can provide some more friendly guidance to the user instead.

  1. Just do not call openReport if the chat creation failed (@tienifr's proposal), this way there would appear to be multiple records in the LHN or search panel, and next should we consider allowing users to delete these error records?

    image
  2. The error message has already clearly indicated the chat creation failed, I personally don't think it's meaningful to persistently display them in the LHN, I'm inclined to filter out these failed ones and only display the successful ones (just for this chat creation failed case).

  3. Or maybe we can merge this creation into the previous successful one on the server side, and then give the frontend a redirect error code?

Just some initial ideas, please feel free to let me know if you have different thoughts. 😂

cc @alexpensify

@tienifr
Copy link
Contributor

tienifr commented Nov 8, 2023

Just do not call openReport if the chat creation failed (@tienifr's proposal), this way there would appear to be multiple records in the LHN or search panel, and next should we consider allowing users to delete these error records?

@ntdiary when the user opens the failed report from the LHN, they'll see the error message, and upon clicking "x" next to the error message, the failed report will be completely removed. I think this is the standard way we handle all server errors in the app and we should keep to that here.

@alexpensify alexpensify added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Nov 9, 2023
Copy link

melvin-bot bot commented Nov 9, 2023

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

This comment was marked as duplicate.

@alexpensify
Copy link
Contributor

Reassigning another 🐛 team member, I'm going OOO until Tuesday, November 14, and will take it back if it's still open by my return date.

@dylanexpensify - Required action from the team:

Please keep an eye out that this one is moving forward and we find a proposal, thanks!

Copy link

melvin-bot bot commented Nov 10, 2023

📣 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 Nov 13, 2023
@ntdiary
Copy link
Contributor

ntdiary commented Nov 13, 2023

@ntdiary when the user opens the failed report from the LHN, they'll see the error message, and upon clicking "x" next to the error message, the failed report will be completely removed. I think this is the standard way we handle all server errors in the app and we should keep to that here.

If I remember correctly, clicking 'x' will only delete that specific message, not the entire report. Are you suggesting making changes just to delete the entire report in this specific case?

@melvin-bot melvin-bot bot removed the Overdue label Nov 13, 2023
@dylanexpensify
Copy link
Contributor

bump @tienifr for reply to above 🙇‍♂️

@nkuoch
Copy link
Contributor

nkuoch commented Nov 24, 2023

Yes, when we try to open an optimistic report that didn't get created due to an error, let's not call openReport. Let's show the report with the error and allow the user to clear it himself.

@nkuoch nkuoch added External Added to denote the issue can be worked on by a contributor and removed Internal Requires API changes or must be handled by Expensify staff labels Nov 24, 2023
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 24, 2023
Copy link

melvin-bot bot commented Nov 24, 2023

Current assignee @ntdiary is eligible for the External assigner, not assigning anyone new.

@nkuoch nkuoch assigned tienifr and unassigned tienifr Nov 24, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 24, 2023
Copy link

melvin-bot bot commented Nov 24, 2023

📣 @ntdiary 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Nov 24, 2023

📣 @tienifr 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@alexpensify
Copy link
Contributor

Catching up from being OOO, it looks like the PR is being worked on and then can go into review. 🥳

@alexpensify
Copy link
Contributor

PR is still in review!

@alexpensify
Copy link
Contributor

Daily Update: PR is in review

@alexpensify
Copy link
Contributor

Daily Update: PR has a few comments but moving forward.

@alexpensify
Copy link
Contributor

Daily Update: The PR has been merged, so we will need to wait on automation here.

@alexpensify
Copy link
Contributor

Daily Update: No automation yet. 🤔

@alexpensify
Copy link
Contributor

@nkuoch can you share if this one is complete? I'm trying to identify if automation failed here and I need to prepare the manual payment process. Thanks!

@alexpensify
Copy link
Contributor

@ntdiary - can you provide feedback if this one is complete? I'm trying to identify why automation has failed here or if it should remain open. Thanks!

@ntdiary
Copy link
Contributor

ntdiary commented Dec 14, 2023

@ntdiary - can you provide feedback if this one is complete? I'm trying to identify why automation has failed here or if it should remain open. Thanks!

@alexpensify, ah, sure, the PR #31903 was deployed to production last week and has passed the regression period. :)
Also, I'm not exactly sure if I need to copy a BugZero Checklist here and fill it out. 😂

@alexpensify
Copy link
Contributor

Ok, thanks, I was OOO last Friday and working on the payment process.

@alexpensify
Copy link
Contributor

Here is the payment summary:

  • External issue reporter - N/A
  • Contributor that fixed the issue - @tienifr $500
  • Contributor+ that helped on the issue and/or PR - @ntdiary $500

Upwork Job: https://www.upwork.com/jobs/~018104751b5e6c6df2

Extra Notes regarding payment: No automation here, so I'll just manually write this one out.

@alexpensify
Copy link
Contributor

@ntdiary - if you can add the checklist details, that will be great and we can close out.

Everyone has been paid in Upwork.

@ntdiary
Copy link
Contributor

ntdiary commented Dec 19, 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:

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

This is a edge case that we didn't consider before, the fix is simple and stable, so I personally feel that it is not necessary to add a regression test. :)

@alexpensify
Copy link
Contributor

I agree then, no regression test is needed here. With this news, I'm going to close out this GH.

@alexpensify
Copy link
Contributor

Thank you for the help here!

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 Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants