-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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-08-10] [$1000] Android - User is able to click on download button on share code page after modal shows up if user is clicks rapidly and app crashes #23094
Comments
Triggered auto assignment to @twisterdotcom ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Downloading the Share code multiple times will crash the app on Android, starting on Android 10. What is the root cause of that problem?The download button will call
The error happens on the 3rd step. First, we need to understand why the crash/error happens. Here is the error message of the crash: Based on the stack trace above, the error comes from Notice that the logic is only for Android 10 (Q) and above. I don't find an official documentation stating why the error occurs, but I found a comment mentioning that this error happens when we save the same file name > 30 files. On my Android device, the error starts to happen when saving the 33rd image. So, it's not about quickly pressing the download. We can even reproduce this issue by downloading the same report attachment and 2FA codes > 30 times. Here is the video showing the error on the report attachment. WhatsApp.Video.2023-07-19.at.21.37.17.mp4What changes do you think we should make in order to solve the problem?To allow users to keep downloading the same attachment over and over, we have 2 options:
We actually already have a App/src/libs/fileDownload/index.android.js Lines 73 to 89 in 16a83ac
The problem is, the library that we use, which is +try {
// Keeps a handle to the new file's URI in case we need to modify it later.
return resolver.insert(mediauri, fileDetails);
+} catch (Exception ex) { return null } By returning null on error, it will get rejected here: After we did the above fix, we can now catch the error and retry the file copying with a different file name that is appended with the current time:
|
Okay nice. This is a nice legit bug. |
Job added to Upwork: https://www.upwork.com/jobs/~01ea9db9c8634d571d |
Current assignee @twisterdotcom is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
Ok, @bernhardoj's proposal make sense. I think we should update the upstream lib to throw an error as it will benefit the community and then we can follow your solution 2. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @madmax330, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
I think we should do solution 1. |
📣 @parasharrajat Please request via NewDot manual requests for the Reviewer role ($1000) |
📣 @bernhardoj You have been assigned to this job! |
📣 @Nathan-Mulugeta 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app! |
@madmax330 I have a question. Do we want to append it with the current time on all platforms, or just Android? |
Let's do it for all platforms to keep it consistent. |
Got it! Will come up with the PR in a few hours |
@madmax330 PR is ready for your review. |
Bump @madmax330 |
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one 🚀 |
I think this is eligible for a merge bonus as PR was approved 5 days back and there was no new change request afterward. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.49-3 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-08-10. 🎊 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:
As a reminder, here are the bonuses/penalties that should be applied for any External 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:
|
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:
Regression Test StepsiOS/Android
2FA code download
Chat attachment download
Note: Used library does not currently support changing the name of the file before saving on iOS. Thus you won't see timestamp being added on iOS. Do you agree 👍 or 👎 ? |
Payment requested with bonus. Ref: #23094 (comment) |
Payment summary: |
All paid. |
Review the details for @parasharrajat. Approved for payment in NewDot based on the BZ summary above. |
Hey team, I've identified a bug that appears to be a regression linked to the changes introduced in the current ticket.
|
@kidroca Thanks! Normally we leave regressions for the person who implemented the solution to fix. @bernhardoj Please fix the regression! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
User should not be able to click on the download button more than once then the confirmation modal should show up. App should not crash if user clicks on download button multiple of times
Actual Result:
User is able to click on the download button more than once even after the confirmation modal shows up if user is clicking on the download button rapidly multiple of times. And if user continues to do this for a few seconds app crashes.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.41-3
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
Notes/Photos/Videos: Any additional supporting documentation
Screen_Recording_20230718_100949_One.UI.Home.mp4
Screen_Recording_20230718_103253_One.UI.Home.mp4
Expensify/Expensify Issue URL:
Issue reported by: @Nathan-Mulugeta
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689664399381639
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: