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
3.52k stars 2.87k forks source link

[$250 Reproducible Steps][$250] Android - Attachment - The app crashes upon uploading a large PDF #47935

Open IuliiaHerets opened 2 months ago

IuliiaHerets commented 2 months ago

Deliverable

The deliverable is to provide reliable reproduction steps for the bug. - Follow the Propose a solution for a job process to submit the steps for review”. Inc. preconditions and additional details if they’re helpful. (ie. require x beta to be enabled, must be on a Collect plan)


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.24-1 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?/tests/view/4859370&group_by=cases:section_id&group_id=292107&group_order=asc Issue reported by: Applause Internal Team

Action Performed:

  1. Open the app
  2. Log in with any Gmail account
  3. Open any 1:1 chat or self DM
  4. Navigate to the Composers "+" button - Add attachment
  5. Tap on "Choose file"
  6. Upload the example PDF attached to this issue

Expected Result:

I should be able to upload any PDF attachment.

Actual Result:

The app crashes upon uploading a large PDF (20 MB). I'm able to upload smaller PDF attachments.

Workaround:

Unknown

Platforms:

Screenshots/Videos

2308.txt

https://github.com/user-attachments/assets/5ec2171b-791d-498d-b33b-b45c2b18c26d

Bug6572320_1723663373443!English_Vocabulary_in_Use_Elementary_2017.pdf

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b178b0b236b5c693
  • Upwork Job ID: 1828189418619467640
  • Last Price Increase: 2024-10-28
melvin-bot[bot] commented 2 months ago

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

IuliiaHerets commented 2 months ago

@johncschuster 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

melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

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

rezkiy37 commented 2 months ago

Hi, I am Michael (Mykhailo) from Callstack, an expert agency and I can work on this issue.

rezkiy37 commented 2 months ago

The issue is not replicable on the latest Android production. I am trying to test it in development right now.

https://github.com/user-attachments/assets/6f198f81-6a9b-4359-acac-df5b32e30a2d

rezkiy37 commented 2 months ago

The bug is not replicable on the latest main. So @IuliiaHerets @mkhutornyi please confirm if you can reproduce it.

https://github.com/user-attachments/assets/20af0a1b-0954-406f-bd06-c4b8fb7079ff

mkhutornyi commented 2 months ago
image

Not able to reproduce crash but I am seeing file attachment instead of pdf preview.

IuliiaHerets commented 2 months ago

@rezkiy37 Tester still can reproduce a crash, build - 9.0.26-1

https://github.com/user-attachments/assets/8143940d-e39a-419e-8a8a-39ebf9a673c2

rezkiy37 commented 2 months ago
image

Not able to reproduce crash but I am seeing file attachment instead of pdf preview.

I don't think it is a bug. I believe it is expected behavior.

rezkiy37 commented 2 months ago

I could reproduce the bug in the dev build; the version is 9.0.26-1. The file size does not matter to me. It crashes with small files 2 pages 30.66 KB (small.pdf). @IuliiaHerets can you please try one more time with small files as well?

Details https://github.com/user-attachments/assets/14af1c14-7de5-46ba-9379-172e5df1b19c
IuliiaHerets commented 2 months ago

@rezkiy37 We unable to repro with small PDF attachments

https://github.com/user-attachments/assets/7349ca08-b4fa-4f15-93e3-8f47025ba6ca

rezkiy37 commented 2 months ago

Looks like I've found the root cause of the bug. It happens because of this line:

https://github.com/Expensify/App/blob/1f71ce6265055fede5bb783fde0436477041381e/src/pages/home/report/ReportActionCompose/ReportActionCompose.tsx#L292

The UI thread cannot execute some JS logic. I think it is because of the version mismatch of react-native and react-native-reanimated. I am trying to fix it.

rezkiy37 commented 2 months ago

@IuliiaHerets, please clear the app's cache and reinstall it to reproduce the bug again. I've tried on many production versions and I don't have the bug. However, the bug is replicable in development.

Details ![Screenshot_20240902_134539_Settings](https://github.com/user-attachments/assets/1192fc83-e073-4968-a97d-f051d784f805)
melvin-bot[bot] commented 2 months ago

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

IuliiaHerets commented 2 months ago

@rezkiy37 Tester still can repro the issue in 9.0.28-0 after a reinstall

https://github.com/user-attachments/assets/4bb2d956-5fd0-4ed6-bddd-53c484357d75

rezkiy37 commented 2 months ago

Hey! I will be OOO from 04.09 (afternoon) till 09.09. I will continue to work on this one once I am back.

melvin-bot[bot] commented 2 months ago

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

johncschuster commented 2 months ago

Thanks for the heads up, @rezkiy37! I'll keep Melvin bumping until you're back 👍

mkhutornyi commented 2 months ago

Not overdue

melvin-bot[bot] commented 1 month ago

@johncschuster @mkhutornyi 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!

johncschuster commented 1 month ago

Not overdue

rezkiy37 commented 1 month ago

We investigated crash reports and found info that it seems to be related to Reanimated (https://docs.swmansion.com/react-native-reanimated/) as it’s referenced multiple times there. I would ask guys from SWM to check it because they are mantainers of Reanimated.

The next line invokes that native code that crashes.

https://github.com/Expensify/App/blob/1f71ce6265055fede5bb783fde0436477041381e/src/pages/home/report/ReportActionCompose/ReportActionCompose.tsx#L292

My logs: logs.txt

My device: Samsung A34 5G (SM-A346B/DSN).

melvin-bot[bot] commented 1 month ago

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

johncschuster commented 1 month ago

Thanks, @rezkiy37! I'll ask SWM for help on this one

rezkiy37 commented 1 month ago

Slack discussion.

rezkiy37 commented 1 month ago

I've retested the bug in the latest staging and development. It works properly. I don't see the crash because of the clear function. Probably it was fixed because of the react-native-reanimated upgrade (https://github.com/Expensify/App/pull/48318).

Videos https://github.com/user-attachments/assets/4ad5cf90-c714-4703-9d70-bc1c9caa0ae8 https://github.com/user-attachments/assets/920fa5cb-a0ba-4282-bd2e-7452654de120
johncschuster commented 1 month ago

Great! In that case, it sounds like we can close this out, right?

rezkiy37 commented 1 month ago

Great! In that case, it sounds like we can close this out, right?

Yes, but the QA team needs to confirm it as well.

rezkiy37 commented 1 month ago

@IuliiaHerets @mkhutornyi please retest the bug 🙂

FYI: https://github.com/Expensify/App/issues/47935#issuecomment-2340533628, https://github.com/Expensify/App/issues/47935#issuecomment-2345536711

IuliiaHerets commented 1 month ago

@rezkiy37 Tester still can repro in 9.0.35-0

https://github.com/user-attachments/assets/06f38110-22e6-4d3b-afd7-27b84c647722

waterim commented 1 month ago

Hello, Im Artem from Callstack, I will try to help with it!

waterim commented 1 month ago

As its not reproducible for @rezkiy37 I will try to dig into too! Maybe luck will be on our site to reproduce the bug :)

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

@johncschuster, @mkhutornyi Eep! 4 days overdue now. Issues have feelings too...

johncschuster commented 1 month ago

@waterim were you able to reproduce the behavior?

waterim commented 1 month ago

@johncschuster Not yet, didn't have a lot of time to spend on it, tried to reproduce yesterday, but was not able. Will try more tomorrow

rezkiy37 commented 1 month ago

Hello! I am OOO from 19.09 - 23.09.

waterim commented 1 month ago

Nothing new here, still can't reproduce, trying to find something

melvin-bot[bot] commented 1 month ago

@johncschuster @mkhutornyi this issue is now 4 weeks old, please consider:

Thanks!

johncschuster commented 1 month ago

@IuliiaHerets it seems we're having trouble reproducing the issue. Are you able to consistently reproduce it? If so, can you please clarify the reproduction steps?

MelvinBot commented 1 month ago

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

IuliiaHerets commented 1 month ago

@johncschuster Tester can still reproduce. He can repro it in every updated version. The steps haven't changed since his initial report. Build - v9.0.39-0, model device - Samsung Galaxy A52s 5G / Android 14.

https://github.com/user-attachments/assets/fa11a280-32c3-4ef8-9d17-7ce3ec120daa

waterim commented 1 month ago

Still can't reproduce from my end, tried on different devices, different emulators, will try also today on Samsung Galaxy Note 8 real device. Latest dev:

image

https://github.com/user-attachments/assets/e16e632b-4194-4b78-b1e4-4c90f214e6dd

waterim commented 1 month ago

Also tested on Google Pixel 7 pro, android 14, production, can't reproduce also

image
melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

@johncschuster, @mkhutornyi Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

johncschuster commented 1 month ago

Updated the OP and issue title to reflect that we need reliable reproduction steps

melvin-bot[bot] commented 1 month ago

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