Skip to content
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 2025-02-04] [$250] Web - Workspace - Onyx and DOMException console errors appear when uploading workspace picture #47150

Closed
1 of 6 tasks
IuliiaHerets opened this issue Aug 9, 2024 · 69 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Aug 9, 2024

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: 9.0.18-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: https://expensify.testrail.io/index.php?/tests/view/4837010&group_by=cases:section_id&group_id=229065&group_order=asc
Issue reported by: Applause Internal Team

Action Performed:

  1. Navigate to https://staging.new.expensify.com/
  2. Log in with a new Gmail account
  3. Create a workspace
  4. Navigate to Workspace settings - Profile
  5. Click on Edit photo - Upload photo
  6. Upload any photo

Expected Result:

There shouldn't be any console errors when uploading a workspace picture.

Actual Result:

Onyx and DOMException console errors appear when uploading a workspace picture.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

log.txt

Bug6566433_1723189504458.bandicam_2024-08-09_09-34-52-799.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015036ca3d15e0f1c7
  • Upwork Job ID: 1823749808548336240
  • Last Price Increase: 2024-12-19
  • Automatic offers:
    • allgandalf | Contributor | 105441400
    • shubham1206agra | Contributor | 105441407
Issue OwnerCurrent Issue Owner: @zanyrenney
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 9, 2024
Copy link

melvin-bot bot commented Aug 9, 2024

Triggered auto assignment to @zanyrenney (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.

@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@IuliiaHerets
Copy link
Author

@zanyrenney 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

@melvin-bot melvin-bot bot added the Overdue label Aug 12, 2024
@zanyrenney
Copy link
Contributor

This seems like a internal issue. I'm going to apply the internal label and see if we can get some more eyes on this!

@melvin-bot melvin-bot bot removed the Overdue label Aug 12, 2024
@zanyrenney zanyrenney added the Internal Requires API changes or must be handled by Expensify staff label Aug 12, 2024
@zanyrenney
Copy link
Contributor

took another look. i think this can be external!

@zanyrenney zanyrenney added External Added to denote the issue can be worked on by a contributor and removed Internal Requires API changes or must be handled by Expensify staff labels Aug 14, 2024
@melvin-bot melvin-bot bot changed the title Web - Workspace - Onyx and DOMException console errors appear when uploading workspace picture [$250] Web - Workspace - Onyx and DOMException console errors appear when uploading workspace picture Aug 14, 2024
Copy link

melvin-bot bot commented Aug 14, 2024

Job added to Upwork: https://www.upwork.com/jobs/~015036ca3d15e0f1c7

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 14, 2024
Copy link

melvin-bot bot commented Aug 14, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 (External)

@zanyrenney
Copy link
Contributor

similar issue #23468

@AlfredoAlc
Copy link
Contributor

AlfredoAlc commented Aug 15, 2024

Edited by proposal-police: This proposal was edited at 2024-09-03 18:27:01 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

Onyx and DOMException console errors appear when uploading a workspace picture.

What is the root cause of that problem?

The error is caused by saving a File to Onix store, we can only store serializable data. This is happening in the SaveResponseInOnyx middleware.

Inside of that middleware we do some checks to determine if we should apply or update the response we receive. In this case, we get all the way to the saveUpdateInformation function which calls Onyx.set() with the following params:

const responseToApply = {
    type: CONST.ONYX_UPDATE_TYPES.HTTPS,
    lastUpdateID: Number(response?.lastUpdateID ?? 0),
    previousUpdateID: Number(response?.previousUpdateID ?? 0),
    request,
    response: response ?? {},
};

The request prop has the Image File inside of it which is causing the error.

What changes do you think we should make in order to solve the problem?

Remove the File from the request prop if exists. I recommend doing this in the saveUpdateInformation function. We can also include only some information like the name of the file if needed.

With this change we could fix also the similar issue mentioned above and prevent having this errors on any other calls that saves files.

What alternative solutions did you explore? (Optional)

NA

Copy link

melvin-bot bot commented Aug 19, 2024

@ahmedGaber93, @zanyrenney Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot melvin-bot bot added the Overdue label Aug 19, 2024
@ahmedGaber93
Copy link
Contributor

Reviewing today

@ahmedGaber93
Copy link
Contributor

I think this similar to #44824, asking if it will fix there or not #44824 (comment)

Copy link

melvin-bot bot commented Aug 21, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Aug 23, 2024

@ahmedGaber93 @zanyrenney this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Aug 23, 2024
@melvin-bot melvin-bot bot added the Awaiting Payment Auto-added when associated PR is deployed to production label Jan 28, 2025
@melvin-bot melvin-bot bot changed the title [$250] Web - Workspace - Onyx and DOMException console errors appear when uploading workspace picture [HOLD for payment 2025-02-04] [$250] Web - Workspace - Onyx and DOMException console errors appear when uploading workspace picture Jan 28, 2025
Copy link

melvin-bot bot commented Jan 28, 2025

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 28, 2025
Copy link

melvin-bot bot commented Jan 28, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.89-8 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 2025-02-04. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jan 28, 2025

@shubham1206agra / @allgandalf @zanyrenney @shubham1206agra / @allgandalf The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Feb 3, 2025
@zanyrenney
Copy link
Contributor

hey @shubham1206agra @allgandalf please complete the checklist so that we can move ahead with the payout.

@melvin-bot melvin-bot bot removed the Overdue label Feb 5, 2025
@allgandalf
Copy link
Contributor

👋 @zanyrenney I will be completing the checklist here


@shubham1206agra do you agree that we only need a regression test here and not a checklist as we improved the logic here?

@zanyrenney
Copy link
Contributor

thanks @allgandalf

@zanyrenney
Copy link
Contributor

bump @allgandalf are you able to take a look?

@allgandalf
Copy link
Contributor

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] 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 (This was coded this way, it existed from the very beginning, kudos to @shubham1206agra for figuring out the serialization logic 🙇 )

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

-N/A

Test:

  1. Open App > Create a workspace
  2. Navigate to Workspace settings - Profile
  3. Click on Edit photo - Upload photo
  4. Upload any photo

Verify that you do not see any console error after the photo has been uploaded

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added the Overdue label Feb 10, 2025
Copy link

melvin-bot bot commented Feb 11, 2025

@cristipaval, @zanyrenney, @shubham1206agra, @allgandalf Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented Feb 13, 2025

@cristipaval, @zanyrenney, @shubham1206agra, @allgandalf Eep! 4 days overdue now. Issues have feelings too...

@shubham1206agra
Copy link
Contributor

@zanyrenney Can you send another offer here please?

@zanyrenney
Copy link
Contributor

@melvin-bot melvin-bot bot removed the Overdue label Feb 14, 2025
@zanyrenney
Copy link
Contributor

@shubham1206agra
Copy link
Contributor

@zanyrenney Offer accepted

@melvin-bot melvin-bot bot added the Overdue label Feb 17, 2025
@shubham1206agra
Copy link
Contributor

@zanyrenney Bump here

Copy link

melvin-bot bot commented Feb 18, 2025

@cristipaval, @zanyrenney, @shubham1206agra, @allgandalf Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@zanyrenney
Copy link
Contributor

Thanks @shubham1206agra - working on this for you now!

@melvin-bot melvin-bot bot removed the Overdue label Feb 18, 2025
@zanyrenney
Copy link
Contributor

Payment summary

$250 paid to @allgandalf on upwork
$250 paid to @shubham1206agra on upwork.

Closing this as regression test is also linked in the issue above!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Status: Done
Development

No branches or pull requests

8 participants