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-08-19] [$500] No feedback and delay when uploading a large attachment #38478

Closed
1 of 6 tasks
m-natarajan opened this issue Mar 18, 2024 · 124 comments
Closed
1 of 6 tasks
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

@m-natarajan
Copy link

m-natarajan commented Mar 18, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number:
Reproducible in staging?: needs reproduction
Reproducible in production?: needs reproduction
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
Expensify/Expensify Issue URL:
Issue reported by: @neil-marcellini
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1710524006372329

Action Performed:

  1. Use iOS on a slow network connection
  2. Go to any chat
  3. Click the plus button
  4. Add an attachment
  5. Select a video larger than the current limit of 24mb

Expected Result:

"Attachment too large Attachment size is larger than 25 MB limit" popup shows immediately

image

Actual Result:

Nothing happens for quite a while, then you receive a popover explaining that the attachment is too large

Workaround:

unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

RPReplay_Final1710521379.MP4
IMG_6440.MOV

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01398c6a10dbc0b325
  • Upwork Job ID: 1770333731300958208
  • Last Price Increase: 2024-07-17
  • Automatic offers:
    • hoangzinh | Reviewer | 0
    • ShridharGoel | Contributor | 0
Issue OwnerCurrent Issue Owner: @Christinadobrzyn / @Christinadobrzyn
Issue OwnerCurrent Issue Owner: @puneetlath / @Christinadobrzyn
@m-natarajan m-natarajan added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Mar 18, 2024
Copy link

melvin-bot bot commented Mar 18, 2024

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

@ShridharGoel
Copy link
Contributor

ShridharGoel commented Mar 18, 2024

Proposal

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

When uploading a large attachment there is a delay on iOS.

What is the root cause of that problem?

Image picker library is taking time to fetch the result on IOS.

To test it out, I had added logs to check time inside imageLibrary method in the native.ts file of the library.

The time difference was coming between call to launchImageLibrary and getting the result.

Github issue for some discussion on the same: react-native-image-picker/react-native-image-picker#2117

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

Add assetRepresentationMode as current.

const imagePickerOptions = {
    includeBase64: false,
    saveToPhotos: false,
    selectionLimit: 1,
    includeExtra: false,
+  assetRepresentationMode: 'current'
};

@Christinadobrzyn Christinadobrzyn added the External Added to denote the issue can be worked on by a contributor label Mar 20, 2024
Copy link

melvin-bot bot commented Mar 20, 2024

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

@melvin-bot melvin-bot bot changed the title No feedback and delay when uploading a large attachment [$500] No feedback and delay when uploading a large attachment Mar 20, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 20, 2024
@Christinadobrzyn
Copy link
Contributor

I can reproduce this. Here's the GH about increasing the size from 24 MB - #32702

I think this can be external

Copy link

melvin-bot bot commented Mar 20, 2024

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

@ShridharGoel
Copy link
Contributor

Proposal

Updated

@ShridharGoel
Copy link
Contributor

@hoangzinh Kindly have a look at my proposal when possible.

@hoangzinh
Copy link
Contributor

Hi @ShridharGoel I don't think you have a correct RCA. When I put console log in that isValidFile function, it already had size value, so it just read from the object data.
Screenshot 2024-03-21 at 21 35 17

@ShridharGoel
Copy link
Contributor

@hoangzinh If you are using a Simulator, are you able to replicate the issue?

@hoangzinh
Copy link
Contributor

ah nope I can't. Is it only reproducible in a real iphone?

@ShridharGoel
Copy link
Contributor

@hoangzinh It seems like that. I've analysed the issue more - it's related to the image picker taking time. I'll update my proposal.

@ShridharGoel
Copy link
Contributor

Proposal

Updated

@hoangzinh
Copy link
Contributor

hoangzinh commented Mar 22, 2024

@Christinadobrzyn @ShridharGoel what is the file size you used to test? I used a video file with 128MB but it shows up file size error almost immediately

@ShridharGoel
Copy link
Contributor

@hoangzinh Do you have access to a physical iPhone to check?

@hoangzinh
Copy link
Contributor

Yes I do @ShridharGoel

@ShridharGoel
Copy link
Contributor

@hoangzinh Can you check with a 500 MB video maybe?

@situchan Do you have an iPhone? If possible, can you check if you are able to replicate this?

@situchan
Copy link
Contributor

@ShridharGoel I can test on my iPhone. Can you attach or share link to video file you tested?

@ShridharGoel
Copy link
Contributor

@situchan Can you try this? Link

@situchan
Copy link
Contributor

I am seeing "Attachment too large" modal immediately

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Mar 25, 2024

testing this again, I am also seeing the "attachment too large" prompt immediately. So I think this is resolved but I'm just double-checking with @neil-marcellini to make sure this is what is expected.

RPReplay_Final1711332264.MP4

@neil-marcellini
Copy link
Contributor

@Christinadobrzyn that looks like a slightly different flow you tested. I'm consistently able to reproduce with this video, regardless of network speed. I'm on iOS 17.3.1, New Expensify v1.4.50-5

IMG_6440.MOV

@BrtqKr
Copy link
Contributor

BrtqKr commented Jul 22, 2024

@Christinadobrzyn I've been looking into this HEIC issue today. For now it seems like there's a mime type conversion happening for those images at some time. Conversion is a pretty standard approach for the HEIC format, but with assetRepresentationMode property used in there the transcoding is probably skipped and we end up with a broken file. I have an idea for a workaround - we might be able to convert it manually and skip the bug at the same time, but I'll try to verify it tomorrow morning.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 23, 2024
@BrtqKr
Copy link
Contributor

BrtqKr commented Jul 23, 2024

@Christinadobrzyn the PR is ready, I'll try to complete the recordings later this evening or tomorrow, but since the heic is being treated as a file attachment on other platforms, this should be ready for review. To sum up - the manual conversion worked and they indeed had an incorrect magic bytes signature in comparison to the file extension.

@Christinadobrzyn
Copy link
Contributor

Awesome! Thank you so much @BrtqKr!

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Jul 30, 2024

update for Melvin - PR is under review - @hoangzinh do you have a update on the PR review?

@hoangzinh
Copy link
Contributor

The PR is still reviewing. I reported a bug in the PR and waiting for a fix. Hopefully, we can merge it this week.

@Christinadobrzyn
Copy link
Contributor

monitoring PR #46025 - let us know if you have any other updates @hoangzinh

@hoangzinh
Copy link
Contributor

PR has been merged and waiting deploy to staging

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 9, 2024
@melvin-bot melvin-bot bot changed the title [$500] No feedback and delay when uploading a large attachment [HOLD for payment 2024-08-19] [$500] No feedback and delay when uploading a large attachment Aug 12, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 12, 2024
Copy link

melvin-bot bot commented Aug 12, 2024

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

Copy link

melvin-bot bot commented Aug 12, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.18-10 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-08-19. 🎊

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

Copy link

melvin-bot bot commented Aug 12, 2024

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:

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

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Aug 13, 2024

Payouts due - can we confirm this is the correct payment for this job?

Do we need a regression test for this @hoangzinh?

@hoangzinh
Copy link
Contributor

@Christinadobrzyn, yep I think we need. I will complete BZ checklist soon

@hoangzinh
Copy link
Contributor

hoangzinh commented Aug 14, 2024

Regression Test Proposal

On IOS/Android:

  1. Sign in to any account
  2. Go to any chat
  3. Tap the plus button
  4. Tap "Add an attachment" menu
  5. Select "Chose from gallery"
  6. Select a video larger than the current limit of 24MB
  7. Verify that "Attachment size is larger than 24 MB limit" popup shows immediately

On Web/Desktop/mWeb:

  1. Sign in to any account
  2. Go to any chat
  3. Tap the plus button
  4. Tap "Add an attachment" menu
  5. Select a video larger than the current limit of 24MB
  6. Verify that "Attachment size is larger than 24 MB limit" popup shows immediately

Do we agree 👍 or 👎

@hoangzinh
Copy link
Contributor

hoangzinh commented Aug 14, 2024

BugZero Checklist:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Aug 18, 2024
@Christinadobrzyn
Copy link
Contributor

Awesome! Thanks @hoangzinh.

Regression test - https://github.com/Expensify/Expensify/issues/421516

This is payment day and there are no regressions so paying this out based on this payment summary

Closing!

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
No open projects
Archived in project
Development

No branches or pull requests