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

[HOLD for payment 2024-11-22] [$250] Search - Not here page appears when selecting a non-existing user and then going online #51651

Closed
1 of 8 tasks
lanitochka17 opened this issue Oct 29, 2024 · 27 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 29, 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.55-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5140184
Email or phone of affected tester (no customers): applausetester+bm176@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Go offline
  3. Click on the search icon at the top right
  4. Search for a non-existing user
  5. Click on the search result
  6. Go online

Expected Result:

Not here page should not appear, and the chat with the non-existing user should remain visible

Actual Result:

Not here page appears when going online, which contradicts the behavior when performing these steps while online

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6649175_1730198793234.1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021851703015510861438
  • Upwork Job ID: 1851703015510861438
  • Last Price Increase: 2024-10-30
  • Automatic offers:
    • dukenv0307 | Contributor | 104740405
    • NJ-2020 | Contributor | 104800732
Issue OwnerCurrent Issue Owner: @isabelastisser
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 29, 2024
Copy link

melvin-bot bot commented Oct 29, 2024

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

@lanitochka17
Copy link
Author

@isabelastisser FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave-control

@NJ-2020
Copy link
Contributor

NJ-2020 commented Oct 29, 2024

Same RCA as #51473

@isabelastisser isabelastisser added 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 labels Oct 30, 2024
@melvin-bot melvin-bot bot changed the title Search - Not here page appears when selecting a non-existing user and then going online [$250] Search - Not here page appears when selecting a non-existing user and then going online Oct 30, 2024
Copy link

melvin-bot bot commented Oct 30, 2024

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

Copy link

melvin-bot bot commented Oct 30, 2024

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

@isabelastisser
Copy link
Contributor

Heads up, I will be OOO from Oct 31 until Nov 4, so please re-apply the Bug label and assign a new member if needed. Thanks!

@mkhutornyi
Copy link
Contributor

I'll also be OOO soon so please reassign C+

@mkhutornyi mkhutornyi removed their assignment Oct 30, 2024
@NJ-2020
Copy link
Contributor

NJ-2020 commented Oct 31, 2024

Proposal

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

Search - Not here page appears when selecting a non-existing user and then going online

What is the root cause of that problem?

It shows 404 page not found because we did not pass the emailList value when requesting to the OpenReport API after changing from offline to online
Screenshot 2024-10-27 at 07 08 36
It's because when we select a non-existing user, the OpenReport API get called 2 times, first opening the non-existing user using OpenReport API params with emailList value from the search modal and the second time for viewing the report chat

const createGroup = useCallback(() => {
if (!newGroupDraft) {
return;
}
const logins: string[] = (newGroupDraft.participants ?? []).map((participant) => participant.login);
Report.navigateToAndOpenReport(logins, true, undefined, newGroupDraft.reportName ?? '', newGroupDraft.avatarUri ?? '', avatarFile, optimisticReportID.current, true);
}, [newGroupDraft, avatarFile]);

After this PR #51093 we will replace duplicated OpenReport requests if the request.command and the report id is equal meaning it will replace the previous request with the latest one(viewing the report chat) if the report id and the request command is same, which will remove the emailList value (selecting the non-existing user)
checkAndFixConflictingRequest: (persistedRequests) =>
resolveDuplicationConflictAction(persistedRequests, (request) => request.command === WRITE_COMMANDS.OPEN_REPORT && request.data?.reportID === reportID),

So when we select non-existing user on offline mode and then go to online mode, we check if there's any duplicated API requests it will replace the previous request since the request command and the report id is same which will remove the emailList value which causing 404 page not found

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

We should also check if the previous request and the currentRequest if the emailList is same, then we will replace the previous request

API.paginate(CONST.API_REQUEST_TYPE.WRITE, WRITE_COMMANDS.OPEN_REPORT, parameters, {optimisticData, successData, failureData}, paginationConfig, {
    checkAndFixConflictingRequest: (persistedRequests) =>
        resolveDuplicationConflictAction(persistedRequests, (request) => request.command === WRITE_COMMANDS.OPEN_REPORT && request.data?.reportID === reportID && request.data?.emailList ===  parameters.emailList),
});

We can check also for other param like accountIDList if needed

Result

Screen.Recording.2024-10-30.at.18.41.15.mov

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Nov 1, 2024
@dukenv0307
Copy link
Contributor

dukenv0307 commented Nov 4, 2024

@isabelastisser I can take this issue as C+

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 4, 2024
Copy link

melvin-bot bot commented Nov 4, 2024

📣 @dukenv0307 🎉 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 📖

@melvin-bot melvin-bot bot removed the Overdue label Nov 4, 2024
@dukenv0307
Copy link
Contributor

@NJ-2020's proposal LGTM

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Nov 5, 2024

Triggered auto assignment to @lakchote, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@dukenv0307
Copy link
Contributor

@lakchote Can you please take a look at this issue when you have a chance? Thanks

@lakchote
Copy link
Contributor

lakchote commented Nov 8, 2024

@NJ-2020's proposal LGTM.

Copy link

melvin-bot bot commented Nov 8, 2024

📣 @NJ-2020 🎉 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 📖

@melvin-bot melvin-bot bot added the Overdue label Nov 11, 2024
Copy link

melvin-bot bot commented Nov 11, 2024

@lakchote, @isabelastisser, @NJ-2020, @dukenv0307 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 Overdue labels Nov 12, 2024
@NJ-2020
Copy link
Contributor

NJ-2020 commented Nov 12, 2024

PR ready

cc: @dukenv0307

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 15, 2024
@melvin-bot melvin-bot bot changed the title [$250] Search - Not here page appears when selecting a non-existing user and then going online [HOLD for payment 2024-11-22] [$250] Search - Not here page appears when selecting a non-existing user and then going online Nov 15, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 15, 2024
Copy link

melvin-bot bot commented Nov 15, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Nov 15, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.62-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-11-22. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Nov 15, 2024

@dukenv0307 @isabelastisser @dukenv0307 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 22, 2024
@isabelastisser
Copy link
Contributor

isabelastisser commented Nov 22, 2024

Payment summary:

Payment made in Upwork to @NJ-2020 - contributor $250

@dukenv0307, payment pending in NewDot - $250 C+.

@dukenv0307
Copy link
Contributor

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production
  • 2b. Reported on staging (deploy blocker)
  • 2c. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] 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: https://github.com/Expensify/App/pull/51093/files#r1855741040

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. Yes

Regression Test Proposal Template
  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Test:

  1. Open Expensify app
  2. Go offline
  3. Click on the search icon at the top right
  4. Search for a non-existing user
  5. Click on the search result
  6. Go online
  7. Make sure the not here page should not appear

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added the Overdue label Nov 25, 2024
@dukenv0307
Copy link
Contributor

@dukenv0307, please accept the offer in Upwork and I will process the payment. Thanks!

Hey @isabelastisser I'll request payment via NewDot.

@isabelastisser
Copy link
Contributor

Payment summary.

@melvin-bot melvin-bot bot removed the Overdue label Nov 25, 2024
@isabelastisser
Copy link
Contributor

All set!

@JmillsExpensify
Copy link

$250 approved for @dukenv0307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
Status: Done
Development

No branches or pull requests

7 participants