You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-05-27] [$250] Attachment - Attachment not found text moves, download modal not shown for broken image #60554
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:
Launch app
Open a chat
Send a broken image by pasting this text -
Open the broken image
Swipe left & right attachment not found text
Note attachment not found text moves
Tap download button on top
Note download button turns green but no attachment modal displayed.
In mweb, open the site
Perform step 2 - step 5
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.
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
overScrollMode is always set to 'auto', without accounting for cases where there is only one attachment. As a result, the "Attachment not found" view can still be dragged when it shouldn't be.
if the image is broken, the fetch promise neither resolves nor rejects, preventing the error modal from being triggered.
What changes do you think we should make in order to solve the problem?
Fix Bug Attachment - Attachment not found text moves:
Update the overScrollMode prop to disable overscroll when there's only one item in the carousel by adding overScrollMode={carouselItems.length > 1 ? 'auto' : 'never'} to:
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
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:
@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]
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.
Activity
melvin-bot commentedon Apr 21, 2025
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.lydiabarclay commentedon Apr 22, 2025
Posted here
trjExpensify commentedon Apr 24, 2025
👋 @lydiabarclay - I think you should ship this
Externalnow, yeah?[-]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[/+]melvin-bot commentedon Apr 24, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021915486228184113065
melvin-bot commentedon Apr 24, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 (
External)truph01 commentedon Apr 25, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
Bug – "Attachment not found" text moves:
App/src/components/Attachments/AttachmentCarousel/Pager/index.tsx
Line 140 in ab60cd2
overScrollModeis always set to'auto', without accounting for cases where there is only one attachment. As a result, the "Attachment not found" view can still be dragged when it shouldn't be.Bug – Download modal not shown for broken image:
App/src/libs/fileDownload/index.android.ts
Line 66 in ab60cd2
if the image is broken, the fetch promise neither resolves nor rejects, preventing the error modal from being triggered.
What changes do you think we should make in order to solve the problem?
Fix Bug Attachment - Attachment not found text moves:
overScrollModeprop to disable overscroll when there's only one item in the carousel by addingoverScrollMode={carouselItems.length > 1 ? 'auto' : 'never'}to:App/src/components/Attachments/AttachmentCarousel/Pager/index.tsx
Line 140 in ab60cd2
Fix Bug Download modal not shown for broken image:
Add a timeout to ensure the fetch promise doesn't hang indefinitely by update:
App/src/libs/fileDownload/index.android.ts
Line 66 in ab60cd2
And update:
App/src/libs/fileDownload/index.android.ts
Lines 92 to 94 in ab60cd2
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional)
28 remaining items
[-][$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[/+]melvin-bot commentedon May 20, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 20, 2025
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:
melvin-bot commentedon May 20, 2025
@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]
melvin-bot commentedon May 27, 2025
Payment Summary
Upwork Job
BugZero Checklist (@lydiabarclay)
hungvu193 commentedon May 27, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[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:
Do we agree 👍 or 👎 ?
lydiabarclay commentedon May 27, 2025
Payment Summary
Contributor: @JakubKorytko does not require payment (Contractor)
Contributor+: @hungvu193 due $250 via NewDot
✅ Regression test filed
garrettmknight commentedon Jun 3, 2025
$250 approved for @hungvu193