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

[$250] Reports w/ 404 are stuck in LHN #45551

Closed
1 of 6 tasks
m-natarajan opened this issue Jul 17, 2024 · 52 comments
Closed
1 of 6 tasks

[$250] Reports w/ 404 are stuck in LHN #45551

m-natarajan opened this issue Jul 17, 2024 · 52 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 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 Needs Reproduction Reproducible steps needed

Comments

@m-natarajan
Copy link

m-natarajan commented Jul 17, 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.8-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: @roryabraham
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1721060374459769

Action Performed:

  1. [Alice] Add someone to a room
  2. [Bob] (the room should show up in their LHN)
  3. [Alice] Remove Bob from the room
  4. [Bob] Click on the room

Expected Result:

You should see a Hmmm it's not here (404 error), then when you navigate away the report should disappear from the LHN.

Actual Result:

You see a Hmmm it's not here, but the report is stuck in your LHN with a red dot (RBR indicator), and can't be cleared.

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

image (26)

Recording.337.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~016fe03af3d662fd8f
  • Upwork Job ID: 1816184301014111029
  • Last Price Increase: 2024-09-25
Issue OwnerCurrent Issue Owner: @ikevin127
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

Triggered auto assignment to @strepanier03 (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.

@melvin-bot melvin-bot bot added the Overdue label Jul 19, 2024
Copy link

melvin-bot bot commented Jul 22, 2024

@strepanier03 Huh... This is 4 days overdue. Who can take care of this?

Copy link

melvin-bot bot commented Jul 24, 2024

@strepanier03 Still overdue 6 days?! Let's take care of this!

@strepanier03
Copy link
Contributor

Working on this now, sorry for the delay.

@melvin-bot melvin-bot bot removed the Overdue label Jul 24, 2024
@strepanier03
Copy link
Contributor

What timing, I have a chat that follows this pattern in my LHN right now that showed up this morning 😂. There's no way to dismiss it and it's stuck with a RBR in my LHN all day so far.

@strepanier03
Copy link
Contributor

Mac/Chrome
image

Here's the Onyx Data for that chat:

{
    "chatType": "",
    "currency": "USD",
    "description": "",
    "hasOutstandingChildRequest": false,
    "hasOutstandingChildTask": false,
    "isCancelledIOU": false,
    "isOwnPolicyExpenseChat": false,
    "isPinned": false,
    "isWaitingOnBankAccount": false,
    "lastActionType": "CREATED",
    "lastActorAccountID": 17680685,
    "lastMessageHtml": "hi",
    "lastMessageText": "hi",
    "lastReadSequenceNumber": 0,
    "lastVisibleActionCreated": "2024-06-26 08:59:07.758",
    "lastVisibleActionLastModified": "2024-06-26 08:56:07.301",
    "managerID": 0,
    "nonReimbursableTotal": 0,
    "notificationPreference": "always",
    "oldPolicyName": "",
    "ownerAccountID": 0,
    "participants": {
        "2644835": {
            "hidden": false
        },
        "17680685": {
            "hidden": false
        }
    },
    "permissions": [
        "read",
        "write"
    ],
    "policyID": "_FAKE_",
    "reportID": "3860266512989981",
    "reportName": "Chat Report",
    "stateNum": 0,
    "statusNum": 0,
    "total": 0,
    "type": "chat",
    "unheldTotal": 0,
    "welcomeMessage": "",
    "writeCapability": "all",
    "isEdited": false,
    "errorFields": {
        "notFound": {
            "1720457339876689": "Report not found",
            "1720478844867650": "Report not found",
            "1721845816001669": "Report not found",
            "1721845828999863": "Report not found",
            "1721845837355611": "Report not found",
            "1721846910100562": "Report not found"
        }
    },
    "lastReadTime": "2024-07-08 22:47:30.782"
}

@strepanier03 strepanier03 added the External Added to denote the issue can be worked on by a contributor label Jul 24, 2024
Copy link

melvin-bot bot commented Jul 24, 2024

Job added to Upwork: https://www.upwork.com/jobs/~016fe03af3d662fd8f

@melvin-bot melvin-bot bot changed the title Reports w/ 404 are stuck in LHN [$250] Reports w/ 404 are stuck in LHN Jul 24, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 24, 2024
Copy link

melvin-bot bot commented Jul 24, 2024

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

@nkdengineer
Copy link
Contributor

Proposal

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

You see a Hmmm it's not here, but the report is stuck in your LHN with a red dot (RBR indicator), and can't be cleared.

What is the root cause of that problem?

After the user is removed from the room, the report data is still present in Onyx and it has a not found error when the removed user clicks on the room again.
That makes hasErrorsOtherThanFailedReceipt is true

const hasErrorsOtherThanFailedReceipt =
doesTransactionThreadReportHasViolations ||
doesReportHaveViolations ||
Object.values(allReportErrors).some((error) => error?.[0] !== Localize.translateLocal('iou.error.genericSmartscanFailureMessage'));
if (ReportUtils.isOneTransactionThread(report.reportID, report.parentReportID ?? '0', parentReportAction)) {

And then here we always put this report in LHN if hasErrorsOtherThanFailedReceipt is true

if (hasErrorsOtherThanFailedReceipt) {
reportsToDisplay.push({
...report,
hasErrorsOtherThanFailedReceipt: true,
});
return;
}

So this report is always displayed in LHN

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

We should check if the report has not found an error we will not push this report here.

if (hasErrorsOtherThanFailedReceipt && !report?.errorFields?.notFound) {

if (hasErrorsOtherThanFailedReceipt) {
reportsToDisplay.push({
...report,
hasErrorsOtherThanFailedReceipt: true,
});
return;
}

Then when we go to shouldReportBeInOptionList check, it already has the check to return false if the report is not found

App/src/libs/ReportUtils.ts

Lines 5531 to 5533 in b0f810d

if (!canAccessReport(report, policies, betas)) {
return false;
}

App/src/libs/ReportUtils.ts

Lines 5373 to 5375 in b0f810d

if (report?.errorFields?.notFound) {
return false;
}

What alternative solutions did you explore? (Optional)

@ikevin127
Copy link
Contributor

@strepanier03 @nkdengineer I cannot reproduce the issue, I followed the steps and the result on my side is:

  • as soon as the invited user [Bob] is removed from the room, the LHN report goes away and if the report is opened while the removal happens -> it also goes away and [Bob] is redirected to last report (e.g. Concierge).

Note: The room was freshly created when I attempted reproducing.

Here's a video of how it looks on my side:

Web: Chrome / Safari
web.mov

To me ^ this looks like the correct and expected behaviour, meaning: silently being removed, without any Not found page being shown or RBR errors.

If anyone has clear / more detailed steps as to how this can be consistently reproduced, please let me know so we can move forward with a fix.

Otherwise, I'd add the Needs Reproduction label and have a few other prople try reproducing this and if no dice then close as non-reproducible (probably BE pusher event related [not removing the data correctly from {Bob}]).

cc @roryabraham (since you reported this)

@roryabraham
Copy link
Contributor

@strepanier03 are you still able to reproduce this?

@nkdengineer
Copy link
Contributor

I can't reproduce it now. Yesterday, when the user was removed, the user didn't receive any pusher data so we can reproduce this bug. But now, the pusher data clears the report data and then this issue cannot be reproduced.

Screenshot 2024-07-26 at 13 13 23

Copy link

melvin-bot bot commented Jul 29, 2024

@strepanier03, @ikevin127 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
@ikevin127
Copy link
Contributor

Needs Reproduction

@melvin-bot melvin-bot bot removed the Overdue label Jul 29, 2024
Copy link

melvin-bot bot commented Jul 31, 2024

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

Copy link

melvin-bot bot commented Jul 31, 2024

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

@roryabraham roryabraham added the Needs Reproduction Reproducible steps needed label Jul 31, 2024
@MelvinBot
Copy link

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

@melvin-bot melvin-bot bot added the Overdue label Aug 30, 2024
@ikevin127
Copy link
Contributor

Needs Reproduction - callback on #45551 (comment) / #45551 (comment).

@melvin-bot melvin-bot bot removed the Overdue label Aug 30, 2024
Copy link

melvin-bot bot commented Sep 3, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Sep 3, 2024
@ikevin127
Copy link
Contributor

Needs Reproduction - callback on #45551 (comment) / #45551 (comment).

@melvin-bot melvin-bot bot removed the Overdue label Sep 3, 2024
Copy link

melvin-bot bot commented Sep 4, 2024

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

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

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

melvin-bot bot commented Sep 9, 2024

@strepanier03, @ikevin127 Huh... This is 4 days overdue. Who can take care of this?

@ikevin127
Copy link
Contributor

Looks like issue is not reproducible anymore (reference).

@melvin-bot melvin-bot bot removed the Overdue label Sep 9, 2024
Copy link

melvin-bot bot commented Sep 11, 2024

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

@mvtglobally
Copy link

Issue not reproducible during KI retests. (Second week)

@melvin-bot melvin-bot bot added the Overdue label Sep 13, 2024
Copy link

melvin-bot bot commented Sep 13, 2024

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

@ikevin127
Copy link
Contributor

Looks like issue is not reproducible anymore (reference, 2nd week test reference).

@melvin-bot melvin-bot bot removed the Overdue label Sep 14, 2024
Copy link

melvin-bot bot commented Sep 17, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Sep 17, 2024
Copy link

melvin-bot bot commented Sep 18, 2024

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

@ikevin127
Copy link
Contributor

ikevin127 commented Sep 18, 2024

Looks like issue is not reproducible anymore (reference, 2nd week test reference).

@strepanier03 Maybe we can close this, wdyt ?

@melvin-bot melvin-bot bot removed the Overdue label Sep 18, 2024
Copy link

melvin-bot bot commented Sep 24, 2024

@strepanier03, @ikevin127 Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot melvin-bot bot added the Overdue label Sep 24, 2024
@ikevin127
Copy link
Contributor

Looks like issue is not reproducible anymore (reference, 2nd week test reference).

@strepanier03 Maybe we can close this, wdyt ?

@melvin-bot melvin-bot bot removed the Overdue label Sep 24, 2024
Copy link

melvin-bot bot commented Sep 25, 2024

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

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. Daily KSv2 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 Needs Reproduction Reproducible steps needed
Projects
No open projects
Status: No status
Development

No branches or pull requests

7 participants