Repository navigation
Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.1.67-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: https://expensify.testrail.io/index.php?/tests/view/6286833
Email or phone of affected tester (no customers): agexptest+pr1606.2@gmail.com, applausetester+ag1606.2@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Samsung S23FE/ Android 15
App Component: Money Requests
Action Performed:
Precondition: Have a scan expense in a workspace.
The Expensify Hybrid app has camera permission enabled.
- Open the Expensify Hybrid app
- Log in with any account as admin or employee
- Go to any scan expense details
- Tap the receipt preview
- Tap on the three-dot menu > Replace > Image icon > Choose file
- Select a corrupted PDF file
- Note that the attachment error is shown, and the background turns black
- Tap Ok
- Tap the green circle button
- Tap the back arrow at the top left
- Note that a camera error message is shown before go back to the expense details
Expected Result:
After step 7, the camera remains activated in the background. The user can repeat the file selection.
If there is an issue with the camera, an error message will appear immediately after tapping the green circle button.
Actual Result:
After trying to upload a corrupt file, the camera is deactivated. After tapping the back arrow, the camera error message is displayed.
Workaround:
Unknown
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
- MacOS: Desktop
Screenshots/Videos
Bug6862105_1750118475193.camera_deactivated.mp4
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021935841655617073597
- Upwork Job ID: 1935841655617073597
- Last Price Increase: 2025-06-19
- Automatic offers:
- dominictb | Reviewer | 107779728
- nyomanjyotisa | Contributor | 107779729
Issue Owner
Current Issue Owner: @RachCHopkinsMetadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone

Activity
melvin-bot commentedon Jun 17, 2025
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.RachCHopkins commentedon Jun 17, 2025
@mitarachim do you have a corrupt PDF file I can triage with?
mitarachim commentedon Jun 17, 2025
Hello @RachCHopkins , sorry i forgot to attach.
we can use below corrupted files (pdf and jpg)
Corrupted PDF.pdf
nyomanjyotisa commentedon Jun 17, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Scan-After selecting a corrupt file, the camera is deactivated
What is the root cause of that problem?
When a corrupted PDF file is selected through the
AttachmentPicker, theonClosedcallback is executed which only setssetIsLoaderVisible(false), but we did not reset thedidCapturePhotostate variable that controls camera activationApp/src/pages/iou/request/step/IOURequestStepScan/index.native.tsx
Lines 893 to 895 in 7b6e4e1
When file selection fails due to corruption, the
didCapturePhotostate is never reset causing the state remainstrue, which prevents further camera operationsWhat changes do you think we should make in order to solve the problem?
We could reset the
didCapturePhotostate by setting it tofalseto ensure the camera remains available for further operationsApp/src/pages/iou/request/step/IOURequestStepScan/index.native.tsx
Lines 893 to 895 in 7b6e4e1
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
None
RachCHopkins commentedon Jun 19, 2025
Can repro!
20 remaining items
dominictb commentedon Jul 8, 2025
@RachCHopkins PR #64781 (comment) hit production 7 days ago. Ready for payment.
dominictb commentedon Jul 8, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: NA, this is an edge case that happens on specific devices and operating systems which depends on manufacturer configurations
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Note: No regression test is needed because this is a extreme edge case that happens on specific devices and operating systems. There is no consistent reliable reproduce steps.
melvin-bot commentedon Jul 17, 2025
This issue has not been updated in over 15 days. @justinpersaud, @RachCHopkins, @nyomanjyotisa, @dominictb 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!
[-][$250] Scan-After selecting a corrupt file, the camera is deactivated[/-][+][Ready for payment] [$250] Scan-After selecting a corrupt file, the camera is deactivated[/+]RachCHopkins commentedon Jul 18, 2025
Payment Summary:
Upwork job here
RachCHopkins commentedon Jul 18, 2025
Contributors have both been paid, the contracts have been completed, and the Upwork post has been closed.