-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HOLD for payment 2023-11-22] [$500] Scan receipt - Crash when trying to download a receipt while in scanning process #30616
Comments
Triggered auto assignment to @maddylewis ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~0128ad4c7b2932ce1f |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Scan receipt - Crash when trying to download a receipt while in the scanning process What is the root cause of that problem?The App/src/pages/home/report/ReportAttachments.js Lines 35 to 43 in ec7fb3c
The property "originalFileName" is used to set the file structure App/src/components/AttachmentModal.js Lines 188 to 199 in 6ec9dd5
As the "originalFileName" is an empty string, when the What changes do you think we should make in order to solve the problem?We should change the What alternative solutions did you explore? (Optional)N/A POC poc-issue-30616.mp4 |
ProposalPlease re-state the problem that we are trying to solve in this issue.When attempting to download a receipt while in scanning process, Expensify crashes What is the root cause of that problem?In here, we're not passing the The purpose of the original file name is that when the user downloads, we want it to have readable file name and recognizable to the user since it's the original name of the file the user uploaded. What changes do you think we should make in order to solve the problem?
We need to update it to:
What alternative solutions did you explore? (Optional)If we don't want to add original file name for receipt, the step 2 and 3 in the solution should be enough, since that is also the fallback logic we used earlier. |
ProposalPlease re-state the problem that we are trying to solve in this issue.App crashes when download attachment before being uploaded to server What is the root cause of that problem?App/src/components/AttachmentModal.js Line 356 in 444a908
Above function is memoized and not re-calculated when file is set below:
App/src/components/AttachmentModal.js Line 153 in 444a908
So even if App/src/components/AttachmentModal.js Lines 188 to 199 in 444a908
What changes do you think we should make in order to solve the problem?Add App/src/components/AttachmentModal.js Line 394 in 444a908
Addon: App/src/components/AttachmentModal.js Lines 378 to 382 in 444a908
So wrap this with if (file) condition
|
@maddylewis, @aimane-chnaif Whoops! This issue is 2 days overdue. Let's get this updated quick! |
I debugged myself and it was indeed memo issue. @dukenv0307 your solution will prevent crash but always generates file name even though real file name exists so workaround. @mkhutornyi's proposal looks good to me. |
Triggered auto assignment to @bondydaa, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @aimane-chnaif 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @mkhutornyi 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
It strikes me as counterintuitive and potentially problematic that users are able to initiate a download of an attachment before the upload process to the server is even finalized. Consider the following inconsistencies:
In my opinion, the download feature should be context-sensitive and only become available when the upload is conclusively complete and the file is in a stable, fully processed form. |
@kidroca this issue is not only tied to local download but also to remote download. Sometimes crashes even when download uploaded image. "While in scanning process" has 2 cases:
Download availability for local image can be out of scope. Should be separate issue |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.99-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-11-22. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@bondydaa, @maddylewis, @aimane-chnaif, @mkhutornyi Eep! 4 days overdue now. Issues have feelings too... |
|
Payment Summary
|
both C+ and Contributor paid via Upwork! |
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: 1.3.93-0
**Reproducible in staging?:**Y
**Reproducible in production?:**Y
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: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
When attempting to download a receipt while in scanning process, Expensify crashes
Actual Result:
It should be possible to download the receipt in all viable scenarios
Extra info: Crash occasionally happens with any type of request (Manual, Scan and Distance)
Uh-oh, something went wrong!
Please try closing and reopening the app or switching to web.
If the problem persists, reach out to [email protected]
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Bug6257345_1698699313430.Web_-_error.mp4
logs.txt
Bug6257345_1698699384771.iOS_-_error.mp4
MacOS: Desktop
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: