Skip to content

[HOLD for payment 2023-10-27] [$500] Android - Scan IOU - A broken image is downloaded to the device when receipt cannot be downloaded #27992

Closed

Description

@izarutskaya

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 New Expensify app.
  2. Create a Scan IOU.
  3. Open the IOU details view.
  4. Tap on the receipt > overflow menu > Download.
  5. Close the error message.
  6. Go to the device gallery.
    Note that a broken image is downloaded despite the error message.

Expected Result:

Nothing will be downloaded to the device since it shows 'Attachment cannot be downloaded' message.

Actual Result:

A broken image is downloaded to the device despite the 'Attachment cannot be downloaded' message.

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: v1.3.72-8

Reproducible in staging?: Y

Reproducible in production?: Y

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

Notes/Photos/Videos: Any additional supporting documentation

Bug6208754_Screen_Recording_20230921_105335_Gallery.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause-Internal Team

Slack conversation: @

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0126f987f66d4dbcf0
  • Upwork Job ID: 1705133271802134528
  • Last Price Increase: 2023-09-22
  • Automatic offers:
    • bernhardoj | Contributor | 27229717

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 22, 2023
  2. melvin-bot commented on Sep 22, 2023

    @melvin-bot

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

  3. melvin-bot commented on Sep 22, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  4. sakluger commented on Sep 22, 2023

    @sakluger
    Contributor

    Yep, that's a bug. @izarutskaya do you know what caused it to throw the error?

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Sep 22, 2023
  6. changed the title [-]Android - Scan IOU - A broken image is downloaded to the device when receipt cannot be downloaded[/-] [+][$500] Android - Scan IOU - A broken image is downloaded to the device when receipt cannot be downloaded[/+] on Sep 22, 2023
  7. melvin-bot commented on Sep 22, 2023

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 22, 2023
  9. melvin-bot commented on Sep 22, 2023

    @melvin-bot

    Current assignee @sakluger is eligible for the External assigner, not assigning anyone new.

  10. melvin-bot commented on Sep 22, 2023

    @melvin-bot

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

  11. ayazalavi commented on Sep 22, 2023

    @ayazalavi
    Contributor

    Proposal

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

    As soon as user try downloading file then error is thrown along with junk file stored.

    What is the root cause of that problem?

    Root cause exists when we try to copy file in media store which does not exist.

    return RNFetchBlob.MediaCollection.copyToMediaStore(
    {
    name: attachmentName,
    parentFolder: 'Expensify',
    mimeType: null,
    },
    'Download',
    attachmentPath,
    );
    })

    This results in junk file saved.

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

    Use RNFetchBlob.fs.exists(attachmentPath) to check if file exists before trying to save the file.

    Result:

    0e23b2c6-cb5b-4260-b827-af117f8d6127.mp4

    What alternative solutions did you explore? (Optional)

    We can alternatively check for file system issues happening through the app and fix them all.

  12. ayazalavi commented on Sep 22, 2023

    @ayazalavi
    Contributor

    Hi @mananjadhav,

    I hope you're well. I would like to request your approval for my proposal. If you can provide the approval, I will be able to create the pull request (PR) within the next hour. Your prompt response would be greatly appreciated.

    Thank you for your consideration.

    Best regards,
    Ayaz Alavi

  13. 56 remaining items

  14. mvtglobally commented on Oct 17, 2023

    @mvtglobally

    Issue not reproducible during KI retests. (Third week)

  15. melvin-bot commented on Oct 18, 2023

    @melvin-bot

    🎯 ⚡️ Woah @ArekChr / @bernhardoj, great job pushing this forwards! ⚡️

    The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

    • when @bernhardoj got assigned: 2023-10-16 23:10:48 Z
    • when the PR got merged: 2023-10-18 21:29:44 UTC

    On to the next one 🚀

  16. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Oct 20, 2023
  17. changed the title [-][$500] Android - Scan IOU - A broken image is downloaded to the device when receipt cannot be downloaded[/-] [+][HOLD for payment 2023-10-27] [$500] Android - Scan IOU - A broken image is downloaded to the device when receipt cannot be downloaded[/+] on Oct 20, 2023
  18. melvin-bot commented on Oct 20, 2023

    @melvin-bot

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

  19. melvin-bot commented on Oct 20, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.87-12 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 2023-10-27. 🎊

    After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

    • External issue reporter
    • Contributor that fixed the issue
    • Contributor+ that helped on the issue and/or PR

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

    As a reminder, here are the bonuses/penalties that should be applied for any External issue:

    • Merged PR within 3 business days of assignment - 50% bonus
    • Merged PR more than 9 business days after assignment - 50% penalty
  20. melvin-bot commented on Oct 20, 2023

    @melvin-bot

    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:

    • [@ArekChr] The PR that introduced the bug has been identified. Link to the PR:
    • [@ArekChr] 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:
    • [@ArekChr] 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:
    • [@ArekChr] Determine if we should create a regression test for this bug.
    • [@ArekChr] 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.
    • [@sakluger] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  21. ArekChr commented on Oct 23, 2023

    @ArekChr
    Contributor
    • Link to the PR: No bug identified.
    • Link to comment: n/a
    • Link to discussion: n/a
    • Determine if we should create a regression test for this bug: We can create regression test.

    Regresion test proposal:

    1. Open app and enable offline mode.
    2. Create a Scan IOU.
    3. Open the IOU details view.
    4. Tap on the receipt > overflow menu > Download.
    5. Ensure that the image downloaded succesfully and verify if image is valid.

    Do we agree 👍 or 👎

  22. sakluger commented on Oct 27, 2023

    @sakluger
    Contributor

    Proposed regression test steps look good. 👍

    I've paid out @bernhardoj, so we're good to close this one. Thanks everyone! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions