-
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 Testrail] [$2000] When the second picture is uploaded, the first picture that was uploaded earlier starts to load again. #17480
Comments
Triggered auto assignment to @twisterdotcom ( |
Bug0 Triage Checklist (Main S/O)
|
I can't reproduce this I'm afraid @usmantariq96. I'm using a Pixel 6. The "loading" circle never appears on the previously uploaded image: https://drive.google.com/file/d/1SsROwvkpTqy8Czds4GVLApEuQau1RWWl/view?usp=sharing Could you check again for me and reopen the issue if you think it's still an issue? |
@twisterdotcom This seems to be easily reproducible for me on Pixel simulator. screen-recording-2023-04-24-at-125803-am_MP9RsBi8.mp4 |
@twisterdotcom I have checked again and yes it is reproducible. |
Bug.4.mp4 |
Ahh I see. Okay yes. I have reproduced it. Super odd we show the loading icon again for attachments. https://drive.google.com/file/d/1XdGiohePS4o_ym8iTps0JZx3qJ6hO1Ca/view?usp=sharing |
Job added to Upwork: https://www.upwork.com/jobs/~012efb7ba2df1f8cb6 |
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 - @aimane-chnaif ( |
Triggered auto assignment to @joelbettner ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Uploading the same picture twice causes the first uploaded picture to show an activity indicator in the report. What is the root cause of that problem?It appears that at some point during the upload process, the system attempts to reuse the same image data from the cache because the uploaded images are effectively the same, which ends up with the image name of the previous uploaded image matching the image name of the newly uploaded image. Although the What changes do you think we should make in order to solve the problem?To fix this issue, call
What alternative solutions did you explore? (Optional)None. |
ProposalPlease re-state the problem that we are trying to solve in this issue.When we upload twice the same image, the second time both images are reloaded What is the root cause of that problem?In ImageWithSizeCalculation here: App/src/components/ImageWithSizeCalculation.js Lines 91 to 95 in 32fbb2c
We show the spinner when the image onLoadStart is called. When we load an image with the same url, onLoadStart is executed again. What changes do you think we should make in order to solve the problem?Unfortunely I don't think there is a way to remove the listener: https://bumptech.github.io/glide/javadocs/420/com/bumptech/glide/RequestBuilder.html So I propose that when the image has been loaded successfully here:
we save the url in the state for example in a variable called urlLoadedSuccessfully and in onLoadStart we verify that the url of the image is different before changing isLoading to true here: App/src/components/ImageWithSizeCalculation.js Lines 54 to 56 in 32fbb2c
So it will only show the spinner if we are reloading a different image. It works fine to resolve the issue. What alternative solutions did you explore? (Optional)
|
@aimane-chnaif any opinions on either of the above proposals? Could we assign @ShogunFire or @akinwale? |
Bump @aimane-chnaif. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@aimane-chnaif - I think given we have @ShogunFire who can somewhat reliably reproduce, even though many of us can't and they believe they have a solution, we should assign them. @joelbettner would you agree? |
@twisterdotcom I agree. |
Okay, assigning @ShogunFire. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.23-7 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-06-12. 🎊 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.
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:
|
@twisterdotcom applied |
All paid out. @aimane-chnaif - we still need the checklist. |
@twisterdotcom this is eligible for timeline bonus |
It's tough to find the offending PR. I think this issue always existed.
|
Why didn't this issue post a comment like this? @ShogunFire assigned at 11:25 AM GMT +1 on May 30, 2023. Huh, what on earth is that code even doing then. |
That comment is when merged in 2 days. But in our case, merged 2 days 11 hrs. |
The code for that is here. It is looking for 3 days: // The urgency bonus applies only when merged within 72 business hours/ 3 days
if ($daysElapsed < 3) { But I think there must be something else up with the logic because it should return a false comment as well: } else {
$urgencyComment = <<<COMMENT
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
- when @$authorGithub got assigned: $dateAssignedFormatted
- when the PR got merged: $nowFormatted
- days elapsed: $daysElapsed
On to the next one 🚀
COMMENT;
} Neither of which posted here. |
Bonuses have been sent |
Ahh good old @mountiny is already on it: https://github.com/Expensify/Web-Expensify/pull/37741. |
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
Each picture should upload smoothly and should not start loading again.
Actual Result
First picture starts to load again once more then one is uploaded.
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.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
Notes/Photos/Videos: Any additional supporting documentation
Bug.2.mp4
Expensify/Expensify Issue URL:
Issue reported by: @usmantariq96
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1681508702020879
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: