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-10-03] [$250] mWeb - Scan - Can't upload a receipt in HEIC format, page reloads or loads infinitely #68778
Version Number: 9.1.96-2 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: Exploratory Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Device used: iPhone 15 iOS 18.5 Safari App Component: Money Requests
Action Performed:
Navigate to staging.new.expensify.com in incognito tab and sign in with a new gmail account
Create a workspace
Navigate to the workspace chat, tap +, "Create expense"
Tap "Choose file", select a receipt in the HEIC format
Select category and create an expense
Observe the page - it reloads or infinite loading is shown, the receipt is not uploaded
Expected Result:
Scan expense is created successfully
Actual Result:
After uploading a HEIC receipt, the page reloads and user is dropped on the create expense screen, or an infinite loading is shown
Please re-state the problem that we are trying to solve in this issue.
mWeb - Scan - Can't upload a receipt in HEIC format, page reloads or loads infinitely
What is the root cause of that problem?
We can upload HEIC files as it will be convert to jpeg format, however the problem here is about the broken HEIC file which cannot be converted - when HEIC conversion fails, the convertHeicImageToJpegPromise function rejects the promise, but there's no .catch() handler for the Promise.all() that processes the HEIC files. This means when HEIC conversion fails, the promise chain breaks and the user gets stuck in an infinite loading state.
What changes do you think we should make in order to solve the problem?
Update to fallback to original file if we cannot convert
constconvertHeicImageToJpegPromise=(file: FileObject): Promise<FileObject>=>{returnnewPromise((resolve)=>{convertHeicImage(file,{onSuccess: (convertedFile)=>resolve(convertedFile),onError: (error,nonConvertedFile)=>{collectedErrors.current.push({error: CONST.FILE_VALIDATION_ERRORS.FILE_CORRUPTED});// Resolve with original file to continue processingresolve(nonConvertedFile);},});});};
.catch(()=>{setIsLoaderVisible(false);// Return original files if conversion fails completelyreturnPromise.resolve({processedFiles: otherFiles, pdfsToLoad});});
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
We can update to show err CONST.FILE_VALIDATION_ERRORS.FILE_CORRUPTED if we cannot convert
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
changed the title [-]mWeb - Scan - Can't upload a receipt in HEIC format, page reloads or loads infinitely[/-][+][$250] mWeb - Scan - Can't upload a receipt in HEIC format, page reloads or loads infinitely[/+]on Aug 19, 2025
changed the title [-][Due for payment 2025-10-03] [Due for payment 2025-10-01] [$250] mWeb - Scan - Can't upload a receipt in HEIC format, page reloads or loads infinitely[/-][+][Due for payment 2025-10-03] [$250] mWeb - Scan - Can't upload a receipt in HEIC format, page reloads or loads infinitely[/+]on Oct 3, 2025
Activity
melvin-bot commentedon Aug 19, 2025
Triggered auto assignment to @OfstadC (
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.lorretheboy commentedon Aug 19, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
mWeb - Scan - Can't upload a receipt in HEIC format, page reloads or loads infinitely
What is the root cause of that problem?
We can upload HEIC files as it will be convert to jpeg format, however the problem here is about the broken HEIC file which cannot be converted - when HEIC conversion fails, the
convertHeicImageToJpegPromisefunction rejects the promise, but there's no .catch() handler for the Promise.all() that processes the HEIC files. This means when HEIC conversion fails, the promise chain breaks and the user gets stuck in an infinite loading state.App/src/hooks/useFilesValidation.tsx
Lines 134 to 143 in b94561e
What changes do you think we should make in order to solve the problem?
Update to fallback to original file if we cannot convert
Add catch statement here as well
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
We can update to show err
CONST.FILE_VALIDATION_ERRORS.FILE_CORRUPTEDif we cannot convertReminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
lorretheboy commentedon Aug 19, 2025
Could you please attach the image used in video here? Thank you
[-]mWeb - Scan - Can't upload a receipt in HEIC format, page reloads or loads infinitely[/-][+][$250] mWeb - Scan - Can't upload a receipt in HEIC format, page reloads or loads infinitely[/+]melvin-bot commentedon Aug 19, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021957911143598202765
melvin-bot commentedon Aug 19, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (
External)hoangzinh commentedon Aug 20, 2025
@jponikarchuk, can you request to share the HEIC file that QA team used to reproduce this issue? Thanks
jponikarchuk commentedon Aug 21, 2025
@hoangzinh Sorry, HEIC file type is not supported to share here.
lorretheboy commentedon Aug 21, 2025
could you please help upload to an external platform then drop the link here? @jponikarchuk
90 remaining items
[-][Due for payment 2025-10-03] [Due for payment 2025-10-01] [$250] mWeb - Scan - Can't upload a receipt in HEIC format, page reloads or loads infinitely[/-][+][Due for payment 2025-10-03] [$250] mWeb - Scan - Can't upload a receipt in HEIC format, page reloads or loads infinitely[/+]mountiny commentedon Oct 3, 2025
I think the total payment would be $500 here for @QichenZhu as they have helped with couple PRs and helped a lot to debug too.
Confirmed with QA that this is no longer reproducible.
OfstadC commentedon Oct 3, 2025
Just to confirm @mountiny
$500 for @QichenZhu and $250 for @dominictb ?
OfstadC commentedon Oct 6, 2025
Friendly bump @mountiny - I just want to make sure i'm issuing the proper payment 😅 Thank you!
OfstadC commentedon Oct 7, 2025
Just waiting on confirmation of the proper payment here 😅
mountiny commentedon Oct 8, 2025
Sorry for the delay, I think that is right as @dominictb only had this one PR #70866
OfstadC commentedon Oct 9, 2025
Thanks @mountiny ! ❤️
OfstadC commentedon Oct 9, 2025
Payment Summary