fix: Can't upload a receipt in HEIC format, page reloads or loads infinitely#69634
fix: Can't upload a receipt in HEIC format, page reloads or loads infinitely#69634martasudol wants to merge 5 commits into
Conversation
|
@QichenZhu Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Hi @martasudol, it seems the server doesn't support HEIC format yet, so the receipt upload will fail if we passthrough the file. Screen recordingRPReplay_Final1756809870.mp4Server response
Console warnings
|
|
@QichenZhu could you share with me the test file that you use? |
|
Sure! Here it is: #68778 (comment) |
|
Yeah HEIC is not supported by the server, it has to be converted before being posted I believe cc @Beamanator |
|
This is def consistent with #47078 (comment), but I don't quite remember "why" - if there was a limitation on our backend or if we just wanted the img to optimistically upload & have a preview |
|
@QichenZhu I've jus tested it with your file and it works: Nagranie.z.ekranu.2025-09-3.o.08.55.25.movios native: Nagranie.z.ekranu.2025-09-3.o.08.57.47.mov |
|
@martasudol, could you try it on a physical device? I'm using iPad Pro 10.5, iOS 17.7.9. |
|
Steps:
Expected result: The expense is created and the receipt is scanned |
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
|
QA team tested these steps with iOS adhoc build. No loading errors or crashes. Receipt got uploaded, but got a scanning error stating details need to be entered manually. Same behaviour for two testers with iPhone 16/iOS 18.3.1 and iPhone 16 Pro Max/18.6 ScreenRecording_09-04-2025.08-44-29_1.mp4ScreenRecording_09-04-2025.08-26-07_1.MP4 |
|
Thanks @IuliiaHerets! Good to know the HybridApp is working. How about mWeb Safari? |
|
@QichenZhu Do you want to test us on the staging build on Safari? |
|
|
Thank you! That's really helpful. SummaryTest results with this PR on mWeb Safari following these steps.
|
|
Thanks @QichenZhu @IuliiaHerets for testing! So it looks like the main problem now is scanning, not uploading. Probably after failed scanning, uploading is blocked. Let me look into this. |
@martasudol, I don't think that's the main problem here. The original issue is about the upload failure in No. 1 of the comment:
The scan failure in No. 2 is a separate issue:
|
|
Yes but note that in this recording the flow is the following:
|
|
@martasudol, good point! I just tested this: the page could also crash if you upload the file without submitting it for scan, go back and upload the same file again. Repeat it 4-5 times if it doesn't crash. Screen.Recording.2025-09-08.at.9.58.12.PM.mov |
|
Ok, I see a few problems here. Please take a look at the recording below – it’s from staging, where I tried to upload and scan a JPEG file.
Nagranie.z.ekranu.2025-09-9.o.09.45.15.movFor HEIC files on staging, it behaves as we’ve already described. Something is definitely off here. It looks like failed scanning is common for both JPEG and HEIC (so it’s not really related to the file format). I’d recommend splitting uploading (as you can note in the above recording, it also didn't work on first attempt for JPEG) and scanning into two separate issues. cc @gedu as I know you're working on another issue with scanning process. |
|
@martasudol that is definitely off, I have not seen this issue in staging before, that seems like a bug / deploy blocker |
|
Yeah, mine is different behaviour, it's related with SequentialQueue and killing the app |
100% agree. I’ll be out of office from tomorrow until next Monday, but someone from the Callstack team will take it over in the meantime. cc @mountiny @gedu |
|
Unable to reproduce this in staging and production by uploading jpeg file, but at times have to select file twice to upload bandicam.2025-09-09.18-17-59-502.mp4bandicam.2025-09-09.17-37-32-325.mp4 |
|
I believe we can close this one now, thank you! |


Explanation of Change
The main fix was removing the blocking error and instead implementing a pass-through fallback. When HEIC conversion fails (whether due to the heic-to library not recognizing the file or any other reason), instead of preventing the upload entirely.
Fixed Issues
$#68778
Tests
Offline tests
Same as Tests.
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
ios-native.mov
iOS: mWeb Safari
ios-web.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov