Title: [Android] BottomNavigation crash when using :active + no Image in TabStripItem · Issue #8311 · NativeScript/NativeScript · GitHub
Open Graph Title: [Android] BottomNavigation crash when using :active + no Image in TabStripItem · Issue #8311 · NativeScript/NativeScript
X Title: [Android] BottomNavigation crash when using :active + no Image in TabStripItem · Issue #8311 · NativeScript/NativeScript
Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: latest (6.3.3) Cross-platform modules: late...
Open Graph Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: lat...
X Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: lat...
Opengraph URL: https://github.com/NativeScript/NativeScript/issues/8311
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Android] BottomNavigation crash when using :active + no Image in TabStripItem","articleBody":"**Environment**\r\nProvide version numbers for the following components (information can be retrieved by running `tns info` in your project folder or by inspecting the `package.json` of the project):\r\n - CLI: latest (6.3.3)\r\n - Cross-platform modules: latest (6.3.0) and next (^6.3.0-next-2020-01-30-213549-03)\r\n - Android Runtime: 6.3.0\r\n - iOS Runtime: n/a\r\n\r\n**To Reproduce**\r\n- Use [this app ](https://github.com/NickIliev/NS-Issues-2020/tree/master/others/t-1452319)(template with tab navigation)\r\n- Observe [the CSS files for Android](https://github.com/NickIliev/NS-Issues-2020/blob/master/others/t-1452319/app/app.android.scss#L4-L13)\r\n- **Remove/comment** all **Image** tags from all **TabStripItem** elements (e.g. [here](https://github.com/NickIliev/NS-Issues-2020/blob/master/others/t-1452319/app/app-root.xml#L7))\r\n- Press on any tab - as a result, thapp will crash with\r\n\r\n```\r\nSystem.err: An uncaught Exception occurred on \"main\" thread.\r\nSystem.err: Calling js method onSelectedPositionChange failed\r\nSystem.err: Error: undefined is not a valid file or resource.\r\nSystem.err: \r\nSystem.err: StackTrace:\r\nSystem.err: push.../node_modules/@nativescript/core/image-source/image-source.js.ImageSource.fromFileOrResourceSync(file:///node_modules/@nativescript/core/image-source/image-source.js:118:0)\r\nSystem.err: at push.../node_modules/@nativescript/core/ui/bottom-navigation/bottom-navigation.js.BottomNavigation.getIcon(file:///node_modules/@nativescript/core/ui/bottom-navigation/bottom-navigation.js:474:0)\r\nSystem.err: at push.../node_modules/@nativescript/core/ui/bottom-navigation/bottom-navigation.js.BottomNavigation.setTabBarIconColor(file:///node_modules/@nativescript/core/ui/bottom-navigation/bottom-navigation.js:533:0)\r\nSystem.err: at (file:///node_modules/@nativescript/core/ui/tab-navigation-base/tab-strip-item/tab-strip-item.js:97:0)\r\n```\r\n\r\n**Expected behavior**\r\nThe app doesn't crash when using **:active** state in combination with TabStripItem (with no Image)\r\n\r\n**Sample project**\r\nhttps://github.com/NickIliev/NS-Issues-2020/tree/master/others/t-1452319\r\n\r\n**Additional context**\r\nThe issue is not present if we remove [the **:active** state CSS class.](https://github.com/NickIliev/NS-Issues-2020/blob/master/others/t-1452319/app/app.android.scss#L10-L13)\r\n\r\nReported via t.1452320","author":{"url":"https://github.com/NickIliev","@type":"Person","name":"NickIliev"},"datePublished":"2020-02-05T08:57:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/8311/NativeScript/issues/8311"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:39792c77-2747-ccdf-25fe-214e070b7ad2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BE14:1A86E7:3368F9E:43EE370:69745386 |
| html-safe-nonce | fa4816a61d541d1c6023817f227b9a5af02d990581b6c1bd354a6d650fad11a8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTE0OjFBODZFNzozMzY4RjlFOjQzRUUzNzA6Njk3NDUzODYiLCJ2aXNpdG9yX2lkIjoiMTUwMjY1ODAwNDYzOTgzMDkxOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2b0c09131499f22a48c70b45c1719d3339bcfa259e5c0163985ca046b5bb4271 |
| hovercard-subject-tag | issue:560227201 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/8311/issue_layout |
| twitter:image | https://opengraph.githubassets.com/95b01bb605caba2f2b69440324194ca51daa677097273164e95233b398c16632/NativeScript/NativeScript/issues/8311 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/95b01bb605caba2f2b69440324194ca51daa677097273164e95233b398c16632/NativeScript/NativeScript/issues/8311 |
| og:image:alt | Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: lat... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | NickIliev |
| hostname | github.com |
| expected-hostname | github.com |
| None | e0b95d743b7672c9ac0e1032d5f117950182dc164a83434a7db86510e8f0b37c |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56fe7e2e8de6e57740bca50402351ea656f7a4bf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width