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

[$250] IOS/Android - App crashed after tap on download in optional menu #9010

Closed
kbecciv opened this issue May 13, 2022 · 16 comments
Closed
Assignees
Labels
Engineering 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 Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented May 13, 2022

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. Launch the app
  2. Log in with any account
  3. Find the chat where you can download the file
  4. Hold the finger on any type of file (mp4, png., mov)
  5. Tap download

Expected Result:

Able to download the file in optional menu

Actual Result:

App crashed after tap on download in optional menu

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • iOS

Version Number: 1.1.61.2

Reproducible in staging?: Yes

Reproducible in production?: Yes

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Image.from.iOS.20.MP4

Expensify/Expensify Issue URL:

Issue reported by: Applause

Slack conversation:

View all open jobs on GitHub

@melvin-bot
Copy link

melvin-bot bot commented May 13, 2022

Triggered auto assignment to @MariaHCD (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@kbecciv kbecciv changed the title IOS - App crashed after tap on download in optional menu IOS/Android - App crashed after tap on download in optional menu May 14, 2022
@roryabraham
Copy link
Contributor

roryabraham commented May 15, 2022

Seems like this crash is relevant. Worth noting that this crash is only reported on Android realme devices, but the bug is reproduced in iOS as well.

@melvin-bot melvin-bot bot added the Overdue label May 16, 2022
@MariaHCD
Copy link
Contributor

Thanks, @roryabraham! From those issues, it looks this needs some more investigation:

  • If adding android:requestLegacyExternalStorage="true" to the Android manifest would help solved this and/or;
  • Whether the package rn-fetch-blob has released a fix for this.

@melvin-bot melvin-bot bot removed the Overdue label May 17, 2022
@MariaHCD MariaHCD added the External Added to denote the issue can be worked on by a contributor label May 17, 2022
@melvin-bot
Copy link

melvin-bot bot commented May 17, 2022

Triggered auto assignment to @arielgreen (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@MariaHCD MariaHCD removed their assignment May 17, 2022
@arielgreen
Copy link
Contributor

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels May 17, 2022
@melvin-bot
Copy link

melvin-bot bot commented May 17, 2022

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 17, 2022
@melvin-bot
Copy link

melvin-bot bot commented May 17, 2022

Triggered auto assignment to @chiragsalian (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot changed the title IOS/Android - App crashed after tap on download in optional menu [$250] IOS/Android - App crashed after tap on download in optional menu May 17, 2022
@jayeshmangwani
Copy link
Contributor

Proposal:

const previewSourceURL = html.match(PREVIEW_SOURCE_REGEX)[1].replace(
Config.EXPENSIFY.EXPENSIFY_URL,
Config.EXPENSIFY.URL_API_ROOT,
);

crash is happening because of these lines, anchor tag does not have ATTACHMENT_PREVIEW_ATTRIBUTE = "src", and also we are not using previewSourceURL from the getAttachmentName anywhere, so we can remove these lines,

and anchor tag has no data-name attribute, so we have to remove this line from here,

const originalFileName = html.match(ORIGINAL_FILENAME_REGEX)[1];

and can get filename for anchor tag as we are getting here

const displayName = lodashGet(props.tnode, 'domNode.children[0].data', '');

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 18, 2022
@arielgreen arielgreen added Weekly KSv2 and removed Daily KSv2 labels May 19, 2022
@mananjadhav
Copy link
Collaborator

@kbecciv I've been trying to reproduce this but I am just not able to. I've attempted to download pdf, png, and mp4 files. My installed version is 1.1.62-0 and my local version is 1.1.64-0.

@jayeshmangwani Thank you for the proposal, are you able to reproduce it at your end?

@jayeshmangwani
Copy link
Contributor

@mananjadhav Yes, I am able to reproduce on my side,
I have tried with zip and mp4 files and both are crashing, latest main branch ( "version": "1.1.62-0")
please check this video for reference

9010-crash-issue.mov

@jayeshmangwani
Copy link
Contributor

@mananjadhav yes this issue has been handled in "version": "1.1.64-0", it was happening in "version": "1.1.62-0" and now it's fixed

@mananjadhav
Copy link
Collaborator

Thanks for responding @jayeshmangwani. Appreciate your help.

@arielgreen We can wait for one KI test and then close this one out.

@arielgreen
Copy link
Contributor

@mananjadhav are we good to close?

@mananjadhav
Copy link
Collaborator

Yeah @arielgreen, good to close.

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering 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 Weekly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants