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 2026-02-26] Android - Attachment - Blank preview on the 4th attachment preview #82723
Version Number: 9.3.21-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#82282 Email or phone of affected tester (no customers):josidnjnsdjsodjosjni@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Samsung Galaxy S25 FE / Android App Component: Money Requests
Action Performed:
Launch Expensify app.
Go to workspace chat.
Tap + > Add attachment > Choose from gallery.
Select 4 photos.
On the preview, swipe to the 4th attachment.
Expected Result:
App will preview the 4th attachment.
Actual Result:
4th attachment preview is blank.
This issue happens with 4th attachment onward.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Please re-state the problem that we are trying to solve in this issue.
On Android, when selecting 4 or more photos to attach to a message (via + > Add attachment > Choose from gallery), the 4th attachment preview and beyond are blank. Swiping to the 4th photo in the preview carousel shows nothing.
What is the root cause of that problem?
There are two interacting bugs:
Primary cause:convertFileToAttachment() in AddAttachmentModalCarouselView.tsx:9-18 does not set attachmentID on the Attachment objects it creates from selected files. It only sets file and source.
This causes every Lightbox instance in the carousel to resolve to page = 0 via findIndex at Lightbox/index.tsx:104:
Since both the Lightbox's attachmentID prop and each pagerItem's attachmentID are undefined, findIndex always returns 0 (the first match where undefined === undefined).
How this causes the blank screen: Every Lightbox thinks it is page 0. When the user swipes to page 3, activePage in the context becomes 3. For every Lightbox:
The useEffect at line 238 fires because !isActive && !isLightboxVisible is true, and sets isFallbackVisible = isFallbackInRange = false.
Result: For the Lightbox actually displayed at position 3, neither the lightbox image (guarded by isLightboxVisible) nor the fallback image (guarded by isFallbackVisible && isFallbackInRange) renders. The user sees a blank screen.
This was exposed by PR #82282 which introduced the FALLBACK_OFFSET = 2 limit. Before that PR, isFallbackInRange didn't exist and the fallback was always visible regardless of page position, masking the incorrect page values.
What changes do you think we should make in order to solve the problem?
In convertFileToAttachment() in AddAttachmentModalCarouselView.tsx, generate a unique attachmentID for each file-based attachment. This can use the file's uri as the attachmentID (or generate a unique ID), so that each Lightbox correctly identifies which page it corresponds to in the pager context:
This ensures findIndex at Lightbox/index.tsx:104 returns the correct page index for each Lightbox, fixing all the downstream calculations (isActive, isLightboxVisible, isFallbackInRange).
What alternative solutions did you explore? (Optional)
Increasing FALLBACK_OFFSET: This would only push the breakpoint further (e.g., blank at 6th attachment instead of 4th) without fixing the root cause.
Modifying Lightbox to fall back to index-based page lookup when attachmentID is undefined: This is more defensive but doesn't fix the underlying data quality issue. Other code that depends on attachmentID could also be affected.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.
changed the title [-]Android - Attachment - Blank preview on the 4th attachment preview[/-][+][Due for payment 2026-02-26] Android - Attachment - Blank preview on the 4th attachment preview[/+]on Feb 19, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.22-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@cristipaval@RachCHopkins 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]
Activity
melvin-bot commentedon Feb 18, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #82282
melvin-bot commentedon Feb 18, 2026
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Feb 18, 2026
Triggered auto assignment to @RachCHopkins (
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.github-actions commentedon Feb 18, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
MelvinBot commentedon Feb 18, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On Android, when selecting 4 or more photos to attach to a message (via + > Add attachment > Choose from gallery), the 4th attachment preview and beyond are blank. Swiping to the 4th photo in the preview carousel shows nothing.
What is the root cause of that problem?
There are two interacting bugs:
Primary cause:
convertFileToAttachment()inAddAttachmentModalCarouselView.tsx:9-18does not setattachmentIDon theAttachmentobjects it creates from selected files. It only setsfileandsource.This causes every
Lightboxinstance in the carousel to resolve topage = 0viafindIndexatLightbox/index.tsx:104:Since both the Lightbox's
attachmentIDprop and each pagerItem'sattachmentIDareundefined,findIndexalways returns0(the first match whereundefined === undefined).How this causes the blank screen: Every Lightbox thinks it is page 0. When the user swipes to page 3,
activePagein the context becomes3. For every Lightbox:isActive = (page === activePage) = (0 === 3) = falseisLightboxVisible = |0 - 3| = 3 > indexCanvasOffset(0) = false(on Android,NUMBER_OF_CONCURRENT_LIGHTBOXES = 1)isFallbackInRange = |0 - 3| = 3 > FALLBACK_OFFSET(2) = falseThe useEffect at line 238 fires because
!isActive && !isLightboxVisibleis true, and setsisFallbackVisible = isFallbackInRange = false.Result: For the Lightbox actually displayed at position 3, neither the lightbox image (guarded by
isLightboxVisible) nor the fallback image (guarded byisFallbackVisible && isFallbackInRange) renders. The user sees a blank screen.This was exposed by PR #82282 which introduced the
FALLBACK_OFFSET = 2limit. Before that PR,isFallbackInRangedidn't exist and the fallback was always visible regardless of page position, masking the incorrectpagevalues.What changes do you think we should make in order to solve the problem?
In
convertFileToAttachment()inAddAttachmentModalCarouselView.tsx, generate a uniqueattachmentIDfor each file-based attachment. This can use the file'surias theattachmentID(or generate a unique ID), so that each Lightbox correctly identifies which page it corresponds to in the pager context:This ensures
findIndexatLightbox/index.tsx:104returns the correct page index for each Lightbox, fixing all the downstream calculations (isActive,isLightboxVisible,isFallbackInRange).What alternative solutions did you explore? (Optional)
FALLBACK_OFFSET: This would only push the breakpoint further (e.g., blank at 6th attachment instead of 4th) without fixing the root cause.attachmentIDis undefined: This is more defensive but doesn't fix the underlying data quality issue. Other code that depends onattachmentIDcould also be affected.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.3 remaining items
mountiny commentedon Feb 18, 2026
Waiting for a retest
m-natarajan commentedon Feb 18, 2026
The issue is no longer reproducible on Android 16, Samsung A15. Build 9.3.21-4-staging
Android_82723.mp4
[-]Android - Attachment - Blank preview on the 4th attachment preview[/-][+][Due for payment 2026-02-26] Android - Attachment - Blank preview on the 4th attachment preview[/+]melvin-bot commentedon Feb 19, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Feb 19, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.22-4 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 2026-02-26. 🎊
melvin-bot commentedon Feb 19, 2026
@cristipaval @RachCHopkins 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]