App icon indicating copy to clipboard operation
App copied to clipboard

[Due for payment 2025-12-30] [Due for payment 2025-12-26] [$250] Workspace - App crashes after deleting workspace

Open jponikarchuk opened this issue 1 month ago โ€ข 18 comments

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.2.81-5 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: Exploratory Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.1 / Chrome App Component: Workspace Settings

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Overview.
  3. Click More > Delete.
  4. Delete the workspace.

Expected Result:

App will not crash after deleting workspace.

Actual Result:

App crashes after deleting workspace.

Workaround:

Unknown

Platforms:

  • [ ] Android: App
  • [ ] Android: mWeb Chrome
  • [ ] iOS: App
  • [ ] iOS: mWeb Safari
  • [ ] iOS: mWeb Chrome
  • [x] Windows: Chrome
  • [x] MacOS: Chrome / Safari

Screenshots/Videos

https://github.com/user-attachments/assets/9abb93fe-c20d-4bee-9b50-50725dfdc511

logs.txt

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022001782468415804977
  • Upwork Job ID: 2001782468415804977
  • Last Price Increase: 2025-12-18
Issue OwnerCurrent Issue Owner: @twisterdotcom

jponikarchuk avatar Dec 18 '25 17:12 jponikarchuk

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

melvin-bot[bot] avatar Dec 18 '25 18:12 melvin-bot[bot]

Proposal

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

App crashes after deleting workspace.

What is the root cause of that problem?

domain.email can be undefined here

https://github.com/Expensify/App/blob/5ecfb3c6f55b598e75d3325796881e545c23a87f/src/pages/workspace/WorkspacesListPage.tsx#L596

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

We should early return here if we don't have domain.email which will fix the root cause of app crashes

            if (!domain || !domain.email) { // We can add more fields here
                return domainItems;
            }

https://github.com/Expensify/App/blob/5ecfb3c6f55b598e75d3325796881e545c23a87f/src/pages/workspace/WorkspacesListPage.tsx#L587-L590

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

daledah avatar Dec 18 '25 18:12 daledah

Proposal

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

App crashes after deleting workspace.

What is the root cause of that problem?

After creating the workspace, domain data is returned from the backend without the email field.

Image

Then the app crashes here because domain.email is undefined

https://github.com/Expensify/App/blob/5ecfb3c6f55b598e75d3325796881e545c23a87f/src/pages/workspace/WorkspacesListPage.tsx#L596

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

If email is an option from the domain data, we should update the email field as optional here

https://github.com/Expensify/App/blob/5ecfb3c6f55b598e75d3325796881e545c23a87f/src/types/onyx/Domain.ts#L18

And fix all related errors.

What alternative solutions did you explore? (Optional)

The bug should be fixed on the backend if the domain data is wrong here.

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

nkdengineer avatar Dec 18 '25 18:12 nkdengineer

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

melvin-bot[bot] avatar Dec 18 '25 22:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 18 '25 22:12 melvin-bot[bot]

Adding External but it does sound like this should be Internal. Maybe @ShridharGoel can confirm. If so, we just need the answers to these Q's and we can make it a Hot pick.

twisterdotcom avatar Dec 18 '25 22:12 twisterdotcom

For Internal labelled issues, we need to know the following things:

### What is the expected behavior of the backend?

### What is the actual behavior of the backend?

### What data are you passing to the backend?

### What data is the backend returning?

### What data do you think the backend should be returning?

Can anybody help answer these so we can move it along?

twisterdotcom avatar Dec 18 '25 22:12 twisterdotcom

Hello @twisterdotcom QA team found 3 similar issue. Should we create a new issues for those, or will it be fixed together with this one?

App crashes after tapping back button after creating a workspace

  1. Navigate to https://staging.new.expensify.com/
  2. Go to Workspace tab
  3. Create a new workspace
  4. Click the back button

Bug7033145_1766085809783!Console.txt

https://github.com/user-attachments/assets/f75c1371-e381-4be3-a7ec-6757640d11a1

iOS - App crashes after creating workspace

  1. Open iOS App
  2. Login and validate new gmail account
  3. Create new workspace

Bug7033253_1766096171782!iOS-New-WS-create-crash-log.txt

https://github.com/user-attachments/assets/be987048-c751-4dae-9eae-fc0782a77c1b

Transitions OD- App crashes when user tap "Try New Expensify" after creating a WS

  1. Navigate to https://staging.new.expensify.com/
  2. Navigate to the Account settings page > Troubleshoot
  3. Click on "Switch to Expensify Classic" > Click on "Take me to Expensify Classic"
  4. Navigate to Settings > Workspaces
  5. Create a New workspace
  6. Navigate to the "Expenses" tab in OD
  7. Click the "Try New Expensify" button available in the Classic interface Result: It crashes
  8. Click on "Refresh" Result: It crashes

Bug7033245_1766095398462!logapp.txt

https://github.com/user-attachments/assets/b839e5ba-1e5c-4f8a-99f1-d35c0c0eaeaa

mitarachim avatar Dec 19 '25 02:12 mitarachim

Checking

ShridharGoel avatar Dec 19 '25 04:12 ShridharGoel

What is the expected behavior of the backend?

If a domain exists, backend should send a full domain entry (with email and other fields). If no domain is there, it shouldnโ€™t send a domain_<id> entry at all.

What is the actual behavior of the backend?

Some responses (e.g., CreateWorkspace) send a domain_ entry that only has an admin-permissions field and no email.

What data are you passing to the backend?

Workspace creation request (CreateWorkspace) with its params.

What data is the backend returning?

An Onyx update for domain_<id> containing only expensify_adminPermissions_*, no email.

What data do you think the backend should be returning?

Either no domain entry (if none should exist) or a complete domain object with email (and other expected domain fields), not a partial that drops email.

๐ŸŽ€ ๐Ÿ‘€ ๐ŸŽ€ C+ reviewed

ShridharGoel avatar Dec 19 '25 05:12 ShridharGoel

Triggered auto assignment to @NikkiWines, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] avatar Dec 19 '25 05:12 melvin-bot[bot]

This is fixed, we need to pay $250 to @ShridharGoel for review and testing

mountiny avatar Dec 19 '25 12:12 mountiny

This is fixed, we need to pay $250 to @ShridharGoel for review and testing

I was also testing ๐Ÿ˜ข

ZhenjaHorbach avatar Dec 19 '25 12:12 ZhenjaHorbach

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

melvin-bot[bot] avatar Dec 19 '25 12:12 melvin-bot[bot]

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.2.83-0 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/78113

If no regressions arise, payment will be issued on 2025-12-26. :confetti_ball:

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

  • @ShridharGoel requires payment through NewDot Manual Requests

melvin-bot[bot] avatar Dec 19 '25 12:12 melvin-bot[bot]

@ShridharGoel @twisterdotcom 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[bot] avatar Dec 19 '25 12:12 melvin-bot[bot]

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.2.85-7 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/78113

If no regressions arise, payment will be issued on 2025-12-30. :confetti_ball:

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

  • @ShridharGoel requires payment through NewDot Manual Requests

melvin-bot[bot] avatar Dec 23 '25 00:12 melvin-bot[bot]

@ShridharGoel @twisterdotcom 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[bot] avatar Dec 23 '25 00:12 melvin-bot[bot]

@mallenexpensify Can you handle the payment summary here since the assigned BZ is OOO? Looks like the checklist shouldn't be needed.

Payment was due on 26th Dec.

ShridharGoel avatar Dec 29 '25 17:12 ShridharGoel

Payment Summary

Contributor+: @ShridharGoel due $250 via NewDot

@ShridharGoel plz complete the BZ checklist.

mallenexpensify avatar Dec 29 '25 23:12 mallenexpensify

BugZero Checklist:

  • [ ] [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

  • [ ] [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

  • [x] [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.

Regression Test Proposal Template

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

    Link to issue: https://github.com/Expensify/Expensify/issues/582957

Regression Test Proposal

Test:

  1. Login to Expensify.
  2. Go to Workspace settings > Overview
  3. Click More > Delete
  4. Delete the workspace
  5. It should get deleted without crashing the app.
  6. Repeat the same steps for an account with a custom domain.

Do we agree ๐Ÿ‘ or ๐Ÿ‘Ž

Zapier Logs Run ID: 00040eee-9e16-aa22-2092-bbb2479b9e14

ShridharGoel avatar Dec 30 '25 08:12 ShridharGoel

^ Test case created

Regarding potential compensation for @ZhenjaHorbach , I reviewed and chatted with them about it. We appreciate the urgent help with this nasty bug, unfortunately @ShridharGoel was already assigned to this issue as was able to work on it with urgency, so compensation isn't due.

mallenexpensify avatar Dec 30 '25 16:12 mallenexpensify