Skip to content

[$250] mWeb - Reports - App crashes when using device´s back button after a search on "Reports" #57169

Closed

Description

@IuliiaHerets

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.1.2-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
Email or phone of affected tester (no customers): ibellicotest+282@gmail.com
Issue reported by: Applause Internal Team
Device used: Motorola MotoG60 - Android 12 - Chrome
App Component: Search

Action Performed:

  1. Open the staging.new.expensify.com website.
  2. Open "Reports" section.
  3. Tap on "Search for something" and write any word.
  4. Tap on the enter button on the keyboard.
  5. Use device´s back button.
  6. Check the website behaviour after this action.

Expected Result:

User should be able to return to expenses list after using device´s back button.

Actual Result:

App crashes when using device´s back button after triggering a search on "Reports" section.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6748765_1740038286838!log.txt
https://github.com/user-attachments/assets/264fa9f1-3a31-4d19-9802-6e4617c02fb2

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021892972906702803151
  • Upwork Job ID: 1892972906702803151
  • Last Price Increase: 2025-03-07
Issue OwnerCurrent Issue Owner: @ikevin127

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 20, 2025
  2. melvin-bot commented on Feb 20, 2025

    @melvin-bot

    Triggered auto assignment to @bfitzexpensify (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. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Feb 21, 2025
  4. changed the title [-]mWeb - Reports - App crashes when using device´s back button after a search on "Reports"[/-] [+][$250] mWeb - Reports - App crashes when using device´s back button after a search on "Reports"[/+] on Feb 21, 2025
  5. melvin-bot commented on Feb 21, 2025

    @melvin-bot
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 21, 2025
  7. melvin-bot commented on Feb 21, 2025

    @melvin-bot

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

  8. ikevin127 commented on Feb 22, 2025

    @ikevin127
    Contributor

    🔄 This could be caused by the new search UI implementation:

    cc @luacmartins @SzymczakJ Wdyt, is this issue related or it was happening before the new search UI implementation ?

    Note: Also feels like there's 2 issues here, OP mentions that after you type something, you tap the soft keyboard Enter key then UI looks like no search was performed, whereas in my video below I actually tapped on the search suggestion and this way search was actually performed - but the navigation back bug / crash happens regardless of this.

    I remember reviewing this issue where we did some work on the mWeb side for tapping search page soft keyboard Enter:

    details where we clarified behaviour can be seen in this comment, but the new Search UI implementation might've removed that logic since search is not happening on the same page, resulting in the OP behaviour regarding search not actuallly being performed when tapping the soft keyboard Enter button.

    🟢 I can consistently reproduce the issue, here's the video and error:

    Android: mWeb Error
    screen-20250221-182536.mp4
    Screen.Recording.2025-02-21.at.18.27.04.mov
  9. andriivitiv commented on Feb 22, 2025

    @andriivitiv
    Contributor

    I've looked into this a bit and the crash occurs when Animated.View has an exiting animation and contains a conditional child component. Simplified example:

    <Animated.View exiting={FadeOutRight}>
        <ChildComponent />
        {condition && <ChildComponent />}
        <ChildComponent />
    </Animated.View>

    When I hardcode condition to true, it crashes with a slightly different message:

    Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
    

    I think this happens because react-native-reanimated modifies the DOM directly, causing React to fail when applying changes from its virtual DOM. The crash no longer occurs when I comment out this lines.

    As a workaround, we can wrap child elements with a View so that Animated.View doesn't have conditional child components:

    <Animated.View exiting={FadeOutRight}>
        <View>
            <ChildComponent />
            {condition && <ChildComponent />}
            <ChildComponent />
        </View>
    </Animated.View>

    The original Animated.View code in Expensify/App is here, and child components are here.

    BTW this issue is also reproducible in desktop Chrome with a narrow layout.

  10. luacmartins commented on Feb 24, 2025

    @luacmartins
    Contributor

    @tomekzaw I thought this was the issue we fixed last week. Could you take a look into this please?

  11. 24 remaining items

  12. m-bert commented on Mar 6, 2025

    @m-bert

    @NJ-2020 it seems that it doesn't happen anymore. As far as I can see @Kicu removed FreezeWrapper in this commit, so it doesn't crash.

  13. NJ-2020 commented on Mar 6, 2025

    @NJ-2020
    Contributor

    Thanks

  14. ikevin127 commented on Mar 6, 2025

    @ikevin127
    Contributor

    🟢 I confirm that the issue is not reproducible anymore in staging (v9.1.9-6) nor develop (v9.1.9-6) latest main.

  15. luacmartins commented on Mar 6, 2025

    @luacmartins
    Contributor

    Nice. I think we can close this issue then.

  16. melvin-bot commented on Mar 7, 2025

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  17. mvtglobally commented on Mar 7, 2025

    @mvtglobally

    Issue not reproducible during KI retests. (First week)

  18. melvin-bot commented on Mar 10, 2025

    @melvin-bot

    @ikevin127 Whoops! This issue is 2 days overdue. Let's get this updated quick!

  19. ikevin127 commented on Mar 10, 2025

    @ikevin127
    Contributor

    Nice. I think we can close this issue then.

    @luacmartins I agree!

  20. self-assigned this
    on Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions