Skip to content

[Due for payment 2025-05-27] [$250] Attachment - Attachment not found text moves, download modal not shown for broken image #60554

Closed

Description

@jponikarchuk

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.1.30-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): Slottwo1 in1@gmail.com
Issue reported by: Applause Internal Team
Device used: Redminote 10s android 13
App Component: Chat Report View

Action Performed:

  1. Launch app
  2. Open a chat
  3. Send a broken image by pasting this text - Broken image
    Alt text
  4. Open the broken image
  5. Swipe left & right attachment not found text
  6. Note attachment not found text moves
  7. Tap download button on top
  8. Note download button turns green but no attachment modal displayed.
  9. In mweb, open the site
  10. Perform step 2 - step 5
  11. Note after performing step 2 in mweb, broken image is misaligned and shown in compose box, similarly after performing step 5 in mweb, attachment not found text doesn't move.

Expected Result:

In android, for broken image download button musnt be displayed or attachment not download modal must be shown.
Similarly like mweb, attachment not found must not move.

Actual Result:

In android, attachment not found text moves, download modal not shown for broken image. In mweb, image broken is misaligned and attachment not found text doesn't move.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021915486228184113065
  • Upwork Job ID: 1915486228184113065
  • Last Price Increase: 2025-05-01
Issue OwnerCurrent Issue Owner: @lydiabarclay

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Apr 21, 2025
  2. melvin-bot commented on Apr 21, 2025

    @melvin-bot

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

  3. added
    InternalRequires API changes or must be handled by Expensify staff
    on Apr 22, 2025
  4. lydiabarclay commented on Apr 22, 2025

    @lydiabarclay
    Contributor

    Posted here

  5. trjExpensify commented on Apr 24, 2025

    @trjExpensify
    Contributor

    👋 @lydiabarclay - I think you should ship this External now, yeah?

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    and removed
    InternalRequires API changes or must be handled by Expensify staff
    on Apr 24, 2025
  7. changed the title [-]Attachment - Attachment not found text moves, download modal not shown for broken image[/-] [+][$250] Attachment - Attachment not found text moves, download modal not shown for broken image[/+] on Apr 24, 2025
  8. melvin-bot commented on Apr 24, 2025

    @melvin-bot
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Apr 24, 2025
  10. melvin-bot commented on Apr 24, 2025

    @melvin-bot

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

  11. truph01 commented on Apr 25, 2025

    @truph01
    Contributor

    Proposal

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

    • Attachment - Attachment not found text moves, download modal not shown for broken image

    What is the root cause of that problem?

    Bug – "Attachment not found" text moves:

    Bug – Download modal not shown for broken image:

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

    Fix Bug Attachment - Attachment not found text moves:

    Fix Bug Download modal not shown for broken image:

    • Add a timeout to ensure the fetch promise doesn't hang indefinitely by update:

        let didTimeout = false
        const timeoutPromise = new Promise<never>((_, reject) => {
            setTimeout(() => {
                didTimeout = true;
                reject(new Error('timeout'));
            }, 2000);
        });
        Promise.race([fetchedAttachment, timeoutPromise])
      

    And update:

    .catch(() => {
    showGeneralErrorAlert();
    })

            .catch(() => {
                if(didTimeout){
                    fetchedAttachment?.cancel?.()
                }
                showGeneralErrorAlert();
            })
    
    • Note: The timeout and the alert modal can be decided in PR phase.

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    • None

    What alternative solutions did you explore? (Optional)

  12. 28 remaining items

  13. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on May 20, 2025
  14. changed the title [-][$250] Attachment - Attachment not found text moves, download modal not shown for broken image[/-] [+][Due for payment 2025-05-27] [$250] Attachment - Attachment not found text moves, download modal not shown for broken image[/+] on May 20, 2025
  15. melvin-bot commented on May 20, 2025

    @melvin-bot

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

  16. melvin-bot commented on May 20, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.46-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 2025-05-27. 🎊

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

  17. melvin-bot commented on May 20, 2025

    @melvin-bot

    @hungvu193 @lydiabarclay @hungvu193 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]

  18. melvin-bot commented on May 27, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    • Reviewer: @hungvu193 owed $250 via NewDot
    • Contributor: @JakubKorytko is from an agency-contributor and not due payment

    BugZero Checklist (@lydiabarclay)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1915486228184113065/hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  19. hungvu193 commented on May 27, 2025

    @hungvu193
    Contributor

    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: N/A. The RCA is the react-native-blob-util, which doesn't resolve the promise with a broken URL. We decided to fix this issue by hiding the download button if the image is broken.

    • [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: N/A

    • [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: https://github.com/Expensify/Expensify/issues/505150

    Regression Test Proposal

    Test:

    1. Go to any report where you can send a message.
    2. Send a broken image (broken image Alt text)
    3. Click on that image to open preview modal.
    4. Verify that download button is hide.

    Do we agree 👍 or 👎 ?

  20. lydiabarclay commented on May 27, 2025

    @lydiabarclay
    Contributor

    Payment Summary

    Contributor: @JakubKorytko does not require payment (Contractor)
    Contributor+: @hungvu193 due $250 via NewDot

    ✅ Regression test filed

  21. garrettmknight commented on Jun 3, 2025

    @garrettmknight
    Contributor

    $250 approved for @hungvu193

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.DailyKSv2ExternalAdded 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