Skip to content

[IOS] Delete workspace crash #12330

@aldo-expensify

Description

@aldo-expensify

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


I get this crash in the IOS simulator, the crash seems to come from here:

https://github.com/Expensify/react-native-onyx/blob/91aabb7219ddc8722cc2955de0398b1ae70c546d/lib/Onyx.js#L1089

When we get an Onyx update setting a deleted workspace to null.

From the AsyncStorage.multiMerge documentation, it seems like for a pair of key / value, it is expected that the value is a string (stringified JSON).

I'm wondering if we should be calling JSON.stringify on the value if the value is null (JSON.stringify(null) === 'null'). Alternatively, maybe if the value is null we should be clearing the keys from the storage using Storage.multiClear.

Action Performed:

  1. Login in IOS
  2. Create a workspace
  3. Delete the workspace

Expected Result:

Workspace get deleted, no error

Actual Result:

image

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platform:

Where is this issue occurring?

  • iOS

Version Number:
Reproducible in staging?:
Reproducible in production?:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:

View all open jobs on GitHub

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2InternalRequires API changes or must be handled by Expensify staffReviewingHas a PR in review

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions