I have updated my RN project from V2.0.2242 to V2.0.2349, and on iOS it is failing to load the application, when checking debug it shows a warning of "Cannot read property 'topTabs' of undefined"
Checking though my application, I have not got topTabs defined anywhere. If i need to define it where would I define it? Thank you.
YellowBox.js:80 Possible Unhandled Promise Rejection (id: 0):
TypeError: Cannot read property 'topTabs' of undefined
TypeError: Cannot read property 'topTabs' of undefined
at LayoutTreeParser.parse (blob:http://localhost:8081/7922237c-4650-4d85-b633-f057f801c398:70029:25)
at Commands.setRoot (blob:http://localhost:8081/7922237c-4650-4d85-b633-f057f801c398:69811:50)
at Navigation.setRoot (blob:http://localhost:8081/7922237c-4650-4d85-b633-f057f801c398:3440:38)
at AppContainer.startApp (blob:http://localhost:8081/7922237c-4650-4d85-b633-f057f801c398:1549:43)
at blob:http://localhost:8081/7922237c-4650-4d85-b633-f057f801c398:1539:17
at tryCallOne (blob:http://localhost:8081/7922237c-4650-4d85-b633-f057f801c398:5690:14)
at blob:http://localhost:8081/7922237c-4650-4d85-b633-f057f801c398:5791:17
at blob:http://localhost:8081/7922237c-4650-4d85-b633-f057f801c398:5074:21
at _callTimer (blob:http://localhost:8081/7922237c-4650-4d85-b633-f057f801c398:4963:9)
at _callImmediatesPass (blob:http://localhost:8081/7922237c-4650-4d85-b633-f057f801c398:4999:9)
I had a similar issue. Have you added root
at the top level when invoking setRoot
.
Navigation.setRoot({
root: {
// whatever you had before
},
})
After changing this, the issue you mentioned went away but then I got a new issue, see below...
Exception '-[__NSCFBoolean countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x10ef946b0' was thrown while invoking setRoot on target RNNBridgeModule with params (...
Update
I was able to resolve the next issue by adding
root
to the top level object forsetDefaultOptions
Navigation.setDefaultOptions({ root: { // whatever you had before }, })
_BTW It looks like your RN & RNN versions ar flipped_
The main problem was two changes that happened:
{ statusBarStyle: 'light', largeTitle: true }
Ara now invalid options. You should use:
{ statusBar: { visible: true }, largeTitle: { visible: true }, }
After fixing it you can use setRoot.
@gabrielvcbessa ya I just noticed that myself. Thanks for the update! 👍
@nickofthyme Are you facing something like this #3362 ?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.
The issue has been closed for inactivity.
Most helpful comment
I had a similar issue. Have you added
root
at the top level when invokingsetRoot
.After changing this, the issue you mentioned went away but then I got a new issue, see below...
_BTW It looks like your RN & RNN versions ar flipped_