ui-material-components: BottomSheet crashes on Dismiss (Android, nativescript-angular)

Which platform(s) does your issue occur on?

  • Android
  • Any versions
  • What type of device? any

Please, provide the following version numbers that your issue occurs with:

  • CLI: 6.1.2
  • Cross-platform modules: 6.1.2
  • Runtime: tns-android 6.1.2
  • Plugin(s): Angular 8.2.11, nativescript-material-components 2.5.2

Please, tell us how to recreate the issue in as much detail as possible. Can be reproduced using any generic usage of the plugin like the nativescript-angular demo of the BottomSheet

Is there any code involved? This is how the crash log looks like:

An uncaught Exception occurred on "main" thread.
Calling js method onDismiss failed
TypeError: Cannot read property 'setOnTouchListener' of null

StackTrace:
	push.../node_modules/tns-core-modules/ui/core/view/view.js.View.onUnloaded(file:///data/data/app.name/files/app/vendor.js:102970:38)
	at (file:///data/data/app.name/files/app/vendor.js:101093:92)
	at push.../node_modules/tns-core-modules/ui/core/view-base/view-base.js.ViewBase.callFunctionWithSuper(file:///data/data/app.name/files/app/vendor.js:101082:9)
	at push.../node_modules/tns-core-modules/ui/core/view-base/view-base.js.ViewBase.callUnloaded(file:///data/data/app.name/files/app/vendor.js:101093:14)
	at push.../node_modules/tns-core-modules/ui/core/view-base/view-base.js.ViewBase.unloadView(file:///data/data/app.name/files/app/vendor.js:101222:18)
	at (file:///data/data/app.name/files/app/vendor.js:101024:19)
	at push.../node_modules/tns-core-modules/ui/layouts/layout-base-common.js.LayoutBaseCommon.eachChildView(file:///data/data/app.name/files/app/vendor.js:110064:26)
	at push.../node_modules/tns-core-modules/ui/core/view/view-common.js.ViewCommon.eachChild(file:///data/data/app.name/files/app/vendor.js:102584:14)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (6 by maintainers)

Most upvoted comments

I just dug a little more and found how exactly it could be reproduced. Not sure though if the bug is in the plugin or {N} itself. To reproduce, you can simply capture (touch) event instead of (tap) on the component being shown on the bottomsheet and it will crash when you dismiss it.