Skip to content

[HOLD for payment 2023-10-30] [HOLD for payment 2023-10-27] [$500] Workspace - Crash when deleting a workspace #30078

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.3.87.1
Reproducible in staging?: y
Reproducible in production?: n
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
Expensify/Expensify Issue URL:
Issue reported by: @bernhardoj
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697777999060829

Action Performed:

Prerequisite: have a workspace

  1. Open the workspace #admins or #announce chat
  2. Press the chat header to open the details
  3. Press the workspace name below the chat name. You will be navigated to the workspace page.
  4. Delete the workspace. You will be navigated back to the chat details.

Expected Result:

No crash happens

Actual Result:

After the user is navigated back to the chat details, the app crashed

Workaround:

Unknown

Platforms:

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

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

Screenshots/Videos

Android: Native
Screen.Recording.2023-10-20.at.12.32.41.mov
Android: mWeb Chrome
Screen.Recording.2023-10-20.at.12.38.23.mov
iOS: Native
Screen.Recording.2023-10-20.at.12.37.51.mov
iOS: mWeb Safari
Screen.Recording.2023-10-20.at.12.39.09.mov
MacOS: Chrome / Safari
Screen.Recording.2023-10-20.at.12.26.03.mov
Recording.5089.mp4
MacOS: Desktop
Screen.Recording.2023-10-20.at.12.39.36.mov

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01da3b9ed2ccdd9252
  • Upwork Job ID: 1715358049654792192
  • Last Price Increase: 2023-10-20
  • Automatic offers:
    • fedirjh | Reviewer | 27294854
    • bernhardoj | Contributor | 27294856
    • bernhardoj | Reporter | 27294858

Activity

  1. added
    DeployBlockerCash
    on Oct 20, 2023
  2. kbecciv commented on Oct 20, 2023

    @kbecciv
    Author

    Proposal by: @bernhardoj
    Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697777999060829

    Proposal

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

    App crashes after deleting a workspace if we open it from the report details page.

    What is the root cause of that problem?

    When we successfully delete a workspace, the BE response will return an onyx data to set the deleted policy to null. Because the policy data is null, we got an error when trying to access its id property here (which is being used in the report details page).

    const isPolicyMember = (policyID, policies) => _.some(policies, (policy) => policy.id === policyID);

    looks like Onyx initially sent the null policy to the subscriber, but after we refresh, the null policy is removed from the collection
    This issue happens after #27966 where isPolicyMember is first introduced.

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

    We need to safely access the id using lodashGet

    lodashGet(policy, 'id') === policyID
    
  3. OSBotify commented on Oct 20, 2023

    @OSBotify
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  4. melvin-bot commented on Oct 20, 2023

    @melvin-bot

    Triggered auto assignment to @dangrous (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  5. dangrous commented on Oct 20, 2023

    @dangrous
    Contributor

    Lovely! I'll make this external and assign you @bernhardoj

  6. added
    External
    on Oct 20, 2023
  7. changed the title [-]Workspace - Crash when deleting a workspace[/-] [+][$500] Workspace - Crash when deleting a workspace[/+] on Oct 20, 2023
  8. melvin-bot commented on Oct 20, 2023

    @melvin-bot
  9. added
    Help Wanted
    on Oct 20, 2023
  10. 28 remaining items

  11. melvin-bot commented on Oct 23, 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
  12. dangrous commented on Oct 23, 2023

    @dangrous
    Contributor

    added you @zanyrenney to handle payment when it's needed! (10/30)

  13. zanyrenney commented on Oct 26, 2023

    @zanyrenney
    Contributor

    sounds good ! I have ensured alll the contributors are already hired on the issue.

  14. fedirjh commented on Oct 26, 2023

    @fedirjh
    Contributor

    BugZero Checklist:

    • Link to the PR: UI for room invitations/removals #27966
    • Link to comment: UI for room invitations/removals #27966 (comment)
    • Link to discussion: N/A I think this could be caught during PR review. The PR appears quite extensive, making it easier for such bugs to go unnoticed in the review process.
    • Determine if we should create a regression test for this bug: I don't think we should require a regression test for this case, but in case we need one :

    Regression Test Proposal

    1. Open the workspace #admins or #announce chat of any workspace
    2. Press the chat header to open the details
    3. Press the workspace name below the chat name. You will be navigated to the workspace page.
    4. Delete the workspace. You will be navigated back to the chat details.
    5. Verify the app doesn't crash
    • Do we agree 👍 or 👎
  15. dangrous commented on Oct 26, 2023

    @dangrous
    Contributor

    I like the test, I think it's worth adding the regression test since this would probably be somewhat common (and that way it would get caught sooner).

  16. added
    Daily
    and removed
    Daily
    on Oct 27, 2023
  17. zanyrenney commented on Oct 30, 2023

    @zanyrenney
    Contributor

    From Oct 20 so urgency bonus was still "live"

  18. zanyrenney commented on Oct 30, 2023

    @zanyrenney
    Contributor

    Payment summary

    @fedirjh requires payment offer (Reviewer) - paid $500 + $250 urgency
    @bernhardoj requires payment offer (Contributor) paid $500 + $250 urgency
    @bernhardoj requires payment offer (Contributor) paid $50 reporting

    regression test requested, all other actions complete.

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyEngineeringExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions