{"action":"created","issue":{"url":"https://api.github.com/repos/react-navigation/react-navigation/issues/3696","repository_url":"https://api.github.com/repos/react-navigation/react-navigation","labels_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/3696/labels{/name}","comments_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/3696/comments","events_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/3696/events","html_url":"https://github.com/react-navigation/react-navigation/issues/3696","id":303725384,"node_id":"MDU6SXNzdWUzMDM3MjUzODQ=","number":3696,"title":"There is no route defined for key ... Issue with drawer?","user":{"login":"naturom","id":8802207,"node_id":"MDQ6VXNlcjg4MDIyMDc=","avatar_url":"https://avatars2.githubusercontent.com/u/8802207?v=4","gravatar_id":"","url":"https://api.github.com/users/naturom","html_url":"https://github.com/naturom","followers_url":"https://api.github.com/users/naturom/followers","following_url":"https://api.github.com/users/naturom/following{/other_user}","gists_url":"https://api.github.com/users/naturom/gists{/gist_id}","starred_url":"https://api.github.com/users/naturom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naturom/subscriptions","organizations_url":"https://api.github.com/users/naturom/orgs","repos_url":"https://api.github.com/users/naturom/repos","events_url":"https://api.github.com/users/naturom/events{/privacy}","received_events_url":"https://api.github.com/users/naturom/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-09T05:03:03Z","updated_at":"2018-07-16T23:10:43Z","closed_at":"2018-03-09T19:01:47Z","author_association":"NONE","body":"Hi, here's my navigators:\r\n\r\nconst StacksARoutes = {\r\n    StackA: { screen: StackA },\r\n    StackB: { screen: StackB },\r\n};\r\nconst StacksA = StackNavigator(StacksARoutes);\r\n\r\nconst TabsARoutes = {\r\n    TabA: { screen: TabA, icon: 'ios-options' },\r\n    TabB: { screen: TabB, icon: 'ios-options' },\r\n    TabC: { screen: StacksA, icon: 'ios-options' },\r\n};\r\nconst TabsA = TabNavigator(TabsARoutes, {\r\n    order: ['TabA', 'TabB', 'TabC'],\r\n    //initialRouteName: 'TabC', // if set initial route to TabC, crash directly when switch to tab in drawer\r\n});\r\n\r\nconst DrawerRoutes = {\r\n    StacksA: { screen: StacksA },\r\n    TabsA: { screen: TabsA },\r\n    PlainA: { screen: PlainA },\r\n};\r\nconst Drawer = DrawerNavigator(DrawerRoutes);\r\n\r\nIf I go to the TabsA in Drawer, then go to TabC (StacksA) in TabsA, then open drawer, and go to PlainA or StacksA, then go to TabsA via Drawer again, I'll get this crash:\r\n\r\n12:55:37: Error: There is no route defined for key TabA.\r\nMust be one of: 'StackA','StackB'\r\n\r\nThis error is located at:\r\n    in DrawerView (at DrawerNavigator.js:88)\r\n    in Unknown (at createNavigator.js:13)\r\n    in Navigator (at createNavigationContainer.js:226)\r\n    in NavigationContainer (at appNavigation.js:76)\r\n    in AppNavigation (created by Connect(AppNavigation))\r\n    in Connect(AppNavigation) (at app.js:11)\r\n    in Provider (at app.js:10)\r\n    in App (at registerRootComponent.js:35)\r\n    in RootErrorBoundary (at registerRootComponent.js:34)\r\n    in ExpoRootComponent (at renderApplication.js:35)\r\n    in RCTView (at View.js:71)\r\n    in View (at AppContainer.js:102)\r\n    in RCTView (at View.js:71)\r\n    in View (at AppContainer.js:122)\r\n    in AppContainer (at renderApplication.js:34)\r\n\r\nDid I do sth wrong? is this a bug or expected behavior? Thanks.\r\n\r\nThe same setup has no issue if I change the TabsA order to:\r\norder: ['TabC', 'TabA', 'TabB'], // making TabC (StacksA) the first tab\r\n\r\n### Current Behavior\r\n\r\nIt crashed with error above\r\n\r\n### Expected Behavior\r\n\r\nShould work fine.\r\n\r\n### How to reproduce\r\n\r\n- You must provide a way to reproduce the problem. If you are having an issue with your machine or build tools, the issue belongs on another repoistory as that is outside of the scope of Rect Navigation.\r\n- Either re-create the bug on [Snack](https://snack.expo.io) or link to a GitHub repository with code that reproduces the bug.\r\n- Explain how to run the example app and any steps that we need to take to reproduce the issue from the example app.\r\n\r\n### Your Environment\r\n\r\n| software         | version\r\n| ---------------- | -------\r\n| react-navigation | 1.4.0\r\n| react-native     | 0.52.0\r\n| node             | 8.9.3\r\n| npm or yarn      | npm 4.6.1\r\n"},"comment":{"url":"https://api.github.com/repos/react-navigation/react-navigation/issues/comments/405408737","html_url":"https://github.com/react-navigation/react-navigation/issues/3696#issuecomment-405408737","issue_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/3696","id":405408737,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTQwODczNw==","user":{"login":"Jnlbr","id":33793315,"node_id":"MDQ6VXNlcjMzNzkzMzE1","avatar_url":"https://avatars0.githubusercontent.com/u/33793315?v=4","gravatar_id":"","url":"https://api.github.com/users/Jnlbr","html_url":"https://github.com/Jnlbr","followers_url":"https://api.github.com/users/Jnlbr/followers","following_url":"https://api.github.com/users/Jnlbr/following{/other_user}","gists_url":"https://api.github.com/users/Jnlbr/gists{/gist_id}","starred_url":"https://api.github.com/users/Jnlbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jnlbr/subscriptions","organizations_url":"https://api.github.com/users/Jnlbr/orgs","repos_url":"https://api.github.com/users/Jnlbr/repos","events_url":"https://api.github.com/users/Jnlbr/events{/privacy}","received_events_url":"https://api.github.com/users/Jnlbr/received_events","type":"User","site_admin":false},"created_at":"2018-07-16T23:10:43Z","updated_at":"2018-07-16T23:10:43Z","author_association":"NONE","body":"Thaaaanks @stevemkroll for the solution!"}}
{"actor":{"display_login":"Jnlbr"}}