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] Joined thread stuck in LHN with a 🔴 and it shows up twice in LHN. #47708

Closed
1 of 6 tasks
m-natarajan opened this issue Aug 20, 2024 · 83 comments
Closed
1 of 6 tasks
Assignees
Labels
AutoAssignerNewDotQuality Used to assign quality issues to engineers 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

Comments

@m-natarajan
Copy link

m-natarajan commented Aug 20, 2024

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


Version Number:
Reproducible in staging?: Needs Reproduction
Reproducible in production?: Needs Reproduction
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: @AndrewGable
Slack conversation: https://expensify.slack.com/archives/C05LX9D6E07/p1724077993452629

Action Performed:

  1. Create a room that userA, userB, and userC are in
  2. Post a comment as userA
  3. As userB go offline
  4. Have userC create a thread on userA's comment, while online
  5. Have userB create a thread on userA's comment, while offline
  6. Have userB come back online

Expected Result:

Thread displayed one time without any error

Actual Result:

RBR displayed with error and thread displayed twice in LHN

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

Add any screenshot/video evidence

Google Chrome 2024-08-19 at 10 32 13
Google Chrome 2024-08-19 at 10 32 29

Onyx Data:

{
    "reportName": "Hey folks! I've reserved a \"Chef's Table\" style dinner for 6 (can maybe expand to as much as 8) at Brochu's Family Tradition Sunday night at 5:30pm! Early dinner because I'm sure we'll all be knackered from our journeys over. Give a ✋ if you're interested in joining!",
    "isOptimisticReport": true,
    "type": "chat",
    "chatType": "policyRoom",
    "isOwnPolicyExpenseChat": false,
    "isPinned": false,
    "lastActorAccountID": 0,
    "lastMessageTranslationKey": "",
    "lastMessageHtml": "",
    "lastReadTime": "2024-08-15 22:13:10.187",
    "lastVisibleActionCreated": "2024-08-15 22:13:10.187",
    "notificationPreference": "hidden",
    "oldPolicyName": "Expensify Chat",
    "ownerAccountID": 0,
    "parentReportActionID": "1849499882279174199",
    "parentReportID": "4569022691530677",
    "participants": {
        "3064822": {
            "hidden": false,
            "role": "admin"
        },
        "3079111": {
            "hidden": false,
            "role": "member"
        }
    },
    "policyID": "063B20AF6F45E248",
    "reportID": "8214043543876468",
    "stateNum": 0,
    "statusNum": 0,
    "description": "",
    "avatarUrl": "",
    "pendingFields": {
        "createChat": "add"
    },
    "errorFields": {
        "createChat": {
            "1723759990438375": "Auth OpenReport returned an error"
        }
    }
}

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ad3492834b7f724d
  • Upwork Job ID: 1827073269001925896
  • Last Price Increase: 2024-11-29
@m-natarajan m-natarajan added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. AutoAssignerNewDotQuality Used to assign quality issues to engineers labels Aug 20, 2024
Copy link

melvin-bot bot commented Aug 20, 2024

Current assignee @AndrewGable is eligible for the AutoAssignerNewDotQuality assigner, not assigning anyone new.

Copy link

melvin-bot bot commented Aug 20, 2024

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

@MelvinBot
Copy link

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

@AndrewGable
Copy link
Contributor

@mallenexpensify - Can you try to reproduce based on those steps?

@muttmuure muttmuure moved this to CRITICAL in [#whatsnext] #quality Aug 20, 2024
@mallenexpensify
Copy link
Contributor

Was partially able to reproduce, which I think is the core bug. ie. After coming back online as User B, I see RBR in the thread and in LHN (I don't see it shown as twice in LHN though)

I was thinking of adding External and asking a C+ to attempt reproduction too, whatcha think?

image

@AndrewGable
Copy link
Contributor

Sounds great!

@melvin-bot melvin-bot bot added the Overdue label Aug 23, 2024
@mallenexpensify mallenexpensify added the External Added to denote the issue can be worked on by a contributor label Aug 23, 2024
@melvin-bot melvin-bot bot changed the title Joined thread stuck in LHN with a 🔴 and it shows up twice in LHN. [$250] Joined thread stuck in LHN with a 🔴 and it shows up twice in LHN. Aug 23, 2024
Copy link

melvin-bot bot commented Aug 23, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01ad3492834b7f724d

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 23, 2024
Copy link

melvin-bot bot commented Aug 23, 2024

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

@mallenexpensify
Copy link
Contributor

@brunovjk can you plz attempt reproduction and share you're findings?

@brunovjk
Copy link
Contributor

brunovjk commented Aug 24, 2024

Was partially able to reproduce, which I think is the core bug. ie. After coming back online as User B, I see RBR in the thread and in LHN (I don't see it shown as twice in LHN though)

I got the same result:
Screenshot 2024-08-24 at 09 09 33

Can we confirm the expected behavior? Should both messages go to a single thread right? In that case, 'message from B' will go to thread from C. I'll investigate further during the week, and I'm also keeping an eye out for proposals. What do you think @mallenexpensify? Thank you :D

@brunovjk
Copy link
Contributor

@mallenexpensify Should we bump into slack to look for proposals?

@mallenexpensify
Copy link
Contributor

@AndrewGable , can you retest to see if you're experiencing both RBR displayed with error and thread displayed twice in LHN as the actual behaviour? (since @brunovjk and I weren't able to reproduce 'displayed twice').

Then, if needed, we can update the OP for actual and expected.

Curious how easy/tough this bug will be to fix.

@ijmalik
Copy link
Contributor

ijmalik commented Aug 28, 2024

Hi @mallenexpensify, @AndrewGable, @brunovjk,

I’m encountering the same behavior as @mallenexpensify mentioned here.

When User-B goes online, they receive the following response. It appears to be an issue on the backend.

OpenReport:

{
    "code": 666,
    "jsonCode": 666,
    "type": "Expensify\\Libs\\Error\\ExpError",
    "UUID": "5CBABCBB-13F3-4535-9AB2-28C50BDDD7A2",
    "message": "Auth OpenReport returned an error",
    "title": "",
    "data": {
        "onyxData": [
            {
                "onyxMethod": "merge",
                "key": "report_8790068615647771",
                "value": {
                    "errorFields": {
                        "createChat": {
                            "1724824587908180": "Auth OpenReport returned an error"
                        }
                    }
                }
            }
        ]
    },
    "htmlMessage": "",
    "onyxData": [
        {
            "onyxMethod": "merge",
            "key": "report_8790068615647771",
            "value": {
                "errorFields": {
                    "createChat": {
                        "1724824587908180": "Auth OpenReport returned an error"
                    }
                }
            }
        }
    ],
    "requestID": "8ba20ee95962d1e0-MCT"
}

AddComment:

{
    "code": 666,
    "jsonCode": 666,
    "type": "Expensify\\Libs\\Error\\ExpError",
    "UUID": "E490CD6D-46BF-4EE2-8B4F-51672557284A",
    "message": "You don't have access to this chat room.",
    "title": "Room not accessible",
    "data": {
        "onyxData": [
            {
                "onyxMethod": "merge",
                "key": "reportActions_8790068615647771",
                "value": {
                    "3613819486451814722": {
                        "errors": {
                            "1724824588672995": "You don't have access to this chat room."
                        }
                    }
                }
            }
        ]
    },
    "htmlMessage": "",
    "onyxData": [
        {
            "onyxMethod": "merge",
            "key": "reportActions_8790068615647771",
            "value": {
                "3613819486451814722": {
                    "errors": {
                        "1724824588672995": "You don't have access to this chat room."
                    }
                }
            }
        }
    ],
    "requestID": "8ba20eee1bb9de43-MCT"
}

@brunovjk
Copy link
Contributor

I investigated, and it does seem to be a response issue. I’ll trigger an internal to review the backend codes for us. 😊

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Aug 28, 2024

Current assignee @AndrewGable is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@brunovjk
Copy link
Contributor

Sorry for the unnecessary tagging above, @AndrewGable. I wasn’t sure if you could assist with the backend codebase.

@melvin-bot melvin-bot bot removed the Overdue label Nov 21, 2024
Copy link

melvin-bot bot commented Nov 22, 2024

📣 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 25, 2024
Copy link

melvin-bot bot commented Nov 25, 2024

@AndrewGable, @mallenexpensify, @brunovjk Whoops! This issue is 2 days overdue. Let's get this updated quick!

@brunovjk
Copy link
Contributor

Not overdue, same as above :D

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Nov 25, 2024
@brunovjk
Copy link
Contributor

I can't reproduce today (28 Nov):

new.expensify.com
prod.mov
dev - v9.0.67-9
lastest_main.mov

@melvin-bot melvin-bot bot removed the Overdue label Nov 28, 2024
Copy link

melvin-bot bot commented Nov 29, 2024

📣 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 Dec 2, 2024
Copy link

melvin-bot bot commented Dec 2, 2024

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

@brunovjk
Copy link
Contributor

brunovjk commented Dec 2, 2024

Same update, I can't reproduce anymore (v9.0.69-1):

Screen.Recording.2024-12-02.at.09.26.19.mov

@melvin-bot melvin-bot bot removed the Overdue label Dec 2, 2024
@brunovjk
Copy link
Contributor

brunovjk commented Dec 2, 2024

@mallenexpensify,

Given that this issue seems primarily backend-related but impacts the frontend, I suggest closing it for now with the option to reopen if necessary.

To ensure regressions don't occur, I propose adding a Jest unit test to simulate the following scenario:

  • Users interact with a thread while some are offline, and data syncs upon reconnection.
    The test would validate proper thread display and prevent message duplications or errors.

Please let me know if you need more details or would prefer a different approach.

Thanks!

@mallenexpensify
Copy link
Contributor

Thanks @brunovjk. Can you add 🎀 👀 🎀 C+ reviewed to a comment to assign an internal engineer to get 👀 before I close? Unsure if it's backend-related if we want to close or try to find someone internal to work on. Thx

Created a test case GH

image

@brunovjk
Copy link
Contributor

brunovjk commented Dec 2, 2024

Thanks @brunovjk. Can you add 🎀 👀 🎀 C+ reviewed to a comment to assign an internal engineer to get 👀 before I close? Unsure if it's backend-related if we want to close or try to find someone internal to work on.

Thank you @mallenexpensify

🎀 👀 🎀

Copy link

melvin-bot bot commented Dec 2, 2024

Current assignee @AndrewGable is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@brunovjk
Copy link
Contributor

brunovjk commented Dec 3, 2024

Update: Initially, the issue seemed tied to the ... LHN, but the symptoms changed over time. Two weeks ago, user C's message disappeared when they came online—no errors, just no trace. This suggests the bug occurs when users interact with a thread while some are offline, and data syncs upon reconnection.

I believe it's a backend issue. We opened an "internal issue", but closed it as it seems fixed now. However, new FE symptoms may reappear, so we propose creating a test for this scenario.

Scenario Recap:

  • Create a room with userA, userB, and userC
  • Post a comment as userA
  • Have userB go offline
  • Have userC create a thread on userA’s comment, while online
  • Have userB create a thread on userA’s comment, while offline
  • Have userB come back online
  • Verify the thread displays only once without any errors

Thoughts, @AndrewGable?

@AndrewGable
Copy link
Contributor

Looks good to me! 👍

@mallenexpensify
Copy link
Contributor

Thanks @brunovjk , it sounds like....

  • We want a test case with the steps above, I created one here
  • The bug should be fixed so we can close this
  • Compensation might be due to @brunovjk based on time you invested here. If you believe so, follow the below from the C+ process doc

Provide brief, yet detailed, reasoning for compensation
State the amount they feel they’re due. Standard percentages are 25, 50 and 100% of the job price.

@brunovjk
Copy link
Contributor

brunovjk commented Dec 6, 2024

Exactly, I care about the Tests, so that the issue doesn't occur, and closing it. We hadn't discussed compensation, I don't mind receiving it, since we've been tracking and testing this issue for months, but I agree with any decision, what I want most is to close this old issue hehe

@mallenexpensify
Copy link
Contributor

@brunovjk how about 25%, $75, since you spent time on the issue and produced the test case steps (but, we didn't have an accepted solution so I don't think 50% is best (based on our process for payments and percentages).

@brunovjk
Copy link
Contributor

brunovjk commented Dec 7, 2024

Perfect :D

@mallenexpensify
Copy link
Contributor

@brunovjk can you please accept the job and reply here once you have?
https://www.upwork.com/jobs/~021865204166194804492

@brunovjk
Copy link
Contributor

brunovjk commented Dec 7, 2024

@brunovjk can you please accept the job and reply here once you have? https://www.upwork.com/jobs/~021865204166194804492

Done @mallenexpensify

@mallenexpensify
Copy link
Contributor

Contributor+: @brunovjk paid $75 via Upwork

Thx!

@github-project-automation github-project-automation bot moved this from Bugs and Follow Up Issues to Done in [#whatsnext] #expense Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoAssignerNewDotQuality Used to assign quality issues to engineers 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
Projects
Status: Done
Development

No branches or pull requests

9 participants