Skip to content

Full story issue : Unclear error message when deleting workspace with outstanding subscription payment #60676

Closed

Description

@m-natarajan

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:
Reproducible in staging?: Needs Reproduction
Reproducible in production?: Needs Reproduction
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: @joekaufmanexpensify
Slack conversation (hyperlinked to channel name): #Convert

Action Performed:

  1. Have a workspace with an active subscription where we don't allow downgrading without paying the last payment.
  2. Try and delete the workspace from the workspaces page.

Expected Result:

If deleting a workspace requires making a final payment to downgrade, the user should always be prompted to complete the payment when attempting to delete the workspace.

Actual Result:

When attempting to delete a workspace from the Workspaces page in this scenario, an error message is shown (Auth DeletePolicy returned an error) instead of prompting the user to make the final payment to downgrade.
(Note: If the deletion is initiated from the workspace’s Overview page, the user is correctly prompted to pay to downgrade.)

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Full story session and screen shots are in OP

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @blimpich

Activity

  1. added
    Bug
    Daily
    Needs Reproduction
    retest-weekly
    on Apr 22, 2025
  2. melvin-bot commented on Apr 22, 2025

    @melvin-bot

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

  3. MelvinBot commented on Apr 22, 2025

    @MelvinBot
    Contributor

    This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

  4. self-assigned this
    on Apr 22, 2025
  5. blimpich commented on Apr 22, 2025

    @blimpich
    Contributor

    I'm gonna look into this, might take a little bit cause my plate is pretty full, but this is related to a project I worked on

  6. shubham1206agra commented on Apr 23, 2025

    @shubham1206agra
    Contributor

    @dukenv0307 This issue falls under the regression period for #59070.

  7. blimpich commented on Apr 23, 2025

    @blimpich
    Contributor

    It falls under the regression period but the repro steps are incomplete. This doesn't repro for me. @dukenv0307 @jayeshmangwani are you able to reproduce this?

  8. jayeshmangwani commented on Apr 23, 2025

    @jayeshmangwani
    Contributor

    I'm unable to reproduce the bug mentioned in the description. The main reason is that none of my testing accounts have been billed, so I can't access the "Pay & Downgrade" page. Also, the ngrok test account we were using previously is working fine.

  9. blimpich commented on Apr 23, 2025

    @blimpich
    Contributor

    Alright this is a legit bug and I figured out how to reproduce it. Probably has to due with onyx weirdness. @dukenv0307 @jayeshmangwani here are repro steps, please follow them exactly otherwise it won't reproduce. This is going to be follow up for #59070 since this falls within the regression period. Let me know if I need to update the backend somehow to fix this.

    Repro steps:

    1. using my ngrok log into ppu+v2@test.com
    2. click on "account" to go to the settings page and then click on "Workspaces." Don't go anywhere else first!
    3. click on the vertical ellipsis and click "Delete workspace" from menu

    Notice how CalculateBill isn't called? It should be getting called here.

    1. click red "Delete" button on modal

    This errors out because we're not calling the right command. We should be calling CalculateBill and then PayAndDowngrade, but instead we're calling DeleteWorkspace.

    1. go to the subscription page
    2. go back to the workspace page
    3. click on "Delete workspace" from menu again

    Notice how CalculateBill is called now? I imagine the onyx data we're using in the workspaces page isn't up to date. Can you diagnose exactly what the issue is here now that we have repro steps?

  10. added
    Reviewing
    on Apr 24, 2025
  11. blimpich commented on Apr 25, 2025

    @blimpich
    Contributor

    PR was merged. Waiting on Monday deploy.

  12. blimpich commented on Apr 29, 2025

    @blimpich
    Contributor

    This is finished

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

Metadata

Metadata

Labels

BugDailyNeeds ReproductionReviewingretest-weekly

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions