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 2025-01-18] [HOLD for payment 2025-01-13] [$250] Add receipt - Unable to upload a receipt size equal or larger than 15mb #53341

Closed
2 of 8 tasks
IuliiaHerets opened this issue Nov 30, 2024 · 36 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

@IuliiaHerets
Copy link

IuliiaHerets commented Nov 30, 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: v9.0.69-1
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): hywnnoj@gmail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Open the Desktop app or go to: https://staging.new.expensify.com/
  2. Click on FAB > Submit expense
  3. Enter an amount, click on 'Next'
  4. Choose any recipient
  5. Click on three dots at top right corner in expense creation screen
  6. Click 'Add receipt'
  7. Select a receipt equal or greater than 15mb.

Expected Result:

The user should be able to upload a receipt size equal or larger than 15mb

Actual Result:

A error message is displayed that the user cannot upload attachments size larger than 24mb.
Error Message: "Attachment is too large - Attachment size is larger than 24 MB limit"

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6680777_1732993930988!USE_THIS_FILE_TO_TEST.pdf

Bug6680777_1732986510146.impossible_to_upload_a_attachment_size_equal_or_larger_than_15mb.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021864335511457372992
  • Upwork Job ID: 1864335511457372992
  • Last Price Increase: 2024-12-04
  • Automatic offers:
    • dominictb | Reviewer | 105279623
Issue OwnerCurrent Issue Owner: @OfstadC
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 30, 2024
Copy link

melvin-bot bot commented Nov 30, 2024

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

@Themoonalsofall
Copy link
Contributor

Themoonalsofall commented Nov 30, 2024

Edited by proposal-police: This proposal was edited at 2024-11-30 20:25:02 UTC.

Proposal

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

Add receipt - Impossible to upload a receipt size equal or larger than 15mb

What is the root cause of that problem?

We are setting RECEIPT_MAX_SIZE = 10485760 in CONST.ts equivalent to 10MB file

RECEIPT_MAX_SIZE: 10485760,

But we are showing message 'Attachment is too large - Attachment size is larger than 24 MB limit'

if (!Str.isImage(file.name ?? '') && (file?.size ?? 0) > CONST.API_ATTACHMENT_VALIDATIONS.RECEIPT_MAX_SIZE) {
setUploadReceiptError(true, 'attachmentPicker.attachmentTooLarge', 'attachmentPicker.sizeExceeded');
return false;
}

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

We can create a new translation for this error like 'Attachment is too large - Attachment size is larger than 10 MB limit'

sizeExceeded: 'Attachment size is larger than 24 MB limit',

Or we can make a function with input is the maximum file size

Note: when changing, we also need to change the native file.

What alternative solutions did you explore? (Optional)

Or we can change the RECEIPT_MAX_SIZE to 24MB

@melvin-bot melvin-bot bot added the Overdue label Dec 3, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Dec 3, 2024

I've been sick the last couple days - trying to tackle as many GHs as I can. Likely won't get to this until tomorrow

@melvin-bot melvin-bot bot removed the Overdue label Dec 3, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Dec 4, 2024

Confirmed - attempted this with 19MB file and it says it's over 24MB 😓
image
image

@OfstadC OfstadC added the External Added to denote the issue can be worked on by a contributor label Dec 4, 2024
@melvin-bot melvin-bot bot changed the title Add receipt - Impossible to upload a receipt size equal or larger than 15mb [$250] Add receipt - Impossible to upload a receipt size equal or larger than 15mb Dec 4, 2024
Copy link

melvin-bot bot commented Dec 4, 2024

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

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

melvin-bot bot commented Dec 4, 2024

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

@OfstadC OfstadC changed the title [$250] Add receipt - Impossible to upload a receipt size equal or larger than 15mb [$250] Add receipt - Unable to upload a receipt size equal or larger than 15mb Dec 4, 2024
@tuyenpthust
Copy link

Proposal

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

Add receipt - When upload receipt will size <= 10Mb, receive a message that can upload a receipt more than 24Mb

What is the root cause of that problem?

We are using constant RECEIPT_MAX_SIZE = 10485760 (10MB) to validate uploaded receipt file size

RECEIPT_MAX_SIZE: 10485760,

But we are using message hard coded message to show attachmentPicker.sizeExceeded.
if (!Str.isImage(file.name ?? '') && (file?.size ?? 0) > CONST.API_ATTACHMENT_VALIDATIONS.RECEIPT_MAX_SIZE) {
setUploadReceiptError(true, 'attachmentPicker.attachmentTooLarge', 'attachmentPicker.sizeExceeded');
return false;
}

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

Use sizeExceededWithValue to show message based on RECEIPT_MAX_SIZE (10MB), the message will be a bit different: Files exceeds ${maxUploadSizeInMB}MB. Please try again.

sizeExceededWithValue: ({maxUploadSizeInMB}: SizeExceededParams) => `Files exceeds ${maxUploadSizeInMB}MB. Please try again.`,

What alternative solutions did you explore? (Optional)

  • Add another constant such as: receiptSizeExceeded: 'Attachment size is larger than 10 MB limit'
  • Change the RECEIPT_MAX_SIZE to 24MB (highly NOT recommend)

Copy link

melvin-bot bot commented Dec 4, 2024

📣 @tuyenpthust! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@tuyenpthust
Copy link

Contributor details
Your Expensify account email: tuyenpt.hust@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~017d79042004e8c0ce

Copy link

melvin-bot bot commented Dec 4, 2024

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@OfstadC
Copy link
Contributor

OfstadC commented Dec 9, 2024

@dominictb Could you review the available proposal(s) by EOD? Thanks so much!

@melvin-bot melvin-bot bot added the Overdue label Dec 9, 2024
@muttmuure muttmuure moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Dec 9, 2024
Copy link

melvin-bot bot commented Dec 10, 2024

@OfstadC, @dominictb Huh... This is 4 days overdue. Who can take care of this?

@dominictb

This comment was marked as outdated.

@Themoonalsofall
Copy link
Contributor

thanks @Beamanator, we have a follow up PR #54728
cc @dominictb

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 6, 2025
@melvin-bot melvin-bot bot changed the title [$250] Add receipt - Unable to upload a receipt size equal or larger than 15mb [HOLD for payment 2025-01-13] [$250] Add receipt - Unable to upload a receipt size equal or larger than 15mb Jan 6, 2025
Copy link

melvin-bot bot commented Jan 6, 2025

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 6, 2025
Copy link

melvin-bot bot commented Jan 6, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.80-6 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 2025-01-13. 🎊

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

Copy link

melvin-bot bot commented Jan 6, 2025

@dominictb @OfstadC @dominictb 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]

@garrettmknight garrettmknight moved this from Bugs and Follow Up Issues to Hold for Payment in [#whatsnext] #expense Jan 7, 2025
@OfstadC
Copy link
Contributor

OfstadC commented Jan 7, 2025

@dominictb Please complete BZ checklist prior to payment date. Thank you 😃

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jan 11, 2025
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2025-01-13] [$250] Add receipt - Unable to upload a receipt size equal or larger than 15mb [HOLD for payment 2025-01-18] [HOLD for payment 2025-01-13] [$250] Add receipt - Unable to upload a receipt size equal or larger than 15mb Jan 11, 2025
Copy link

melvin-bot bot commented Jan 11, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.83-5 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 2025-01-18. 🎊

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

Copy link

melvin-bot bot commented Jan 11, 2025

@dominictb @OfstadC @dominictb 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 Jan 13, 2025
@OfstadC
Copy link
Contributor

OfstadC commented Jan 13, 2025

Friendly bump @dominictb 😃

@dominictb
Copy link
Contributor

dominictb commented Jan 14, 2025

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 (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. 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/50329/files#r1914254078

  • [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: NA

  • [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.

  • [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. Click on FAB > Submit expense
  2. Enter an amount, click on 'Next'
  3. Choose any recipient
  4. Click on three dots at top right corner in expense creation screen
  5. Click 'Add receipt'
  6. Select a receipt whose size is equal or greater than 10mb exclude image receipts
  7. Verify that 'Attachment is too large - Attachment size is larger than 10 MB limit' is displayed

Do we agree 👍 or 👎

@OfstadC
Copy link
Contributor

OfstadC commented Jan 15, 2025

Payment Summary

@Themoonalsofall
Copy link
Contributor

@OfstadC
Copy link
Contributor

OfstadC commented Jan 16, 2025

@Themoonalsofall offer sent

New Upwork Job Post
(Old one expired)

@OfstadC
Copy link
Contributor

OfstadC commented Jan 17, 2025

Payment Summary Updated

@OfstadC OfstadC closed this as completed Jan 17, 2025
@github-project-automation github-project-automation bot moved this from Hold for Payment to Done in [#whatsnext] #expense Jan 17, 2025
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