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
Odometer - No error message when uploading corrupted file #82663
Version Number: 9.3.20-4 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#80532 Email or phone of affected tester (no customers):applausetester+ihbuiivyw@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Log in with Expensifail account.
Go to staging.new.expensify.com
Go to workspace chat.
Click + > Track distance > Odometer.
Click image thumbnail next to Start reading.
Upload a corrupted pdf file (attached below).
Expected Result:
Error message will show up.
Actual Result:
No error message shows up when uploading corrupted file.
Please re-state the problem that we are trying to solve in this issue.
No error message is shown when uploading a corrupted PDF.
What is the root cause of that problem?
The odometer image step uses useFilesValidation to validate chosen files and show the shared ErrorModal when validation fails. For PDFs, the hook relies on rendering invisible PDFThumbnail components that load the PDF and call onLoadSuccess or onLoadError; only after that does it call checkIfAllValidatedAndProceed(), which opens the error modal when collectedErrors contains FILE_CORRUPTED. In IOURequestStepOdometerImage the hook’s PDFValidationComponent (which contains those PDFThumbnail instances) is never rendered. So when the user selects a PDF, the hook sets pdfFilesToRender and waits for thumbnail load callbacks, but because PDFValidationComponent is not in the tree, the thumbnails never mount, the callbacks never run, and the error modal never appears.
Relevant behavior (permalinks = links to code on main):
Odometer image step uses only validateFiles and ErrorModal – PDFValidationComponent is not destructured or rendered, so PDF validation never runs.
PDF validation depends on rendering PDFValidationComponent – The hook renders invisible PDFThumbnail components for each PDF; onLoadError pushes FILE_CORRUPTED and calls checkIfAllValidatedAndProceed(), which opens the error modal.
Scan step correctly renders PDFValidationComponent – Same flow (file picker + validation) renders PDFValidationComponent so PDF load success/error runs and the modal can show.
What changes do you think we should make in order to solve the problem?
Render PDFValidationComponent in IOURequestStepOdometerImage so that when a PDF is selected (e.g. from "Choose file" or drag-and-drop), the invisible PDFThumbnail components mount, load the PDF, and trigger onLoadError for corrupted PDFs. The existing useFilesValidation logic will then show the error modal. No change to the hook or error copy is required.
This issue has not been updated in over 15 days. eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Activity
abbasifaizan70 commentedon Feb 17, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
No error message is shown when uploading a corrupted PDF.
What is the root cause of that problem?
The odometer image step uses
useFilesValidationto validate chosen files and show the sharedErrorModalwhen validation fails. For PDFs, the hook relies on rendering invisiblePDFThumbnailcomponents that load the PDF and callonLoadSuccessoronLoadError; only after that does it callcheckIfAllValidatedAndProceed(), which opens the error modal whencollectedErrorscontainsFILE_CORRUPTED. InIOURequestStepOdometerImagethe hook’sPDFValidationComponent(which contains thosePDFThumbnailinstances) is never rendered. So when the user selects a PDF, the hook setspdfFilesToRenderand waits for thumbnail load callbacks, but becausePDFValidationComponentis not in the tree, the thumbnails never mount, the callbacks never run, and the error modal never appears.Relevant behavior (permalinks = links to code on
main):Odometer image step uses only
validateFilesandErrorModal–PDFValidationComponentis not destructured or rendered, so PDF validation never runs.App/src/pages/iou/request/step/IOURequestStepOdometerImage/index.tsx
Lines 79 to 90 in 0ad75d6
PDF validation depends on rendering
PDFValidationComponent– The hook renders invisiblePDFThumbnailcomponents for each PDF;onLoadErrorpushesFILE_CORRUPTEDand callscheckIfAllValidatedAndProceed(), which opens the error modal.App/src/hooks/useFilesValidation.tsx
Lines 379 to 406 in 0ad75d6
Scan step correctly renders
PDFValidationComponent– Same flow (file picker + validation) rendersPDFValidationComponentso PDF load success/error runs and the modal can show.App/src/pages/iou/request/step/IOURequestStepScan/index.tsx
Lines 453 to 454 in 0ad75d6
App/src/pages/iou/request/step/IOURequestStepScan/index.tsx
Lines 839 to 841 in 0ad75d6
What changes do you think we should make in order to solve the problem?
Render
PDFValidationComponentinIOURequestStepOdometerImageso that when a PDF is selected (e.g. from "Choose file" or drag-and-drop), the invisiblePDFThumbnailcomponents mount, load the PDF, and triggeronLoadErrorfor corrupted PDFs. The existinguseFilesValidationlogic will then show the error modal. No change to the hook or error copy is required.Solution – new code (git diff):
melvin-bot commentedon Feb 23, 2026
Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Mar 5, 2026
This issue has not been updated in over 14 days. eroding to Weekly issue.
melvin-bot commentedon Mar 30, 2026
This issue has not been updated in over 15 days. eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
melvin-bot commentedon Jun 11, 2026
@jponikarchuk, this Monthly task hasn't been acted upon in 6 weeks; closing.
If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.