You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-10-10] [$250] Profile - No error after uploading corrupted jpg for avatar, console error shows up #48707
Version Number: 9.0.30-7 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers):applausetester+kh010901@applause.expensifail.com Issue reported by: Applause - Internal Team
Action Performed:
Go to staging.new.expensify.com
Go to Account settings > Profile
Click on the avatar > Upload photo
Upload a corrupted jpg file (attached below)
Expected Result:
Error will show up saying that the file is corrupted
Actual Result:
Nothing happens after uploading corrupted jpg for avatar. Console error shows up
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
@RachCHopkins FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
changed the title [-]Profile - No error after uploading corrupted jpg for avatar, console error shows up[/-][+][$250] Profile - No error after uploading corrupted jpg for avatar, console error shows up[/+]on Sep 10, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.43-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve 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:
[@Ollyws] The PR that introduced the bug has been identified. Link to the PR:
[@Ollyws] 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:
[@Ollyws] A discussion in #expensify-bugs 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:
[@Ollyws] Determine if we should create a regression test for this bug.
[@Ollyws] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@RachCHopkins] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
The PR that introduced the bug has been identified. Link to the PR:
No PR was responsible this was just never added here.
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:
N/A
A discussion in #expensify-bugs 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:
N/A
Determine if we should create a regression test for this bug.
Yes
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
1. Go to Account settings > Profile
2. Click on the avatar > Upload photo
3. Upload a corrupted jpg file (link can be found in https://github.com/Expensify/App/pull/49203)
4. Verify error message is shown below the Avatar
Activity
melvin-bot commentedon Sep 6, 2024
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.lanitochka17 commentedon Sep 6, 2024
@RachCHopkins FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Nodebrute commentedon Sep 6, 2024
@lanitochka17 wrong file attached.
Krishna2323 commentedon Sep 6, 2024
Edited by proposal-police: This proposal was edited at 2024-09-06 12:57:22 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Profile - No error after uploading corrupted jpg for avatar, console error shows up
What is the root cause of that problem?
There is no validation added for the corrupted images.
App/src/components/AvatarWithImagePicker.tsx
Lines 220 to 253 in fd86641
What changes do you think we should make in order to solve the problem?
FileUtils.validateImageForCorruption(image)in the validation funtion.Pseudocode
alignSelfCenterstyle.App/src/components/AvatarWithImagePicker.tsx
Line 375 in fd86641
AvatarWithImagePickerinProfilePage.What alternative solutions did you explore? (Optional)
Result
RachCHopkins commentedon Sep 9, 2024
@Nodebrute what is the correct file for me to use for testing? Or, how does one create a "corrupted" jpeg file?
Krishna2323 commentedon Sep 9, 2024
@RachCHopkins, please use the file below for testing.
RachCHopkins commentedon Sep 10, 2024
Reproduced. As a user it feels really weird cos just nothing happens.
[-]Profile - No error after uploading corrupted jpg for avatar, console error shows up[/-][+][$250] Profile - No error after uploading corrupted jpg for avatar, console error shows up[/+]melvin-bot commentedon Sep 10, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021833355156424317364
20 remaining items
melvin-bot commentedon Oct 3, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.43-6 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 2024-10-10. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Oct 3, 2024
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:
RachCHopkins commentedon Oct 10, 2024
Contributor has been paid, the contract has been completed, and the Upwork post has been closed.
RachCHopkins commentedon Oct 10, 2024
@Ollyws are there any regression tests needed here?
Ollyws commentedon Oct 11, 2024
BugZero Checklist:
No PR was responsible this was just never added here.
N/A
N/A
Yes
Ollyws commentedon Oct 11, 2024
@RachCHopkins Could we get a payment summary so I can request in ND? Thanks!
RachCHopkins commentedon Oct 14, 2024
Sorry @Ollyws I didn't notice that Melvin left that little detail out!
Payment Summary:
Upwork job here
Ollyws commentedon Oct 14, 2024
Requested in ND.
garrettmknight commentedon Oct 15, 2024
$250 approved for @Ollyws