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
Native app - Unable to share video to the app as an attachment #68340
On the device media library - Select a video and click share
Select share to Expensify
Select any contact or workspace
Expected Result:
You land in Details page where "To" field is populated as per the selection and preview of the file is displayed and can share a video to the selected recipient as attachment.
Actual Result:
There is no attachment preview exist
Share button is unresponsive
As a result, isValidFile always returns false for video files, and validFilesToUpload.length === 0.
What changes do you think we should make in order to solve the problem?
Originally, isValidatingReceipts in useFilesValidation was set to false by default, and this behavior was changed in this commit.
To resolve this issue, we should explicitly pass isValidatingReceipts = false here:
Note: It may be necessary to review all usages of useFilesValidation and update the isValidatingReceipts param accordingly.
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)
NA
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.
@alexpensify The offending PR has been reverted (#68427) and has just been deployed to staging. We should ask retest to confirm that this issue has been resolved.
Activity
melvin-bot commentedon Aug 12, 2025
Triggered auto assignment to @alexpensify (
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.dmkt9 commentedon Aug 13, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
There is no attachment preview exist
Share button is unresponsive
What is the root cause of that problem?
The
isValidatingReceiptsparam ofuseFilesValidationis set totrueby default:App/src/hooks/useFilesValidation.tsx
Line 34 in 8dcc9d3
This causes
validateAttachmentto validate the video file as a receipt:App/src/hooks/useFilesValidation.tsx
Line 116 in 8dcc9d3
However, since video files are not allowed as receipts, the validation always fails:
App/src/CONST/index.ts
Line 258 in 8dcc9d3
As a result,
isValidFilealways returnsfalsefor video files, andvalidFilesToUpload.length === 0.What changes do you think we should make in order to solve the problem?
Originally,
isValidatingReceiptsinuseFilesValidationwas set tofalseby default, and this behavior was changed in this commit.To resolve this issue, we should explicitly pass
isValidatingReceipts = falsehere:App/src/pages/Share/ShareDetailsPage.tsx
Line 59 in 8dcc9d3
Note: It may be necessary to review all usages of
useFilesValidationand update theisValidatingReceiptsparam accordingly.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)
NA
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.
Result:
2025-08-13.23-22-25.mp4
alexpensify commentedon Aug 14, 2025
We are reviewing whether the fix covers all file types or just .mp3s here - #64136 (comment)
linhvovan29546 commentedon Aug 15, 2025
@alexpensify The offending PR has been reverted (#68427) and has just been deployed to staging. We should ask retest to confirm that this issue has been resolved.
rohit9625 commentedon Aug 17, 2025
Yes, this issue is not reproducible anymore after that PR was reverted.
Screen_recording_20250817_235206.mp4
alexpensify commentedon Aug 19, 2025
Thanks for the feedback. I've asked for a retest here - https://expensify.slack.com/archives/C9YU7BX5M/p1755563105743859
kavimuru commentedon Aug 19, 2025
Bug is not reproducible
1000141977.mp4
alexpensify commentedon Aug 20, 2025
Thanks! Based on this feedback, I'm going to close this GitHub.