NSInvalidArgumentException: pushViewController — repeated push of the same RNSScreen instance causes a crash ([email protected], [email protected]) #3281
Replies: 1 comment
-
|
Hey @dKatsai, so I'm not sure whether this is the culprit or not, but that is my first guess. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
After updating to the versions:
react-native: 0.79.3
react-native-screens: 4.15.4
@react-navigation/native: 7.0.14 (previously: 6.1.9)
@react-navigation/native-stack: 7.2.0 (previously: 6.9.26)
@react-navigation/stack: 7.1.1 (previously: 6.3.20)
I encountered a crash when trying to push the same RNSScreen instance more than once:
NSInvalidArgumentException: <RNScreensNavigationController: ...> is pushing the same view controller instance (<RNSScreen: ...>) more than once which is not supported and is most likely an error in the applicationStacktrace:Steps to reproduce: Unfortunately, I cannot provide exact reproduction steps, as I have not been able to consistently reproduce the issue in a minimal example. The crash only started appearing after updating the libraries listed above.
Environment:
react-native: 0.79.3
react-native-screens: 4.15.4
@react-navigation/native: 7.0.14
@react-navigation/native-stack: 7.2.0
@react-navigation/stack: 7.1.1
iOS 15.x -17.x
Additional information: This issue only appeared after updating RN and react-native-screens (and related navigation libraries). With RN 0.69 and react-native-screens 3.x.x (and older navigation libraries), this did not happen.
Question: Is this the expected behavior? Is it possible to add protection against repeated push of the same RNSScreen instance, so that it does not crash but shows a warning or ignores the action?
Beta Was this translation helpful? Give feedback.
All reactions