Repository: wix/react-native-navigation

Issue #4333: [V2] setRoot action leads to the ID collision error when calling it with the same layout
Created: 2018-11-19T09:45:52Z
Issue Description
Calling setRoot with the same layout the app already has, leads to the following error:
Exception 'Component id already exists screen.One' was thrown while invoking setRoot on target RNNBridgeModule with params
It happens when the custom ids to the components being set.
I didn't have this issue with previous versions of the RNN like 2.0.2555.
Steps to Reproduce / Code Snippets / Screenshots

Call setRoot with some layout when the app launch.
Call it again with the same layout.


Expected: the app's layout should be recreated from the ground up with the same layout.
Got: Exception 'Component id already exists for all the screens and components in the layout.
I've made a demo app for this issue: https://github.com/vshkl/RNNDemo

Launch the app
Open the side menu
Press on Reset Root button
See the error I've described above


Environment

React Native Navigation version: 2.1.3
React Native version: 0.57.5
Platform(s) (iOS, Android, or both?): iOS
Device info (Simulator/Device? OS version? Debug/Release?): Simulator, 12.1, Debug

Duplicate issue #5117: [V2] Android Exception java.util.NoSuchElementException StackController.java:228
Created: 2019-05-17T06:29:30Z
Issue Description
Seeing this error frequently in production but unable to reproduce. Any thoughts on what we could be doing to cause this / if there is a way to prevent this?
Steps to Reproduce / Code Snippets / Screenshots

  at java.util.ArrayList$Itr.next (ArrayList.java:863)
  at com.reactnativenavigation.viewcontrollers.stack.StackController.removeChildrenBellowTop (StackController.java:228)
  at com.reactnativenavigation.viewcontrollers.stack.StackController.access$000 (StackController.java:36)
  at com.reactnativenavigation.viewcontrollers.stack.StackController$2.onSuccess (StackController.java:209)
  at com.reactnativenavigation.viewcontrollers.stack.StackController.lambda$push$4$StackController (StackController.java:174)
  at com.reactnativenavigation.viewcontrollers.stack.StackController$$Lambda$4.run (Unknown Source:8)
  at com.reactnativenavigation.anim.NavigationAnimator$1.onAnimationEnd (NavigationAnimator.java:65)
  at android.animation.Animator$AnimatorListener.onAnimationEnd (Animator.java:552)
  at android.animation.AnimatorSet.endAnimation (AnimatorSet.java:1294)
  at android.animation.AnimatorSet.doAnimationFrame (AnimatorSet.java:1079)
  at android.animation.AnimationHandler.doAnimationFrame (AnimationHandler.java:146)
  at android.animation.AnimationHandler.access$100 (AnimationHandler.java:37)
  at android.animation.AnimationHandler$1.doFrame (AnimationHandler.java:54)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:947)
  at android.view.Choreographer.doCallbacks (Choreographer.java:761)
  at android.view.Choreographer.doFrame (Choreographer.java:693)
  at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:935)
  at android.os.Handler.handleCallback (Handler.java:873)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loop (Looper.java:214)
  at android.app.ActivityThread.main (ActivityThread.java:7032)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:965)


Environment

React Native Navigation version: 2.18.5
React Native version: 0.57.8
Platform(s) (iOS, Android, or both?): Android
Device info (Simulator/Device? OS version? Debug/Release?): Device Android 7.1-9 Release

Closing comment (2019-05-21T13:41:06Z): Vaguely related to #4333 in a round about sort of way - I think that's the iOS equivalent?