Skip to content

[BottomNavigation]: crash when navigating without transition animation #7481

Description

@ADjenkov

Environment

  • CLI: rc
  • Cross-platform modules: rc
  • Android Runtime: rc

Describe the bug
App crashes in a scenario with frame -> bottom navigation -> frame (nested fragments) after you navigate forward from the root level frame and try to go back. Note the error occurs only if navigation is performed with animated=false (no transition).

To Reproduce
Using e2e/nested-frame-navigation:

  1. Go to Page w/ BOTTOM NAVIGATION
  2. Navigate to some page (no transition)
  3. Go back -- app crashes with the following exception:
An uncaught Exception occurred on "main" thread.
The specified child already has a parent. You must call removeView() on the child's parent first.
java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.

Expected behavior
App should not crash.

Additional context
The same problem would occur if you tried to use three levels of Frame nesting because BottomNavigation behaves essentially as a Frame with respect to Android fragment lifecycle.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions