Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.51k stars 2.87k forks source link

[$250] iOS - Track expense - App crashes after deleting expense offline #48197

Open IuliiaHerets opened 2 months ago

IuliiaHerets commented 2 months ago

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: 9.0.25.11 Reproducible in staging?: Y Reproducible in production?: N Issue reported by: Applause Internal Team

Action Performed:

  1. Open the app and log in
  2. Navigate to self-DM
  3. Tap + > Track expense > Manual
  4. Create an expense
  5. Disable the internet connection
  6. Long tap the expense > Delete expense

Expected Result:

The expense is greyed out, the amount is crossed out

Actual Result:

The app crashes

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/2a2aadb6-e40a-4b67-a188-a757b00a0c14

2808.txt

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~013b920bb98479136b
  • Upwork Job ID: 1828958726626801528
  • Last Price Increase: 2024-08-29
  • Automatic offers:
    • jjcoffee | Contributor | 103818924
Issue OwnerCurrent Issue Owner: @jjcoffee
melvin-bot[bot] commented 2 months ago

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

IuliiaHerets commented 2 months ago

We think that this bug might be related to #wave-collect - Release 1

stitesExpensify commented 2 months ago

Switching this to deployblockercash since this is iOS only

melvin-bot[bot] commented 2 months ago

Triggered auto assignment to @chiragsalian (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

github-actions[bot] commented 2 months ago

:wave: 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.
melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

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

suneox commented 2 months ago

This issue look like can not reproduce on the latest main due to context menu doesn't show delete option

https://github.com/user-attachments/assets/6a3f19fc-d26d-412c-82b3-d3c4500a8ba1

NJ-2020 commented 2 months ago

@suneox I think you need to turn off the wifi before deleting the expense and if it still didn't work i think you can try using staging server

NJ-2020 commented 2 months ago

Yes issue are not reproducible from both non-staging and staging server

tsa321 commented 2 months ago

To test, should set the USE_REACT_STRICT_MODE to false to display the context menu properly. I can reproduce the crash issue in main.

chiragsalian commented 2 months ago

Given this is an edge case and we're having a bit of a difficult time solving this immediately, we'll be demoting it to daily, removing blocker and requesting help with this.

hannojg commented 2 months ago

cc @kirillzyusko can you comment here so you can be assigned?

kirillzyusko commented 2 months ago

Sure, feel free to assign this on me πŸ™Œ

suneox commented 2 months ago

@kirillzyusko will work on this issue, so I’d like to self-unassign.​

kirillzyusko commented 2 months ago

Few things that I spotted:

<View style={style}>
    {!hideChildren && (
        children
    )}
    {shouldShowErrorMessages && (
        <ErrorMessageRow
            errors={errors}
            errorRowStyles={errorRowStyles}
            onClose={onClose}
            canDismissError={canDismissError}
        />
    )}
</View>

then crash also goes away.

I think the problem is hidden somewhere in this code:

<View
    style={[needsOpacity ? styles.offlineFeedback.pending : {}, contentContainerStyle]}
    needsOffscreenAlphaCompositing={shouldRenderOffscreen ? needsOpacity && needsOffscreenAlphaCompositing : undefined}
>

Because as soon as I remove it the crash is not happening anymore.

I'll continue my investigation tomorrow and hopefully will provide a fix!

kirillzyusko commented 2 months ago

I opened a PR with a fix here: https://github.com/Expensify/App/pull/48474

jjcoffee commented 1 month ago

@chiragsalian Can you assign me here as I've been auto-assigned for reviewing the PR? Thanks! :pray:

melvin-bot[bot] commented 1 month ago

πŸ“£ @jjcoffee πŸŽ‰ An offer has been automatically sent to your Upwork account for the Contributor role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review πŸ§‘β€πŸ’» Keep in mind: Code of Conduct | Contributing πŸ“–

jjcoffee commented 1 month ago

Regression Test Proposal

(Native mobile only)

  1. Navigate to self-DM
  2. Tap + > Track expense > Manual
  3. Create an expense
  4. Disable the internet connection
  5. Long tap the expense > Delete expense
  6. Verify that the app does not crash

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

jjcoffee commented 1 month ago

@VictoriaExpensify This was deployed Sept 12, so should be ready for payment now.

jjcoffee commented 1 month ago

@VictoriaExpensify Friendly bump for the payment on this. Thanks! :pray:

VictoriaExpensify commented 1 month ago

Payment summary: Contributor: @kirillzyusko - agency Contributor+: @jjcoffee paid $250 via Upwork