Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
2.99k stars 2.5k forks source link

[HOLD for payment 2024-05-22] [$250] Android - Scan - Uploading corrupt pdf as scan receipt, error not shown under preview #41240

Open lanitochka17 opened 2 weeks ago

lanitochka17 commented 2 weeks ago

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: 1.4.67 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/runs/view/20905&group_by=cases:section_id&group_order=asc&group_id=294998 Issue reported by:Applause - Internal Team

Action Performed:

  1. Launch app
  2. Tap on a workspace report
  3. Tap plus icon -- submit expense -- scan
  4. Upload a corrupt pdf
  5. Tap submit expense

Expected Result:

Error message "Receipt didn't upload, download the file or dismiss this error" under preview must be shown in conversation page

Actual Result:

Error message "Receipt didn't upload, download the file or dismiss this error" under preview not shown in conversation page

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/194662d4-138a-4d02-833f-c878d1edcfc2

default-file-icon

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01020aa616d70323c3
  • Upwork Job ID: 1785345183089377280
  • Last Price Increase: 2024-04-30
Issue OwnerCurrent Issue Owner: @puneetlath
melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to @puneetlath (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 commented 2 weeks ago

@puneetlath 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 commented 2 weeks ago

We think that this bug might be related to #wave-collect - Release 1

bernhardoj commented 2 weeks ago

Proposal

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

The scan request error in transaction thread shows a generic error message instead of "Receipt didn't upload, download the file or dismiss this error".

What is the root cause of that problem?

When we create a new scan request, we set a generic error to the transaction when fails. https://github.com/Expensify/App/blob/2a1c2cb16b9b5234ad05518be46d95d6bcaa2f56/src/libs/actions/IOU.ts#L737-L739

But for the report action, we set the receipt error correctly. https://github.com/Expensify/App/blob/2a1c2cb16b9b5234ad05518be46d95d6bcaa2f56/src/libs/actions/IOU.ts#L753

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

Set the receipt error for the transaction too.

errors: getReceiptError(transaction.receipt, transaction.filename || transaction.receipt?.filename, isScanRequest, errorKey),

We need to do this for other request too such as invoice/track.

melvin-bot[bot] commented 2 weeks ago

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

melvin-bot[bot] commented 2 weeks ago

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

melvin-bot[bot] commented 2 weeks ago

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

fedirjh commented 1 week ago

Thank you @bernhardoj Your Proposal looks good to me.

🎀 👀 🎀 C+ reviewed

melvin-bot[bot] commented 1 week ago

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

bernhardoj commented 1 week ago

PR is ready

cc: @fedirjh

melvin-bot[bot] commented 3 days ago

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

melvin-bot[bot] commented 3 days ago

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

If no regressions arise, payment will be issued on 2024-05-22. :confetti_ball:

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

melvin-bot[bot] commented 3 days ago

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: