App
App copied to clipboard
BUG: Receipt is deleted if app is killed while request is in queue
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: v9.0.55-9 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: See the linked issue below Expensify/Expensify Issue URL: https://github.com/Expensify/Expensify/issues/434533 Issue reported by: @Neil Marcellini
Originally reported internally here
Slack conversation https://expensify.slack.com/archives/C049HHMV9SM/p1730315753190039
Action Performed:
- Go offline
- Submit an expense and scan a receipt with the in app camera, submit it to anyone
- Kill the app
- Re-open the app
- Go back online
Expected Result:
The receipt is uploaded and scanned correctly. If it fails for some reason, then the user is able to download the receipt.
Desired Result:
Store images captured with the in app camera to a non-temporary folder in the application folder within the file system. For example, store images in a folder Receipts-Pending-Upload
under the New Expensify
folder.
We're still discussing in the thread linked below, but maybe after a receipt has been uploaded on the server, delete it from this folder.
Actual Result:
There is an error submitting the expense and no option to download the receipt. If the user dismisses this error then they permanently lose the receipt image.
Notes
I think this happens because we store the receipts in a /tmp/ folder which is cleared when the app is killed (E.g. file:///private/var/mobile/Containers/Data/Application/C5B31E5E-C6BD-4372-B1DF-D1326BDA7B28/tmp/9C8642AF-C0FF-44F9-988A-10B3A752B7A2.jpeg). It's a common nervous habit of iOS users to kill apps whenever they go to the home screen, so it's pretty realistic that this can happen, especially if the SequentialQueue gets a bit backed up.
More discussion in #quality.
Looks like if we upgrade react-native-vision-camera we can specify a path when taking the photo. Or we could manually move the file to our desired location, if upgrading vision camera is really difficult.
Workaround:
Try to take screen shots of the receipt images before dismissing the error and try re-uploading later. Not a very good workaround especially when users trust our app not to lose data.
Platforms:
Which of our officially supported platforms is this issue occurring on?
iOS Standalone, maybe others.
- [ ] Android: Standalone
- [ ] Android: HybridApp
- [ ] Android: mWeb Chrome
- [ ] iOS: Standalone
- [ ] iOS: HybridApp
- [ ] iOS: mWeb Safari
- [ ] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/7f982f57-92ff-48f6-8e78-80bebed7b534