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

[$1000] Report preview action does not have a body if an error occurs or if offline #21119

Closed
6 tasks done
kbecciv opened this issue Jun 20, 2023 · 28 comments
Closed
6 tasks done
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

@kbecciv
Copy link

kbecciv commented Jun 20, 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!


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
    In the secondary device Split a bill with 2 users, this should create a new group and 2 new 1:1 conversations
  3. In the main testing device (should be offline) create the SAME split bill with the 2 users
  4. Navigate to any 1:1 report
  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.

Expected Result:

The report preview action should still show "me@example.com owes $500"

Actual Result:

The report preview action shows no body

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.26-4

Reproducible in staging?: n/a

Reproducible in production?: n/a

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

image (72)

image (71)

Expensify/Expensify Issue URL:

Issue reported by: @therealsujitk

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686655622360139

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~012f148a3614fc6378
  • Upwork Job ID: 1672274061316292608
  • Last Price Increase: 2023-07-07
@kbecciv kbecciv added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Jun 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 20, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 20, 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 Jun 20, 2023

Proposal

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

The Report Preview Action has no body when offline or if the report action failed.

What is the root cause of that problem?

This is because the html field is set to an empty string when the action is being created.

html: '',

And lodashGet() takes that value to be rendered.

{lodashGet(message, 'html', props.translate('iou.payerOwesAmount', {payer: managerName, amount: reportAmount}))}

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

Instead of the default value being an empty string, we could set it to the string that should be displayed "me@example.com owes $500" for html and for text similar to how it's done here.

message: [
    {
        html: `${payerEmail} owes ${formattedTotal}`,
        text: `${payerEmail} owes ${formattedTotal}`,
        isEdited: false,
        type: CONST.REPORT.MESSAGE.TYPE.COMMENT,
    },
],

The lastMessageText can also be set for the report as a consequence of using this method.

What alternative solutions did you explore? (Optional)

  • Another way to fix this is to set the value for html to null. This will force lodashGet() to display a message from it's default parameter until the field gets updated from Pusher. However this is not a great method since the LHN would still show "This is the beginning..." or whatever the last message was.

@therealsujitk
Copy link
Contributor

Simpler way to reproduce

  1. Disable internet on your device or in preferences.
  2. Create a split with new members.
  3. Navigate to any 1:1 chat report created by this split.

@melvin-bot melvin-bot bot added the Overdue label Jun 22, 2023
@anmurali anmurali added the External Added to denote the issue can be worked on by a contributor label Jun 23, 2023
@melvin-bot melvin-bot bot changed the title Report preview action does not have a body if an error occurs or if offline [$1000] Report preview action does not have a body if an error occurs or if offline Jun 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

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

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

melvin-bot bot commented Jun 23, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

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

@anmurali
Copy link

I get the 1:1 reports with an error (red dot) but there is no error message in the reports

@melvin-bot melvin-bot bot removed the Overdue label Jun 23, 2023
@therealsujitk
Copy link
Contributor

therealsujitk commented Jun 23, 2023

@anmurali Can you share a screenshot? If the 1:1 chat is already existing then yes there won't be an error message (I worked on that PR), but if it's a new chat report it should show an error message.

@mananjadhav
Copy link
Collaborator

mananjadhav commented Jun 26, 2023

I am not able to reproduce this. The steps that I followed:

  1. In a group chat, I went offline.
  2. Go to Actions menu -> Click on Split Bill
  3. Follow the Split bill process
  4. Go to individual chats and check the IOU.

@kbecciv Is this still reproducible?

image Screenshot 2023-06-26 at 11 27 31 AM

@therealsujitk
Copy link
Contributor

therealsujitk commented Jun 26, 2023

@mananjadhav you're supposed to go the the one-one report, not the IOU report. When you create a split with multiple people, you get a group chat, individual chat reports (one-one report) with each user and individual IOU reports with each user. Additionally, you might have to make the split with new users.

248676946-4fd43a25-9704-4040-aae2-41382b9910ba

@mananjadhav
Copy link
Collaborator

@therealsujitk I checked both. For a new group chat I am unable to split bill at all.

Screen.Recording.2023-06-26.at.12.00.10.PM.mov

@therealsujitk
Copy link
Contributor

therealsujitk commented Jun 26, 2023

@mananjadhav this looks like a new bug that needs to be reported, it's different from this issue thought. Here's a video on how to reproduce it.

Screen.Recording.2023-06-26.at.1.22.19.PM.mov

@therealsujitk
Copy link
Contributor

therealsujitk commented Jun 26, 2023

@mananjadhav I was able to reproduce the issue in your recording, it will have to be added to #expensify-bugs.

Edit: Looks like it's been raised here.

@melvin-bot melvin-bot bot added the Overdue label Jun 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 29, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 30, 2023

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

@anmurali
Copy link

anmurali commented Jul 3, 2023

@mananjadhav do we have any viable proposals for this issue that you favor?

@melvin-bot melvin-bot bot removed the Overdue label Jul 3, 2023
@mananjadhav
Copy link
Collaborator

@anmurali I wasn't able to reproduce this earlier last week. I'll check this once again tomorrow and comment if the above proposal works.

@therealsujitk
Copy link
Contributor

@mananjadhav when you're free can you try the steps from the video in this comment - #21119 (comment)

@mananjadhav
Copy link
Collaborator

Thanks for the patience here @therealsujitk. I am sorry buddy but I followed the steps and I still can't reproduce. @kbecciv Are you able to reproduce?

image

@therealsujitk
Copy link
Contributor

therealsujitk commented Jul 4, 2023

@mananjadhav this might have been fixed recently, in your earlier screenshot (#21119 (comment)) this was reproducible.

@melvin-bot
Copy link

melvin-bot bot commented Jul 4, 2023

@mananjadhav @anmurali 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!

@therealsujitk
Copy link
Contributor

therealsujitk commented Jul 4, 2023

The PR #20446 seems to have resolved this issue, but this issue isn't a duplicate of the linked issue (#19301). Is a reporting bonus applicable here?

@melvin-bot melvin-bot bot added the Overdue label Jul 6, 2023
@mananjadhav
Copy link
Collaborator

I am not sure about the reporting bonus @therealsujitk. I'll let @anmurali take care of that. But as I said this isn't reproducible anymore. We should close this one out.

@melvin-bot melvin-bot bot removed the Overdue label Jul 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 7, 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 Jul 10, 2023
@anmurali
Copy link

Why not! Here is your offer and I will pay when you accept but closing this issue

@melvin-bot melvin-bot bot removed the Overdue label Jul 10, 2023
@therealsujitk
Copy link
Contributor

Thank you @anmurali, I've accepted the offer.

@therealsujitk
Copy link
Contributor

Hi @anmurali, just reminding you about this one.

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

No branches or pull requests

4 participants