Skip to content

[HOLD for C+ payment and bugzero checklist] [$500] Workspace - App crashes on member's side when deleting a workspace #28336

Closed

Description

@izarutskaya

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:

  1. Open two new accounts
  2. Create a workspace on account A
  3. Invite account B as a member on account A's workspace
  4. Go to announce room on account B
  5. Send a message
  6. Hover over the last sent message and click on reply in thread
  7. Send a message inside the thread
  8. Go to account A and click on the workspace settings and delete the workspace
  9. Observe account B

Expected Result:

App should not crash

Actual Result:

App crashes

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: v1.3.74-2

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

2023-09-22.18.47.19.mp4
Recording.1662.mp4

Expensify/Expensify Issue URL:

Issue reported by: @Nathan-Mulugeta

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1695397800777089

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0198d8205c8f8f5131
  • Upwork Job ID: 1707090926479659008
  • Last Price Increase: 2023-09-27
  • Automatic offers:
    • c3024 | Contributor | 26964208
    • Nathan-Mulugeta | Reporter | 26964210

Activity

  1. added
    External
    Daily
    Bug
    on Sep 27, 2023
  2. c3024 commented on Sep 27, 2023

    @c3024
    Contributor

    Proposal

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

    App crashes on other User B side when a User A deletes a workspace.

    What is the root cause of that problem?

    When User A deletes the workspace, the report of rooms of the workspace are removed so in this here

    App/src/libs/ReportUtils.js

    Lines 854 to 855 in b57f6d2

    const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]);
    if (hasSingleParticipant(parentReport)) {

    parentReport is undefined so this here

    App/src/libs/ReportUtils.js

    Lines 658 to 660 in b57f6d2

    function hasSingleParticipant(report) {
    return report.participantAccountIDs && report.participantAccountIDs.length === 1;
    }

    fails because report is undefined.

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

    Add a check for report in the above function

    return report && report.participantAccountIDs && report.participantAccountIDs.length === 1;

    What alternative solutions did you explore? (Optional)

    Result
    screen-recording-2023-09-30-at-83839-pm_d5z0Rihh.mp4
  3. melvin-bot commented on Sep 27, 2023

    @melvin-bot

    Triggered auto assignment to @kadiealexander (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  4. changed the title [-]Workspace - App crashes on member's side when deleting a workspace[/-] [+][$500] Workspace - App crashes on member's side when deleting a workspace[/+] on Sep 27, 2023
  5. melvin-bot commented on Sep 27, 2023

    @melvin-bot
  6. melvin-bot commented on Sep 27, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  7. added
    Help Wanted
    on Sep 27, 2023
  8. melvin-bot commented on Sep 27, 2023

    @melvin-bot

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

  9. allroundexperts commented on Sep 29, 2023

    @allroundexperts
    Contributor

    @c3024 Can you also post a screen recording of the end result of your proposal as well?

  10. c3024 commented on Sep 30, 2023

    @c3024
    Contributor

    @allroundexperts Updated the proposal with video.

  11. allroundexperts commented on Oct 1, 2023

    @allroundexperts
    Contributor

    Thanks for the video @c3024. That makes sense. Let's move forward with @c3024's proposal.

    🎀 👀 🎀 C+ reviewed

  12. 20 remaining items

  13. added
    Daily
    and removed
    Weekly
    on Oct 11, 2023
  14. kadiealexander commented on Oct 16, 2023

    @kadiealexander
    Contributor

    Payouts due:

    Eligible for 50% #urgency bonus? Yes

    Upwork job is here.

  15. kadiealexander commented on Oct 16, 2023

    @kadiealexander
    Contributor

    @allroundexperts please don't forget the checklist!

  16. changed the title [-][HOLD for payment 2023-10-12] [$500] Workspace - App crashes on member's side when deleting a workspace[/-] [+][HOLD for C+ payment and bugzero checklist] [$500] Workspace - App crashes on member's side when deleting a workspace[/+] on Oct 16, 2023
  17. added
    Weekly
    and removed
    Daily
    on Oct 16, 2023
  18. allroundexperts commented on Oct 18, 2023

    @allroundexperts
    Contributor

    Checklist

    1. I wasn't able to find any particular PR that caused this. I think this is an edge case that we never thought about.
    2. N/A
    3. N/A
    4. A regression test would be useful.

    Regression test

    1. Create two new accounts (Account A and Account B)
    2. Create a workspace on account A and Invite account B as a member on account A's workspace
    3. Go to announce room on account B and Send a message
    4. Hover over the last sent message and click on reply in thread
    5. Send a message inside the thread
    6. Go to account A and click on the workspace settings and delete the workspace
    7. Observe account B and verify that the app doesn't crash.

    Do we 👍 or 👎 ?

  19. JmillsExpensify commented on Oct 23, 2023

    @JmillsExpensify
    Contributor

    $750 payment approved for @allroundexperts based on summary above.

  20. kadiealexander commented on Oct 27, 2023

    @kadiealexander
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugExternalWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions