After I upgraded React Native from 0.14 to 0.26 for my IOS app I am keep getting this exception:
*** Assertion failure in -RCTNavigator reactSuperview, /path_to_app/node_modules/react-native/React/Views/RCTNavigator.m:461 2016-05-20 20:55:43.217 [error][tid:main][RCTUIManager.m:1100] Exception thrown while executing UI block: put reactNavSuperviewLink back
Before the upgrade I did not have this problem. I am using NavigatorIOS.
Any advice on how to fix it or what to even look at while debugging is greatly appreciated
Okay no, any answer that includes "Comment out this part of the library" is wrong. Plain and simple.
The issue you are having is a from having you navigatorIOS set up wrong. Make sure you don't have any nested/looping navigators and clean up your code.
Don't rush through it or you will find more issues like this... remember react native is YOUNG and things will break if you are reckless
When I was trying to solve this problem, in React Native docs there was a statement, that they are aware about million bugs of NavigatorIOS but are no longer working on the component as facebook doesn't use it internally, and they pointed to this library as an alternative for better NavigatorIOS. (back then this library only provided replacement for NavigatorIOS, now they added few more gems) I was going to use it, but then I read that their Navigator does not synchronize between JS and native, that's why instead of using the library I made a decision to stop forcing synchronization between JS and native in React's NavigatorIOS, which solved the problem.
I ended up commenting out RCTAssert(!_bridge.isValid || self.superview != nil, @"put reactNavSuperviewLink back");
in node_modules/react-native/React/Views/RCTNavigator.m.
I know it is a work around, but since React Native approved this library, and many people are happy with, I feel like mirroring what they implemented(not implemented) should be somewhat safe. At least it worked for my app and no further bugs occurred.
After commenting out the line as indicated in the follow up post by @Mark, I ended up getting a different error Cannot adjust current top of stack beyond available views
. Reading up on another thread (React-native on IOS: cannot adjust current top of stack beyond available views) it turns out I wasn't properly importing the component that was being used. Although this turned out to be a "user error" on my behalf, perhaps this might explain other accounts of this error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With