{"action":"created","issue":{"url":"https://api.github.com/repos/wix/react-native-navigation/issues/4130","repository_url":"https://api.github.com/repos/wix/react-native-navigation","labels_url":"https://api.github.com/repos/wix/react-native-navigation/issues/4130/labels{/name}","comments_url":"https://api.github.com/repos/wix/react-native-navigation/issues/4130/comments","events_url":"https://api.github.com/repos/wix/react-native-navigation/issues/4130/events","html_url":"https://github.com/wix/react-native-navigation/issues/4130","id":369621351,"node_id":"MDU6SXNzdWUzNjk2MjEzNTE=","number":4130,"title":"[v2] Crash setting bottom tabs as root NullPointerException: int com.reactnativenavigation.views.BottomTabs.getCurrentItem()' on a null object reference","user":{"login":"byroncortez","id":1147359,"node_id":"MDQ6VXNlcjExNDczNTk=","avatar_url":"https://avatars3.githubusercontent.com/u/1147359?v=4","gravatar_id":"","url":"https://api.github.com/users/byroncortez","html_url":"https://github.com/byroncortez","followers_url":"https://api.github.com/users/byroncortez/followers","following_url":"https://api.github.com/users/byroncortez/following{/other_user}","gists_url":"https://api.github.com/users/byroncortez/gists{/gist_id}","starred_url":"https://api.github.com/users/byroncortez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byroncortez/subscriptions","organizations_url":"https://api.github.com/users/byroncortez/orgs","repos_url":"https://api.github.com/users/byroncortez/repos","events_url":"https://api.github.com/users/byroncortez/events{/privacy}","received_events_url":"https://api.github.com/users/byroncortez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-12T16:24:12Z","updated_at":"2018-12-07T15:51:50Z","closed_at":null,"author_association":"NONE","body":"### Issue Description\r\n\r\nApp crashes when i setStackRoot to bottom tab. From the android logs: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.reactnativenavigation.views.BottomTabs.getCurrentItem()' on a null object reference\r\n\r\n### Steps to Reproduce / Code Snippets / Screenshots\r\n\r\nI start my app with a welcome screen:\r\nNavigation.events().registerAppLaunchedListener(() => {\r\n    Navigation.setRoot({\r\n        root: {\r\n            stack: {\r\n                id: 'mainNavigationStackId',\r\n                children: [\r\n                    {\r\n                        component: {\r\n                            name: 'app.welcome',\r\n                        }\r\n                    }\r\n                ],\r\n            }\r\n        }\r\n    });\r\n});\r\n\r\nAnd i set stack root like this:\r\nNavigation.setStackRoot('mainNavigationStackId', {\r\n                        bottomTabs: {\r\n                            id: 'mainTabsId',\r\n                            children: [\r\n                                {\r\n                                    component: {\r\n                                        name: 'app.events',\r\n                                        options: {\r\n                                            bottomTab: {\r\n                                                fontSize: 12,\r\n                                                text: 'Events',\r\n                                                icon: ic_events,\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            ],\r\n                        }\r\n                    });\r\n\r\nThis works if I use setRoot({})\r\n\r\n---\r\n### Environment\r\n* React Native Navigation version: 2.0.2467\r\n* React Native version: 0.56.0\r\n* Platform(s) (iOS, Android, or both?): Android\r\n* Device info (Simulator/Device? OS version? Debug/Release?): Any Android Device\r\n"},"comment":{"url":"https://api.github.com/repos/wix/react-native-navigation/issues/comments/445274736","html_url":"https://github.com/wix/react-native-navigation/issues/4130#issuecomment-445274736","issue_url":"https://api.github.com/repos/wix/react-native-navigation/issues/4130","id":445274736,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTI3NDczNg==","user":{"login":"TylerNRobertson","id":23481122,"node_id":"MDQ6VXNlcjIzNDgxMTIy","avatar_url":"https://avatars1.githubusercontent.com/u/23481122?v=4","gravatar_id":"","url":"https://api.github.com/users/TylerNRobertson","html_url":"https://github.com/TylerNRobertson","followers_url":"https://api.github.com/users/TylerNRobertson/followers","following_url":"https://api.github.com/users/TylerNRobertson/following{/other_user}","gists_url":"https://api.github.com/users/TylerNRobertson/gists{/gist_id}","starred_url":"https://api.github.com/users/TylerNRobertson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TylerNRobertson/subscriptions","organizations_url":"https://api.github.com/users/TylerNRobertson/orgs","repos_url":"https://api.github.com/users/TylerNRobertson/repos","events_url":"https://api.github.com/users/TylerNRobertson/events{/privacy}","received_events_url":"https://api.github.com/users/TylerNRobertson/received_events","type":"User","site_admin":false},"created_at":"2018-12-07T15:51:50Z","updated_at":"2018-12-07T15:51:50Z","author_association":"NONE","body":"This is still present. Please remove from stale.\r\n\r\n- Currently still an issue with:\r\nRNN - 2.1.3\r\nRN - 0.57.7\r\nReact - 16.6.1"}}
{"actor":{"display_login":"TylerNRobertson"}}