Skip to content

[BONUS PAYOUT ONLY] [$1000] Chat - Redundant "Unexpected error" below the IOU" message after split from 2 devices #18839

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

Closed
3 of 6 tasks
kbecciv opened this issue May 12, 2023 · 81 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

@kbecciv
Copy link

kbecciv commented May 12, 2023

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:

  1. Log in with the same account in the main testing device and a secondary device
  2. Disable the internet connection in the main testing device
  3. In the secondary device Split a bill with 2 users, this should create a new group and 2 new 1:1 conversations
  4. In the main testing device (should be offline) create the SAME split bill with the 2 users
  5. Enable the internet connection in the main testing device. The split bill request will be sent and you will get an error in the main device only.
  6. Duplicated chats are display in the LHN
  7. Open any dup chat with red dot

Expected Result:

PR #18328
says "We shouldn't need to use a generic error message for failure data for the request money / send money flow when creating a New Chat, just like split bill. Otherwise, it will just be redundant with the error sent by the API.". And step 8 of the PR says "Make sure there is no "Unexpected error" below the IOU" (second error message).
In scenario above (steps) as chat is invalid then no need for second redundant message under IOU

Actual Result:

Second redundant "unexpected error" message under IOU is displayed.
is redundant, he second error message under IOU is redundant as chat is invalid and will be deleted.

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.13.0

Reproducible in staging?: Yes

Reproducible in production?: Yes

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

Notes/Photos/Videos: Any additional supporting documentation

Bug6052638_video_45.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0136c6f52250bef4a6
  • Upwork Job ID: 1658967606698582016
  • Last Price Increase: 2023-06-09
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 12, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 12, 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

@therealsujitk
Copy link
Contributor

therealsujitk commented May 14, 2023

Proposal

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

The issue here is each ReportActionItem displays an error even if the report is invalid, in which case only one error is sufficient.

What is the root cause of that problem?

The problem is we are displaying the error without checking if the report is valid or not in the code below.

<OfflineWithFeedback
onClose={() => ReportActions.clearReportActionErrors(this.props.report.reportID, this.props.action)}
pendingAction={this.props.draftMessage ? null : this.props.action.pendingAction}
errors={this.props.action.errors}
errorRowStyles={[styles.ml10, styles.mr2]}
needsOffscreenAlphaCompositing={this.props.action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU}

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

To fix this, we simply check if the report is valid and use it to decide whether to display error messages or not.

const isReportValid = !lodashGet(this.props.report, 'errorFields.addWorkspaceRoom') && !lodashGet(this.props.report, 'errorFields.createChat');
<OfflineWithFeedback
    onClose={() => ReportActions.clearReportActionErrors(this.props.report.reportID, this.props.action)}
    pendingAction={this.props.draftMessage ? null : this.props.action.pendingAction}
    errors={this.props.action.errors}
    shouldShowErrorMessages={isReportValid}     // Added this line
    errorRowStyles={[styles.ml10, styles.mr2]}
    needsOffscreenAlphaCompositing={this.props.action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU}
>...</OfflineWithFeedback>

image

What alternative solutions did you explore? (Optional)

  • We can remove the error field in failureData if a new report is being created but failed and create a forceOpacity prop in the OfflineWithFeedback component to force the opacity effect.
  • We can set the error field's timestamp to null and render the error message if it is not null.

@mountiny
Copy link
Contributor

cc @yuwenmemon would you be bale to handle this one since it seems like related to your PR, thanks!

@melvin-bot melvin-bot bot added the Overdue label May 14, 2023
@jliexpensify
Copy link
Contributor

Not overdue, waiting on input from @yuwenmemon

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels May 15, 2023
@jliexpensify
Copy link
Contributor

Not overdue, waiting on Yuwen's input

@melvin-bot melvin-bot bot removed the Overdue label May 17, 2023
@yuwenmemon yuwenmemon self-assigned this May 17, 2023
@yuwenmemon
Copy link
Contributor

@therealsujitk's proposal seems good to me.

@yuwenmemon yuwenmemon added the External Added to denote the issue can be worked on by a contributor label May 17, 2023
@melvin-bot melvin-bot bot changed the title Chat - Redundant "Unexpected error" below the IOU" message after split from 2 devices [$1000] Chat - Redundant "Unexpected error" below the IOU" message after split from 2 devices May 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 17, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 17, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 17, 2023

📣 @therealsujitk You have been assigned to this job by @yuwenmemon!
Please apply to this job in Upwork 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
Copy link

melvin-bot bot commented May 17, 2023

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

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

melvin-bot bot commented May 17, 2023

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

@jliexpensify
Copy link
Contributor

Invited @parasharrajat , @therealsujitk - can you share your Upworks profile?

@therealsujitk
Copy link
Contributor

therealsujitk commented May 17, 2023

Sure, [redacted]

@therealsujitk
Copy link
Contributor

@parasharrajat & @yuwenmemon, I'm not sure if you were notified of my mention in the PR since you aren't assigned to it yet. Can you kindly take a look at the suggested changes I've made in my PR and if I should go through with it. I'd like to get your opinion before the weekend so there's time for you to review the PR by monday.

@parasharrajat
Copy link
Member

I will check this today.

@melvin-bot
Copy link

melvin-bot bot commented Jun 16, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @therealsujitk got assigned: 2023-05-17 22:48:00 Z
  • when the PR got merged: 2023-06-16 17:45:51 UTC
  • days elapsed: 22

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jun 21, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Chat - Redundant "Unexpected error" below the IOU" message after split from 2 devices [HOLD for payment 2023-06-28] [$1000] Chat - Redundant "Unexpected error" below the IOU" message after split from 2 devices Jun 21, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.29-11 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 2023-06-28. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 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:

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

@s77rt
Copy link
Contributor

s77rt commented Jun 21, 2023

@jliexpensify
Copy link
Contributor

jliexpensify commented Jun 22, 2023

@yuwenmemon all good with no regression test?

@yuwenmemon
Copy link
Contributor

Good with me

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 27, 2023
@jliexpensify
Copy link
Contributor

Paying now!

@therealsujitk
Copy link
Contributor

therealsujitk commented Jun 29, 2023

@jliexpensify @yuwenmemon can a bonus be considered for this one since there were no further changes after the three day period and the only delay was the final review.

  • June 12, 5:12 PM (UTC) - Assigned to me
  • June 14, 6:51 PM (UTC) - Last commit with no further changes
  • June 15, 10:46 AM (UTC) - C+ Reviewed & Approved
  • June 15, 5:12 PM (UTC) - 3-day period ended
  • June 16, 5:45 PM (UTC) - Approved & Merged

@jliexpensify
Copy link
Contributor

Hmm weird - I was going off this. Is that not correct?

@therealsujitk
Copy link
Contributor

therealsujitk commented Jun 29, 2023

Ah @jliexpensify the reason for that is because I was assigned to this before and then unassigned because we decided to go with a different approach and was assigned again here.

@MelvinBot took the first time I was assigned instead of the last, I've already reported this and was told it'll be fixed.

@jliexpensify jliexpensify reopened this Jul 3, 2023
@jliexpensify
Copy link
Contributor

Ok, going to re-open this. @s77rt you should then also qualify for a $500 bonus too - can you confirm that @therealsujitk 's timeline is correct?

@jliexpensify jliexpensify changed the title [HOLD for payment 2023-06-28] [$1000] Chat - Redundant "Unexpected error" below the IOU" message after split from 2 devices [BONUS PAYOUT ONLY] [$1000] Chat - Redundant "Unexpected error" below the IOU" message after split from 2 devices Jul 3, 2023
@s77rt
Copy link
Contributor

s77rt commented Jul 3, 2023

@jliexpensify Yes, that timeline is correct

@jliexpensify
Copy link
Contributor

Ok @s77rt and @therealsujitk i'll whip up a job to pay the extra $500.

@jliexpensify
Copy link
Contributor

Job - https://www.upwork.com/jobs/~01346cf257dfdd21bd

Invited both!

@s77rt
Copy link
Contributor

s77rt commented Jul 3, 2023

@jliexpensify Accepted! Thanks!

@therealsujitk
Copy link
Contributor

therealsujitk commented Jul 4, 2023

@jliexpensify offer accepted, thanks!

@jliexpensify
Copy link
Contributor

Paid and closed job, cheers.

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
None yet
Development

No branches or pull requests

8 participants